diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index bd78e8d42..96c1d5e3b 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -18,7 +18,6 @@ jobs: max-parallel: 4 matrix: java: - - '8' - '11' - '17' - '19' @@ -26,8 +25,6 @@ jobs: - ubuntu-latest - macos-latest exclude: - - os: macos-latest - java: '8' - os: macos-latest java: '19' runs-on: ${{ matrix.os }} diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index ca513befe..68e893592 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -27,6 +27,7 @@ Improvement:: * Replace use of deprecated 'numbered' attribute by 'sectnums' (#1123) (@abelsromero) * Expose `source` and `source_lines` use of deprecated 'numbered' in Document interface (#1145) (@abelsromero) * Accept 'null' as valid input (same as empty string) for load and convert String methods (#1148) (@abelsromero) +* Set Java 11 as the minimal version (#1151) (@abelsromero) Bug Fixes:: diff --git a/asciidoctorj-springboot-integration-test/build.gradle b/asciidoctorj-springboot-integration-test/build.gradle index 4e5aaab2d..4c23b843c 100644 --- a/asciidoctorj-springboot-integration-test/build.gradle +++ b/asciidoctorj-springboot-integration-test/build.gradle @@ -11,8 +11,3 @@ dependencies { } test.dependsOn(':asciidoctorj-springboot-integration-test:springboot-app:assemble') - -tasks.withType(JavaCompile).configureEach { task -> - task.options.release = 17 -} - diff --git a/asciidoctorj-springboot-integration-test/springboot-app/build.gradle b/asciidoctorj-springboot-integration-test/springboot-app/build.gradle index d2d677950..30da0b09d 100644 --- a/asciidoctorj-springboot-integration-test/springboot-app/build.gradle +++ b/asciidoctorj-springboot-integration-test/springboot-app/build.gradle @@ -1,6 +1,7 @@ +import org.springframework.boot.gradle.plugin.SpringBootPlugin + plugins { - id 'org.springframework.boot' version '3.0.0' - id 'io.spring.dependency-management' version '1.1.0' + id 'org.springframework.boot' version '3.0.4' id 'java' } @@ -13,14 +14,18 @@ repositories { dependencies { implementation project(':asciidoctorj') + + implementation platform(SpringBootPlugin.BOM_COORDINATES) implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-actuator' testImplementation 'org.springframework.boot:spring-boot-starter-test' } -tasks.withType(JavaCompile).configureEach { task -> - task.options.release = 17 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } } bootJar { diff --git a/build.gradle b/build.gradle index 639eab799..706e67d12 100644 --- a/build.gradle +++ b/build.gradle @@ -113,9 +113,6 @@ subprojects { plugins.withType(JavaPlugin) { project.tasks.withType(JavaCompile) { task -> - if (JavaVersion.current().isJava11Compatible()) { - task.options.release = 8 - } if (project.hasProperty("showDeprecation")) { options.compilerArgs << "-Xlint:deprecation" } @@ -123,11 +120,6 @@ subprojects { options.compilerArgs << "-Xlint:unchecked" } } - project.tasks.withType(GroovyCompile) { task -> - if (JavaVersion.current().isJava11Compatible()) { - task.options.release = 8 - } - } } repositories { @@ -201,7 +193,6 @@ configure(subprojects.findAll { !it.isDistribution() }) { javadoc { // Oracle JDK8 likes to fail the build over spoiled HTML options.addStringOption('Xdoclint:none', '-quiet') - options.source('8') } } @@ -210,6 +201,9 @@ configure(subprojects.findAll { !it.name.endsWith('-distribution') && ! it.name. java { withJavadocJar() withSourcesJar() + toolchain { + languageVersion.set(JavaLanguageVersion.of(11)) + } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fc10b601f..bdc9a83b1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists