Skip to content

Commit 720bd16

Browse files
committed
Update to GraphQL Java v21.0 and add Java toolchain
1 parent 868bf16 commit 720bd16

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

build.gradle

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +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"
43+
api "com.graphql-java:graphql-java:21.0"
44+
// todo: upgrade to 21.0
4945
api "com.graphql-java:graphql-java-extended-scalars:20.0"
5046
api "org.hibernate.validator:hibernate-validator:7.0.1.Final"
5147
api "org.glassfish:jakarta.el:4.0.2"
@@ -91,7 +87,7 @@ publishing {
9187
asNode().children().last() + {
9288
resolveStrategy = Closure.DELEGATE_FIRST
9389
name 'graphql-java-extended-validation'
94-
description 'A library fo extended validation for graphql-java'
90+
description 'A library of extended validation for graphql-java'
9591
url 'https://github.com/graphql-java/graphql-java-extended-validation'
9692
inceptionYear '2019'
9793

@@ -137,9 +133,7 @@ signing {
137133
sign publishing.publications
138134
}
139135

140-
141136
// all publish tasks depend on the build task
142137
tasks.withType(PublishToMavenRepository) {
143138
dependsOn build
144139
}
145-

0 commit comments

Comments
 (0)