Skip to content

Commit

Permalink
remove stray quote, set java toolchain on exec
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Aug 17, 2023
1 parent 170e6cd commit 2e172ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ task runBackend (type: JavaExec) {
task testRunnable(type: JavaExec) {
dependsOn(build)
classpath(sourceSets.main.runtimeClasspath)
mainClass = 'com.conveyal.analysis.BackendMain"'
mainClass = 'com.conveyal.analysis.BackendMain'
jvmArgs("-Dconveyal.immediate.shutdown=true")
}

Expand All @@ -120,6 +120,12 @@ task createVersionProperties(dependsOn: processResources) {
}
}

// Fix inconsistent Gradle behavior (see https://github.com/gradle/gradle/issues/16791)
// By default JavaExec tasks use the JVM Gradle was launched with, ignoring the project-level toolchain.
tasks.withType(JavaExec).configureEach {
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
}

classes {
dependsOn createVersionProperties
}
Expand Down

0 comments on commit 2e172ee

Please sign in to comment.