Support Java 16 with Jabel
This commit is contained in:
parent
4805e81dbe
commit
9122d5f007
@ -109,7 +109,12 @@ allprojects {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8", kotlinVer))
|
||||
implementation(kotlin("reflect", kotlinVer))
|
||||
annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:0.3.0")
|
||||
annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:0.3.0") {
|
||||
listOf("byte-buddy", "byte-buddy-agent").forEach {
|
||||
exclude(module = it)
|
||||
annotationProcessor("net.bytebuddy:$it:1.10.22")
|
||||
} // Required for Java 16 support
|
||||
}
|
||||
}
|
||||
tasks {
|
||||
withType(ShadowJar::class) {
|
||||
@ -140,6 +145,10 @@ allprojects {
|
||||
encoding = "UTF-8"
|
||||
isFork = true
|
||||
// The following lines are required for Jabel:
|
||||
forkOptions.jvmArgs!!.addAll(listOf(
|
||||
"--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
|
||||
"--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"
|
||||
)) // Java 16+ support
|
||||
compilerArgs.addAll(listOf("-Xplugin:jabel", "--release", javaVer))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user