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

Upgrade Gradle Wrapper and build against Java 18 #651

Merged
merged 31 commits into from Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2f77469
Upgrade from Gradle Wrapper 7.4 to 7.5
beatngu13 Jul 14, 2022
a3c8760
Upgrade Java version(s)
beatngu13 Jul 14, 2022
12edd78
Include JUnit Jupiter 5.9.0-RC1
beatngu13 Jul 14, 2022
18270b5
Revert "Include JUnit Jupiter 5.9.0-RC1"
beatngu13 Jul 14, 2022
17121f3
Disable envvar demo on Java 17+
beatngu13 Jul 15, 2022
3d03a6f
Replace archived sormuras/download-jdk with oracle-actions/setup-java
beatngu13 Jul 15, 2022
5fee5f0
Use 18 as experimental Java version
beatngu13 Aug 17, 2022
8ad21fb
Disable mixed abstract entry-based tests on Java 17+
beatngu13 Aug 17, 2022
c751e56
Use --add-opens JVM instead of disabling tests on Java 17+
beatngu13 Aug 17, 2022
976832a
Fix documentation for --add-opens
beatngu13 Aug 17, 2022
2789d03
Refactor
beatngu13 Aug 17, 2022
9601940
Sync Javadoc with SetEnvironmentVariable
beatngu13 Aug 17, 2022
d80f22f
Modify JVM args for test and demo
beatngu13 Aug 27, 2022
d383e2c
Add missing module-info directives
beatngu13 Aug 28, 2022
fc2c373
Do whitebox testing with module patching
beatngu13 Aug 28, 2022
b8f47c7
Merge branch 'main' into issue/613-upgrade-gradle-and-pipeline
beatngu13 Aug 28, 2022
d34d55e
Fix Xlint on non-modular builds
beatngu13 Aug 28, 2022
798eb0a
Add Xlint key missing-explicit-ctor only on Java 16+
beatngu13 Aug 28, 2022
30234f8
Add missing provides declarative to test module-info.java
beatngu13 Sep 5, 2022
ae1332e
Replace extractingResultOf with extracting
beatngu13 Sep 5, 2022
8554f9e
Update --add-opens in docs
beatngu13 Sep 5, 2022
2a5f48a
Allow setting SecurityManager on Java 12+
beatngu13 Sep 5, 2022
e68e91d
Changing the java version for gradle for experimental build
aepfli Sep 6, 2022
5973312
Improve description of experimental job
beatngu13 Sep 6, 2022
be7295d
Bump experimental build to 19
Sep 14, 2022
84e6ca8
Add comments to suppressed deprecation warnings
Sep 14, 2022
11e2005
Add comments for our build script quirks
beatngu13 Sep 18, 2022
dd2e5ad
Untangle patching and linting
beatngu13 Sep 18, 2022
ff5cfe4
Improve value extraction
beatngu13 Sep 18, 2022
1c605bd
Set Javadoc language level to 17+
beatngu13 Sep 18, 2022
922cba0
Try without exclude of internal package
beatngu13 Sep 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/build.yml
@@ -1,7 +1,7 @@
name: Main build

env:
EXPERIMENTAL_JAVA: 18
EXPERIMENTAL_JAVA: 19

on:
# We want to trigger our builds all the time for the default branch
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
java: [ 11, 17 ]
java: [ 11, 17, 18 ]
junit-version: [ '5.8.2' ]
modular: [true, false]
os: [ubuntu, macos, windows]
Expand Down Expand Up @@ -156,20 +156,18 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@v2
- uses: sormuras/download-jdk@v1
- name: Set up experimental Java
uses: oracle-actions/setup-java@v1
beatngu13 marked this conversation as resolved.
Show resolved Hide resolved
with:
feature: ${{ env.EXPERIMENTAL_JAVA }}
- uses: actions/setup-java@v2
with:
java-version: ${{ env.JDK_VERSION }}
distribution: jdkfile
jdkFile: ${{ env.JDK_FILE }}
website: jdk.java.net
release: ${{ env.EXPERIMENTAL_JAVA }}
- name: Prepare JDK_EXPERIMENTAL env var
shell: bash
run: echo "JDK_EXPERIMENTAL=$JAVA_HOME" >> $GITHUB_ENV
- uses: actions/setup-java@v2
- name: Set up supported Java
uses: actions/setup-java@v2
with:
java-version: 17
java-version: 18
distribution: temurin
cache: 'gradle'
- name: Gradle toolchains
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
Expand Up @@ -13,7 +13,10 @@
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

@EnabledForJreRange(max = JRE.JAVA_16, disabledReason = "See: https://github.com/junit-pioneer/junit-pioneer/issues/509")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like seeing this annotation in the wild life :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me too - specially as it is my baby :D

public class EnvironmentVariablesExtensionDemo {

// tag::environment_clear_simple[]
Expand Down