Skip to content

Upgrade to GraphQL-Java 21 & Gradle 8.3 #295

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

Merged
merged 2 commits into from
Sep 6, 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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
environment: prod
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '11'
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
49 changes: 28 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import aQute.bnd.gradle.Bundle
import io.github.gradlenexus.publishplugin.NexusRepository

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.1.2'
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:6.4.0'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
}
}
plugins {
id 'net.researchgate.release' version '2.8.1'
id 'com.github.hierynomus.license' version '0.15.0'
id 'net.researchgate.release' version '3.0.2'
id 'com.github.hierynomus.license' version '0.16.1'
id 'maven-publish'
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
}

apply plugin: 'java'
Expand All @@ -24,13 +25,15 @@ apply plugin: 'maven-publish'


// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
tasks.register('sourcesJar', Jar) {
dependsOn classes
archiveClassifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
tasks.register('javadocJar', Jar) {
dependsOn javadoc
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

Expand All @@ -45,28 +48,30 @@ repositories {
}

gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
doLast {
options.compilerArgs += "-parameters"
tasks.withType(JavaCompile).tap {
configureEach {
doLast {
options.compilerArgs += "-parameters"
}
}
}
}

dependencies {
compile 'javax.validation:validation-api:1.1.0.Final'
compile 'com.graphql-java:graphql-java:20.4'
compile 'com.graphql-java:graphql-java-extended-scalars:20.2'
compile 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'javax.validation:validation-api:1.1.0.Final'
implementation 'com.graphql-java:graphql-java:21.1'
implementation 'com.graphql-java:graphql-java-extended-scalars:21.0'
implementation 'javax.xml.bind:jaxb-api:2.3.1'

// OSGi
compileOnly 'org.osgi:org.osgi.core:6.0.0'
compileOnly 'org.osgi:org.osgi.service.cm:1.5.0'
compileOnly 'org.osgi:org.osgi.service.component:1.3.0'
compileOnly 'biz.aQute.bnd:biz.aQute.bndlib:3.2.0'

testCompile 'org.testng:testng:6.9.10'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.mockito:mockito-core:2.+'
testImplementation 'org.testng:testng:7.5.1'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.mockito:mockito-core:2.+'
}

test.useTestNG()
Expand Down Expand Up @@ -158,11 +163,13 @@ signing {
sign publishing.publications
}

task bundle(type: Bundle) {
tasks.register('bundle', Bundle) {
from sourceSets.main.output
bndfile = file('bundle.bnd')
bundle {
bndfile = project.file('bundle.bnd')
}
}

wrapper {
gradleVersion = '6.5.1'
gradleVersion = '8.3'
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8

version = 20.3
version = 21.1
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 4 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand Down Expand Up @@ -81,6 +84,7 @@ set CMD_LINE_ARGS=%*

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

Expand Down