Skip to content

Commit

Permalink
updated build.gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
tanya732 committed Nov 11, 2024
1 parent c3de19f commit 3f68d84
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ java {
compileJava {
exclude 'module-info.java'
// Required to be compatible with JDK 8+
options.release = 11
options.release = 8
}

javadoc {
Expand Down Expand Up @@ -130,7 +130,7 @@ task compileModuleInfoJava(type: JavaCompile) {
}

compileTestJava {
options.release = 11
options.release = 8
options.compilerArgs = ["-Xlint:deprecation"]
}

Expand All @@ -142,14 +142,6 @@ def testJava8 = tasks.register('testJava8', Test) {
languageVersion = JavaLanguageVersion.of(8)
})
shouldRunAfter(tasks.named('test'))

doFirst {
tasks.compileJava.options.release.set(8)
}

doLast {
tasks.compileJava.options.release.set(11)
}
}

def testJava17 = tasks.register('testJava17', Test) {
Expand All @@ -162,6 +154,10 @@ def testJava17 = tasks.register('testJava17', Test) {
shouldRunAfter(tasks.named('test'))
}

//tasks.named('compileTestJava').configure {
// options.release.set(11)
//}

tasks.named('check') {
dependsOn(testJava8)
dependsOn(testJava17)
Expand Down

0 comments on commit 3f68d84

Please # to comment.