Skip to content

Commit 97a8690

Browse files
authored
Fix Scala test compile Java home usage (#1481)
1 parent fd2e6fa commit 97a8690

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spark/sql-13/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ configurations.all { Configuration conf ->
5555
tasks.withType(ScalaCompile) { ScalaCompile task ->
5656
task.sourceCompatibility = project.ext.minimumRuntimeVersion
5757
task.targetCompatibility = project.ext.minimumRuntimeVersion
58+
task.options.forkOptions.executable = new File(project.ext.runtimeJavaHome, 'bin/java').canonicalPath
5859
}
5960

6061
compileScala {
61-
options.forkOptions.executable = new File(project.ext.runtimeJavaHome, 'bin/java').canonicalPath
6262
configure(scalaCompileOptions.forkOptions) {
6363
memoryMaximumSize = '1g'
6464
jvmArgs = ['-XX:MaxPermSize=512m']

spark/sql-20/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ if (project.ext.scalaMajorVersion == '2.10') {
4141
tasks.withType(ScalaCompile) { ScalaCompile task ->
4242
task.sourceCompatibility = project.ext.minimumRuntimeVersion
4343
task.targetCompatibility = project.ext.minimumRuntimeVersion
44+
task.options.forkOptions.executable = new File(project.ext.runtimeJavaHome, 'bin/java').canonicalPath
4445
}
4546

4647
compileScala {
47-
options.forkOptions.executable = new File(project.ext.runtimeJavaHome, 'bin/java').canonicalPath
4848
configure(scalaCompileOptions.forkOptions) {
4949
memoryMaximumSize = '1g'
5050
jvmArgs = ['-XX:MaxPermSize=512m']

0 commit comments

Comments
 (0)