Skip to content

Commit 276dbcb

Browse files
Merge pull request #4 from Nosto/upgrade-nosto
Upgrade nosto
2 parents 3674ab7 + af98cba commit 276dbcb

36 files changed

+200
-423
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Build
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK 8
14+
uses: actions/setup-java@v2
15+
with:
16+
java-version: '8'
17+
distribution: 'adopt'
18+
- name: Grant execute permission for gradlew
19+
run: chmod +x gradlew
20+
- name: Build with Gradle
21+
run: ./gradlew build
22+
- name: Publish Test Report
23+
uses: mikepenz/action-junit-report@v2
24+
if: always() # always run even if the previous step fails
25+
with:
26+
report_paths: '**/build/test-results/test/TEST-*.xml'

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Publish
5+
6+
on:
7+
workflow_dispatch:
8+
branches: [ master ]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
environment: prod
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up JDK 8
17+
uses: actions/setup-java@v2
18+
with:
19+
java-version: '8'
20+
distribution: 'adopt'
21+
- name: Grant execute permission for gradlew
22+
run: chmod +x gradlew
23+
- name: Build with Gradle
24+
run: ./gradlew build
25+
- name: Publish with Gradle
26+
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
27+
env:
28+
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }}
29+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
30+
MAVEN_CENTRAL_PGP_KEY: ${{ secrets.MAVEN_CENTRAL_PGP_KEY }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If you would like to use a tool that creates a graphql spring boot server using
3737

3838
```groovy
3939
dependencies {
40-
compile "io.github.graphql-java:graphql-java-annotations:8.3"
40+
compile "io.github.graphql-java:graphql-java-annotations:9.1-nosto"
4141
}
4242
```
4343

@@ -47,7 +47,7 @@ dependencies {
4747
<dependency>
4848
<groupId>io.github.graphql-java</groupId>
4949
<artifactId>graphql-java-annotations</artifactId>
50-
<version>8.3</version>
50+
<version>9.1-nosto</version>
5151
</dependency>
5252
```
5353

azure-pipelines.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

build.gradle

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,26 @@ import aQute.bnd.gradle.Bundle
22

33
buildscript {
44
repositories {
5-
jcenter()
65
mavenCentral()
76
}
87
dependencies {
98
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.1.2'
9+
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
1010
}
1111
}
1212
plugins {
13-
id 'com.jfrog.bintray' version '1.8.5'
1413
id 'net.researchgate.release' version '2.8.1'
1514
id 'com.github.hierynomus.license' version '0.15.0'
15+
id 'maven-publish'
16+
id 'signing'
17+
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
1618
}
1719

1820
apply plugin: 'java'
1921
apply plugin: 'idea'
20-
2122
apply plugin: 'biz.aQute.bnd.builder'
22-
apply plugin: 'com.jfrog.bintray'
2323
apply plugin: 'maven-publish'
2424

25-
//def releaseVersion = System.properties.RELEASE_VERSION
26-
//version = releaseVersion ? releaseVersion : new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date())
2725

2826
// custom tasks for creating source/javadoc jars
2927
task sourcesJar(type: Jar, dependsOn: classes) {
@@ -56,18 +54,17 @@ gradle.projectsEvaluated {
5654

5755
dependencies {
5856
compile 'javax.validation:validation-api:1.1.0.Final'
59-
compile 'com.graphql-java:graphql-java:16.2'
60-
implementation "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
61-
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
62-
57+
compile 'com.graphql-java:graphql-java:17.4'
58+
compile 'com.graphql-java:graphql-java-extended-scalars:17.0'
59+
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2'
6360

6461
// OSGi
6562
compileOnly 'org.osgi:org.osgi.core:6.0.0'
6663
compileOnly 'org.osgi:org.osgi.service.cm:1.5.0'
6764
compileOnly 'org.osgi:org.osgi.service.component:1.3.0'
6865
compileOnly 'biz.aQute.bnd:biz.aQute.bndlib:3.2.0'
6966

70-
testCompile 'org.testng:testng:6.9.10'
67+
testCompile 'org.testng:testng:7.4.0'
7168
testCompile 'org.hamcrest:hamcrest-all:1.3'
7269
testCompile 'org.mockito:mockito-core:2.+'
7370
testCompile 'com.google.guava:guava:30.0-jre'
@@ -144,36 +141,24 @@ publishing {
144141
}
145142
}
146143

147-
afterReleaseBuild.dependsOn bintrayUpload
148-
149-
bintray {
150-
user = System.getenv('BINTRAY_USER') ?: project.findProperty('BINTRAY_USER') ?: ''
151-
key = System.getenv('BINTRAY_KEY') ?: project.findProperty('BINTRAY_KEY') ?: ''
152-
publications = ['maven']
153-
publish = true
154-
pkg {
155-
desc = 'This library offers an annotations-based syntax for GraphQL schema definition.'
156-
repo = 'graphql-java-annotations'
157-
name = 'graphql-java-annotations'
158-
licenses = ['Apache-2.0']
159-
vcsUrl = 'https://github.com/graphql-java/graphql-java-annotations'
160-
version {
161-
name = project.version
162-
released = new Date()
163-
gpg {
164-
sign = false
165-
}
166-
mavenCentralSync {
167-
sync = true //[Default: true] Determines whether to sync the version to Maven Central..
168-
user = System.getenv('OSS_USER') ?: project.findProperty('OSS_USER') ?: ''
169-
password = System.getenv('OSS_PASS') ?: project.findProperty('OSS_PASS') ?: ''
170-
close = '1'
171-
//Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
172-
}
144+
afterReleaseBuild.dependsOn nexusPublishing
145+
146+
nexusPublishing {
147+
repositories {
148+
sonatype {
149+
username = System.getenv("MAVEN_CENTRAL_USER")
150+
password = System.getenv("MAVEN_CENTRAL_PASSWORD")
173151
}
174152
}
175153
}
176154

155+
// to publish to local maven repo skip signing: ./gradlew publishToMavenLocal -x signGraphqlJavaPublication
156+
signing {
157+
def signingKey = System.getenv("MAVEN_CENTRAL_PGP_KEY")
158+
useInMemoryPgpKeys(signingKey, "")
159+
sign publishing.publications
160+
}
161+
177162
task bundle(type: Bundle) {
178163
from sourceSets.main.output
179164
bndfile = file('bundle.bnd')

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ org.gradle.daemon=true
55
org.gradle.parallel=true
66
org.gradle.jvmargs=-Dfile.encoding=UTF-8
77

8-
version = 8.3-nosto2
8+
version = 9.1-nosto
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Mon Nov 30 23:20:00 EET 2020
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
31
distributionBase=GRADLE_USER_HOME
42
distributionPath=wrapper/dists
5-
zipStorePath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
64
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

src/main/java/graphql/annotations/annotationTypes/GraphQLBatched.java

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/main/java/graphql/annotations/dataFetchers/BatchedMethodDataFetcher.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/main/java/graphql/annotations/dataFetchers/GraphQLUndefined.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,39 @@
1212
*/
1313
package graphql.annotations.dataFetchers;
1414

15+
import graphql.schema.GraphQLList;
1516
import graphql.schema.GraphQLSchemaElement;
1617
import graphql.schema.GraphQLType;
1718
import graphql.schema.GraphQLTypeVisitor;
19+
import graphql.schema.SchemaElementChildrenContainer;
1820
import graphql.util.TraversalControl;
1921
import graphql.util.TraverserContext;
2022

23+
import java.util.List;
24+
2125
public class GraphQLUndefined implements GraphQLType {
26+
@Override
27+
public List<GraphQLSchemaElement> getChildren() {
28+
return GraphQLType.super.getChildren();
29+
}
30+
31+
@Override
32+
public SchemaElementChildrenContainer getChildrenWithTypeReferences() {
33+
return GraphQLType.super.getChildrenWithTypeReferences();
34+
}
35+
36+
@Override
37+
public GraphQLSchemaElement withNewChildren(SchemaElementChildrenContainer newChildren) {
38+
return GraphQLType.super.withNewChildren(newChildren);
39+
}
40+
2241
@Override
2342
public TraversalControl accept(TraverserContext<GraphQLSchemaElement> context, GraphQLTypeVisitor visitor) {
2443
return null;
2544
}
45+
46+
@Override
47+
public GraphQLSchemaElement copy() {
48+
return new GraphQLUndefined();
49+
}
2650
}

0 commit comments

Comments
 (0)