Upgrade gradle to the latest version 7.6
Upgrade Spring Boot to 3.0.0
Run test with Java 19
MODIFY
.github/workflows/continuous-integration.yaml
.github/workflows/continuous-integration.yaml
@@ -21,9 +21,15 @@ jobs:
- '8'
- '11'
- '17'
+ - '19'
os:
- ubuntu-latest
- macos-latest
+ exclude:
+ - os: macos-latest
+ java: '8'
+ - os: macos-latest
+ java: '19'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

MODIFY
asciidoctorj-springboot-integration-test/build.gradle
asciidoctorj-springboot-integration-test/build.gradle
@@ -11,3 +11,12 @@ dependencies {
}
test.dependsOn(':asciidoctorj-springboot-integration-test:springboot-app:assemble')
+
+tasks.withType(JavaCompile).configureEach { task ->
+ task.options.release = 17
+}
+
+test {
+ testLogging.showStandardStreams true
+}
+

MODIFY
asciidoctorj-springboot-integration-test/springboot-app/build.gradle
asciidoctorj-springboot-integration-test/springboot-app/build.gradle
plugins {
- id 'org.springframework.boot' version '2.6.5'
- id 'io.spring.dependency-management' version '1.0.11.RELEASE'
+ id 'org.springframework.boot' version '3.0.0'
+ id 'io.spring.dependency-management' version '1.1.0'
id 'java'
}
group = 'org.asciidoctor.it'
version = '0.0.1-SNAPSHOT'
-sourceCompatibility = '1.8'
repositories {
mavenCentral()
@@ -20,6 +19,10 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
+tasks.withType(JavaCompile).configureEach { task ->
+ task.options.release = 17
+}
+
bootJar {
requiresUnpack '**/asciidoctorj-*.jar'
}

MODIFY
asciidoctorj-springboot-integration-test/springboot-app/src/main/java/org/asciidoctor/it/springboot/AsciidoctorService.java
asciidoctorj-springboot-integration-test/springboot-app/src/main/java/org/asciidoctor/it/springboot/AsciidoctorService.java
package org.asciidoctor.it.springboot;
import org.asciidoctor.Asciidoctor;
-import org.asciidoctor.OptionsBuilder;
+import org.asciidoctor.Options;
import org.asciidoctor.SafeMode;
import org.springframework.stereotype.Component;
@@ -15,11 +15,12 @@ public class AsciidoctorService {
return asciidoctor.convert(source, defaultOptions());
}
- private OptionsBuilder defaultOptions() {
- return OptionsBuilder.options()
+ private Options defaultOptions() {
+ return Options.builder()
.backend("html5")
.safe(SafeMode.SAFE)
.headerFooter(true)
- .toFile(false);
+ .toFile(false)
+ .build();
}
}

MODIFY
gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.jar
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ

MODIFY
gradle/wrapper/gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
+networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

MODIFY
gradlew
gradlew
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
esac
done
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-APP_NAME="Gradle"
+# This is normally unused
+# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac

MODIFY
gradlew.bat
gradlew.bat
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

MODIFY
settings.gradle
settings.gradle
@@ -7,9 +7,13 @@ include \
'asciidoctorj-distribution',
'asciidoctorj-documentation',
'asciidoctorj-wildfly-integration-test',
- 'asciidoctorj-springboot-integration-test',
- 'asciidoctorj-springboot-integration-test:springboot-app',
'asciidoctorj-test-support'
+if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
+ include \
+ 'asciidoctorj-springboot-integration-test',
+ 'asciidoctorj-springboot-integration-test:springboot-app'
+}
+
project(':asciidoctorj').projectDir = file('asciidoctorj-core')

Upgrade gradle to the latest version 7.6
Upgrade Spring Boot to 3.0.0
Run test with Java 19