Skip to content

Commit

Permalink
Don't support Java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Sep 8, 2023
1 parent 4057706 commit 69be376
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
java: [ '11', '17', '19' ]
java: [ '11', '17', '20' ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cache:
- $HOME/.m2/

jdk:
- oraclejdk8
- oraclejdk17

script: ./gradlew build javadoc && ./gradlew requireJavadoc

Expand Down
18 changes: 4 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ application {
mainClass = 'org.plumelib.lookup.Lookup'
}

if (JavaVersion.current().compareTo(org.gradle.api.JavaVersion.VERSION_20) < 0) {
sourceCompatibility = 1.8
targetCompatibility = 1.8
} else {
sourceCompatibility = 11
targetCompatibility = 11
}
sourceCompatibility = 11
targetCompatibility = 11


spotless {
Expand Down Expand Up @@ -71,7 +66,6 @@ tasks.withType(JavaCompile).configureEach {
// "-processing" avoids javac warning "No processor claimed any of these annotations".
options.compilerArgs << '-Xlint:all,-processing' << '-Werror'
options.errorprone {
enabled = JavaVersion.current() != JavaVersion.VERSION_1_8
disable('ReferenceEquality') // Use Interning Checker instead.
}
}
Expand Down Expand Up @@ -120,9 +114,7 @@ if (project.hasProperty('cfLocal')) {
javadoc {
options.addStringOption('Xwerror', '-Xdoclint:all')
options.addStringOption('private', '-quiet')
if (JavaVersion.current().compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
options.addStringOption('source', '8')
}
options.addStringOption('source', '11')
doLast {
ant.replaceregexp(match:"@import url\\('resources/fonts/dejavu.css'\\);\\s*", replace:'',
flags:'g', byline:true) {
Expand All @@ -137,9 +129,7 @@ task javadocWeb(type: Javadoc) {
source = sourceSets.main.allJava
destinationDir = file("/cse/web/research/plumelib/${project.name}/api")
classpath = project.sourceSets.main.compileClasspath
if (JavaVersion.current().compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
options.addStringOption('source', '8')
}
options.addStringOption('source', '11')
doLast {
ant.replaceregexp(match:"@import url\\('resources/fonts/dejavu.css'\\);\\s*", replace:'',
flags:'g', byline:true) {
Expand Down

0 comments on commit 69be376

Please sign in to comment.