Skip to content

Commit

Permalink
Merge pull request #38 from asciidoctor/update-java
Browse files Browse the repository at this point in the history
Raise minimum Java version to 11
  • Loading branch information
robertpanzer committed May 8, 2023
2 parents 0e0b9a9 + f7050fe commit da236ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,17 @@ jobs:
test:
strategy:
matrix:
java: ['8', '11', '17']
java: ['11', '17']
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: macos-latest
java: '8'
- os: macos-latest
java: '17'
- os: windows-latest
java: '8'
- os: windows-latest
java: '17'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
Expand Down
22 changes: 6 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ext {
jrubyVersion = '9.2.4.0'
junitVersion = '5.8.2'
assertjVersion = '3.22.0'
jsoupVersion = '1.14.3'
jsoupVersion = '1.15.3'

// gem versions
asciidoctorJVersion = project.hasProperty('asciidoctorJVersion') ? project.asciidoctorJVersion : '2.5.3'
Expand All @@ -54,21 +54,11 @@ subprojects {

status = _status

// NOTE sourceCompatibility & targetCompatibility are set in gradle.properties to meet requirements of Gradle
// Must redefine here to work around a bug in the Eclipse plugin
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8

plugins.withType(JavaPlugin) {
project.tasks.withType(JavaCompile) { task ->
if (JavaVersion.current().isJava11Compatible()) {
task.options.release = 8
}
}
project.tasks.withType(GroovyCompile) { task ->
if (JavaVersion.current().isJava11Compatible()) {
task.options.release = 8
}
}
project.tasks.withType(JavaCompile).configureEach { task ->
task.options.release = 11
}
project.tasks.withType(GroovyCompile).configureEach {task ->
task.options.release = 11
}

repositories {
Expand Down

0 comments on commit da236ed

Please sign in to comment.