Skip to content

Commit fde06da

Browse files
authored
Merge pull request #89 from graphql-java/v21-update
Upgrade GraphQL Java to v21.0, Gradle to 8.3, Extended Scalars to v21.0
2 parents 34df7d3 + 7ec4ffd commit fde06da

File tree

8 files changed

+110
-114
lines changed

8 files changed

+110
-114
lines changed

.github/workflows/master.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ jobs:
1313
MAVEN_CENTRAL_PGP_KEY: ${{ secrets.MAVEN_CENTRAL_PGP_KEY }}
1414

1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v3
1717
- uses: gradle/wrapper-validation-action@v1
1818
- name: Set up JDK 11
19-
uses: actions/setup-java@v1
19+
uses: actions/setup-java@v3
2020
with:
21-
java-version: '11.0.17'
21+
java-version: '11'
22+
distribution: 'corretto'
2223
- name: build test and publish
2324
run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace

.github/workflows/pull_request.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ jobs:
1111
buildAndTest:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v3
1515
- uses: gradle/wrapper-validation-action@v1
1616
- name: Set up JDK 11
17-
uses: actions/setup-java@v1
17+
uses: actions/setup-java@v3
1818
with:
19-
java-version: '11.0.17'
19+
java-version: '11'
20+
distribution: 'corretto'
2021
- name: build and test
2122
run: ./gradlew assemble && ./gradlew check --info --stacktrace

.github/workflows/release.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ jobs:
1717
RELEASE_VERSION: ${{ github.event.inputs.version }}
1818

1919
steps:
20-
- uses: actions/checkout@v1
20+
- uses: actions/checkout@v3
2121
- uses: gradle/wrapper-validation-action@v1
2222
- name: Set up JDK 11
23-
uses: actions/setup-java@v1
23+
uses: actions/setup-java@v3
2424
with:
25-
java-version: '11.0.17'
25+
java-version: '11'
26+
distribution: 'corretto'
2627
- name: build test and publish
2728
run: ./gradlew assemble && ./gradlew check --info && ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -x check --info --stacktrace

build.gradle

+7-14
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,25 @@ def getDevelopmentVersion() {
2323
"0.0.0-" + new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date()) + "-" + gitHash
2424
}
2525

26-
2726
def releaseVersion = System.env.RELEASE_VERSION
2827
version = releaseVersion ? releaseVersion : getDevelopmentVersion()
2928
println "Building version = " + version
3029
group = 'com.graphql-java'
3130

32-
if (JavaVersion.current() != JavaVersion.VERSION_11) {
33-
def msg = String.format("This build must be run with Java 11 - you are running %s - gradle finds the JDK via JAVA_HOME=%s",
34-
JavaVersion.current(), System.getenv("JAVA_HOME"))
35-
throw new GradleException(msg)
31+
java {
32+
toolchain {
33+
languageVersion = JavaLanguageVersion.of(11)
34+
}
3635
}
3736

38-
sourceCompatibility = JavaVersion.VERSION_11.toString()
39-
targetCompatibility = JavaVersion.VERSION_11.toString()
40-
4137
repositories {
4238
mavenCentral()
4339
mavenLocal()
4440
}
4541

46-
4742
dependencies {
48-
api "com.graphql-java:graphql-java:20.0"
49-
api "com.graphql-java:graphql-java-extended-scalars:20.0"
43+
api "com.graphql-java:graphql-java:21.0"
44+
api "com.graphql-java:graphql-java-extended-scalars:21.0"
5045
api "org.hibernate.validator:hibernate-validator:7.0.1.Final"
5146
api "org.glassfish:jakarta.el:4.0.2"
5247

@@ -91,7 +86,7 @@ publishing {
9186
asNode().children().last() + {
9287
resolveStrategy = Closure.DELEGATE_FIRST
9388
name 'graphql-java-extended-validation'
94-
description 'A library fo extended validation for graphql-java'
89+
description 'A library of extended validation for graphql-java'
9590
url 'https://github.com/graphql-java/graphql-java-extended-validation'
9691
inceptionYear '2019'
9792

@@ -137,9 +132,7 @@ signing {
137132
sign publishing.publications
138133
}
139134

140-
141135
// all publish tasks depend on the build task
142136
tasks.withType(PublishToMavenRepository) {
143137
dependsOn build
144138
}
145-

gradle/wrapper/gradle-wrapper.jar

333 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ case "`uname`" in
7272
Darwin* )
7373
darwin=true
7474
;;
75-
MINGW* )
75+
MSYS* | MINGW* )
7676
msys=true
7777
;;
7878
NONSTOP* )

