-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move toolchain version and vendor to single place and make them confi…
…gurable
- Loading branch information
Showing
4 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import org.gradle.jvm.toolchain.JavaLanguageVersion | ||
import org.gradle.jvm.toolchain.JvmVendorSpec | ||
import org.gradle.api.Project | ||
|
||
private const val DEFAULT_JVM_VERSION = 11 | ||
|
||
abstract class PklJvmToolchain(private val project: Project) { | ||
val version: JavaLanguageVersion | ||
get() { | ||
val jvmVersion = (project.findProperty("PKL_JVM_VERSION") as? String)?.toInt() ?: DEFAULT_JVM_VERSION | ||
return JavaLanguageVersion.of(jvmVersion) | ||
} | ||
|
||
val vendor: JvmVendorSpec | ||
get() { | ||
return JvmVendorSpec.ADOPTIUM | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters