Support for java 16

This commit is contained in:
buthed010203
2021-07-26 14:06:48 -04:00
parent 11fc54622b
commit 12616f5419

View File

@@ -6,9 +6,6 @@ group pGroup
version '1.0' version '1.0'
sourceCompatibility = 8
sourceSets.main { sourceSets.main {
java.srcDir("src/") java.srcDir("src/")
resources.srcDir("assets/") resources.srcDir("assets/")
@@ -31,6 +28,7 @@ jar {
dependencies { dependencies {
annotationProcessor 'com.github.Anuken:jabel:34e4c172e65b3928cd9eabe1993654ea79c409cd'
compileOnly "com.github.Anuken.Arc:arc-core:$pMindustryVersion" compileOnly "com.github.Anuken.Arc:arc-core:$pMindustryVersion"
compileOnly "com.github.Anuken.Mindustry:core:$pMindustryVersion" compileOnly "com.github.Anuken.Mindustry:core:$pMindustryVersion"
implementation 'org.hjson:hjson:3.0.0' implementation 'org.hjson:hjson:3.0.0'
@@ -57,3 +55,15 @@ task dexify(type: Jar) {
} }
task buildDex dependsOn "build", "dexify" task buildDex dependsOn "build", "dexify"
tasks.withType(JavaCompile){
targetCompatibility = 8
sourceCompatibility = JavaVersion.VERSION_16
options.encoding = "UTF-8"
options.forkOptions.jvmArgs.addAll([
'--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED'
])
options.compilerArgs.addAll(['--release', '8'])
compileJava.options.fork = true
}