gradlew.bat

+89-89
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,89 @@
1-
@rem
2-
@rem Copyright 2015 the original author or authors.
3-
@rem
4-
@rem Licensed under the Apache License, Version 2.0 (the "License");
5-
@rem you may not use this file except in compliance with the License.
6-
@rem You may obtain a copy of the License at
7-
@rem
8-
@rem https://www.apache.org/licenses/LICENSE-2.0
9-
@rem
10-
@rem Unless required by applicable law or agreed to in writing, software
11-
@rem distributed under the License is distributed on an "AS IS" BASIS,
12-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
@rem See the License for the specific language governing permissions and
14-
@rem limitations under the License.
15-
@rem
16-
17-
@if "%DEBUG%" == "" @echo off
18-
@rem ##########################################################################
19-
@rem
20-
@rem Gradle startup script for Windows
21-
@rem
22-
@rem ##########################################################################
23-
24-
@rem Set local scope for the variables with windows NT shell
25-
if "%OS%"=="Windows_NT" setlocal
26-
27-
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
29-
set APP_BASE_NAME=%~n0
30-
set APP_HOME=%DIRNAME%
31-
32-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34-
35-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37-
38-
@rem Find java.exe
39-
if defined JAVA_HOME goto findJavaFromJavaHome
40-
41-
set JAVA_EXE=java.exe
42-
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44-
45-
echo.
46-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47-
echo.
48-
echo Please set the JAVA_HOME variable in your environment to match the
49-
echo location of your Java installation.
50-
51-
goto fail
52-
53-
:findJavaFromJavaHome
54-
set JAVA_HOME=%JAVA_HOME:"=%
55-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56-
57-
if exist "%JAVA_EXE%" goto execute
58-
59-
echo.
60-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61-
echo.
62-
echo Please set the JAVA_HOME variable in your environment to match the
63-
echo location of your Java installation.
64-
65-
goto fail
66-
67-
:execute
68-
@rem Setup the command line
69-
70-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71-
72-
73-
@rem Execute Gradle
74-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75-
76-
:end
77-
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79-
80-
:fail
81-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82-
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
85-
86-
:mainEnd
87-
if "%OS%"=="Windows_NT" endlocal
88-
89-
:omega
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
17+
@if "%DEBUG%" == "" @echo off
18+
@rem ##########################################################################
19+
@rem
20+
@rem Gradle startup script for Windows
21+
@rem
22+
@rem ##########################################################################
23+
24+
@rem Set local scope for the variables with windows NT shell
25+
if "%OS%"=="Windows_NT" setlocal
26+
27+
set DIRNAME=%~dp0
28+
if "%DIRNAME%" == "" set DIRNAME=.
29+
set APP_BASE_NAME=%~n0
30+
set APP_HOME=%DIRNAME%
31+
32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
35+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37+
38+
@rem Find java.exe
39+
if defined JAVA_HOME goto findJavaFromJavaHome
40+
41+
set JAVA_EXE=java.exe
42+
%JAVA_EXE% -version >NUL 2>&1
43+
if "%ERRORLEVEL%" == "0" goto execute
44+
45+
echo.
46+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47+
echo.
48+
echo Please set the JAVA_HOME variable in your environment to match the
49+
echo location of your Java installation.
50+
51+
goto fail
52+
53+
:findJavaFromJavaHome
54+
set JAVA_HOME=%JAVA_HOME:"=%
55+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56+
57+
if exist "%JAVA_EXE%" goto execute
58+
59+
echo.
60+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61+
echo.
62+
echo Please set the JAVA_HOME variable in your environment to match the
63+
echo location of your Java installation.
64+
65+
goto fail
66+
67+
:execute
68+
@rem Setup the command line
69+
70+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71+
72+
73+
@rem Execute Gradle
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75+
76+
:end
77+
@rem End local scope for the variables with windows NT shell
78+
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
80+
:fail
81+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82+
rem the _cmd.exe /c_ return code!
83+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84+
exit /b 1
85+
86+
:mainEnd
87+
if "%OS%"=="Windows_NT" endlocal
88+
89+
:omega

0 commit comments

Comments
 (0)