Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Java 19 by 21 (LTS) in CI #1236

Merged
merged 1 commit into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
java:
- '11'
- '17'
- '19'
- '21'
distribution:
- 'temurin'
os:
- ubuntu-latest
- macos-latest
Expand All @@ -34,7 +36,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-java@v3
with:
distribution: temurin
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Build
run: |
Expand All @@ -50,7 +52,9 @@ jobs:
java:
- '11'
- '17'
- '19'
- '21'
distribution:
- 'temurin'
os:
- windows-latest
runs-on: ${{ matrix.os }}
Expand All @@ -60,7 +64,7 @@ jobs:
fetch-depth: 1
- uses: actions/setup-java@v3
with:
distribution: temurin
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Assemble
shell: cmd
Expand Down Expand Up @@ -100,10 +104,11 @@ jobs:
java:
- '11'
- '17'
- '21'
os:
- ubuntu-latest
maven:
- '3.9.1'
- '3.9.4'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Build Improvement::
* Removed pollutedTest Gradle task using junit-pioneer (#1193) (@abelsromero)
* Ignore 'docs/**' changes in CI (#1225) (@abelsromero)
* Add test for ensuring that asciidoctor version is available in CLI (#1230) (@abelsromero)
* Run tests on Java 21 (#1236) (@abelsromero)

Documentation::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.springframework.boot.gradle.plugin.SpringBootPlugin

plugins {
id 'org.springframework.boot' version '3.1.0'
id 'org.springframework.boot' version '3.1.5'
id 'java'
}

Expand Down Expand Up @@ -31,8 +31,8 @@ java {

def getToolchainVersion() {
if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_19))
return 19
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21))
return 21
}
return 17
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ configure(subprojects.findAll { !it.name.endsWith('-distribution') && ! it.name.
// Windows workaround to fix invalid toolchain detection
def getToolchainVersion() {
if (DefaultNativePlatform.getCurrentOperatingSystem().isWindows()) {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_19))
return 19
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_21))
return 21
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17))
return 17
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
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"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# 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"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down