mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Fix build.gradle so it always targets Java 8 class files.
This commit is contained in:
parent
b57a7f4de3
commit
dbe31361bc
1 changed files with 17 additions and 0 deletions
|
|
@ -78,6 +78,23 @@ spotless {
|
|||
compileJava {
|
||||
dependsOn spotlessJava
|
||||
options.compilerArgs += ["-h", "${project.buildDir}/headers/"]
|
||||
if (!JavaVersion.current().isJava8()) {
|
||||
// Ensures only methods present in Java 8 are used
|
||||
options.compilerArgs.addAll(['--release', '8'])
|
||||
// Gradle versions before 6.6 require that these flags are unset when using "-release"
|
||||
java.sourceCompatibility = null
|
||||
java.targetCompatibility = null
|
||||
}
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
if (!JavaVersion.current().isJava8()) {
|
||||
// Ensures only methods present in Java 8 are used
|
||||
options.compilerArgs.addAll(['--release', '8'])
|
||||
// Gradle versions before 6.6 require that these flags are unset when using "-release"
|
||||
java.sourceCompatibility = null
|
||||
java.targetCompatibility = null
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets.test {
|
||||
|
|
|
|||
Loading…
Reference in a new issue