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

Let ID be every type - upgrade gradle and dependencies #1

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
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
30 changes: 0 additions & 30 deletions .github/workflows/publish.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@

name: Build

on: [push, pull_request]
on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'zulu'
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
run: ./gradlew test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
if: always() # always run even if the previous step fails
Expand Down
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ syntax for GraphQL schema definition.

If you would like to use a tool that creates a graphql spring boot server using graphql-java-annotations, you can view the [graphql-spring-annotations](https://github.com/yarinvak/graphql-spring-annotations) library.

## Forked to ...

- Upgrade graphql java (20.3)
- Update build tools and dependencies in general
- Fix `id` to allow to be of any type, since this is the GraphQL specsq

Yet this package is not published anywhere. Let us know if that is interesting to anybody.

## Table Of Contents
- [Getting Started](#getting-started)
Expand Down Expand Up @@ -37,7 +44,7 @@ If you would like to use a tool that creates a graphql spring boot server using

```groovy
dependencies {
compile "io.github.graphql-java:graphql-java-annotations:9.1"
compile "io.github.graphql-java:graphql-java-annotations:20.3.0-kw1"
}
```

Expand All @@ -47,7 +54,7 @@ dependencies {
<dependency>
<groupId>io.github.graphql-java</groupId>
<artifactId>graphql-java-annotations</artifactId>
<version>9.1</version>
<version>20.3.0-kw1</version>
</dependency>
```

Expand Down
9 changes: 9 additions & 0 deletions README.release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Release

```bash
# adjust the version
vim gradle.properties
./gradlew publish
git tag $youversion
git push --tags
````
124 changes: 46 additions & 78 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,28 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.1.2'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:6.4.0'
}
}
plugins {
id 'net.researchgate.release' version '2.8.1'
id 'com.github.hierynomus.license' version '0.15.0'
id 'java'
id 'idea'
id 'maven-publish'
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id 'com.github.hierynomus.license' version '0.16.1'
id "biz.aQute.bnd.builder" version "6.4.0"
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'maven-publish'


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

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

release {
tagTemplate = 'v${version}'
failOnPublishNeeded = false
failOnCommitNeeded = false
}

repositories {
mavenCentral()
}
Expand All @@ -53,20 +40,23 @@ gradle.projectsEvaluated {
}

dependencies {
compile 'javax.validation:validation-api:1.1.0.Final'
compile 'com.graphql-java:graphql-java:17.4'
compile 'com.graphql-java:graphql-java-extended-scalars:17.0'

implementation 'javax.validation:validation-api:2.0.1.Final'
// @see https://mvnrepository.com/artifact/com.graphql-java/graphql-java
implementation 'com.graphql-java:graphql-java:21.3'
// @see https://mvnrepository.com/artifact/com.graphql-java/graphql-java-extended-scalars
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.+'
compileOnly 'org.osgi:osgi.core:8.0.0'
compileOnly 'org.osgi:org.osgi.service.cm:1.6.0'
compileOnly 'org.osgi:org.osgi.service.component:1.5.1'
compileOnly 'biz.aQute.bnd:biz.aQute.bndlib:3.5.0'

testImplementation 'org.testng:testng:7.8.0'
// @see https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.mockito:mockito-core:5.6.0'
}

test.useTestNG()
Expand All @@ -80,20 +70,21 @@ publishing {
version project.version

artifact sourcesJar
artifact javadocJar
// FIXME: does no longer work (most probably gradle 8 related)
// artifact javadocJar

pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'graphql-java-annotations'
description 'Annotations-based syntax for GraphQL schema definition'
url 'https://github.com/graphql-java/graphql-java-annotations'
inceptionYear '2016'
url 'https://github.com/KontextWork/graphql-java-annotations'
inceptionYear '2022'

scm {
url 'https://github.com/graphql-java/graphql-java-annotations'
connection 'scm:https://yrashk@github.com/graphql-java/graphql-java-annotations.git'
developerConnection 'scm:git://github.com/graphql-java/graphql-java-annotations.git'
url 'https://github.com/KontextWork/graphql-java-annotations'
connection 'scm:https://github.com/KontextWork/graphql-java-annotations.git'
developerConnection 'scm:git://github.com/KontextWork/graphql-java-annotations.git'
}

licenses {
Expand All @@ -106,32 +97,14 @@ publishing {

developers {
developer {
id 'yrashk'
name 'Yurii Rashkovskii'
email '[email protected]'
}
developer {
id 'apottere'
name 'Andrew Potter'
email '[email protected]'
}
developer {
id 'bbakerman'
name 'Brad Baker'
email '[email protected]'
}
developer {
id 'yarinvak'
name 'Yarin Vaknin'
email '[email protected]'
}
developer {
id 'guy120494'
name 'Guy Smorodinsky'
id 'tm'
name 'Thomas M.'
email '[email protected]'
}
developer {
id 'osher-sade'
name 'Osher Sade'
id 'em'
name 'Eugen Mayer'
email '[email protected]'
}
}
}
Expand All @@ -140,29 +113,24 @@ publishing {
}
}

afterReleaseBuild.dependsOn nexusPublishing

nexusPublishing {
publishing {
repositories {
sonatype {
username = System.getenv("MAVEN_CENTRAL_USER")
password = System.getenv("MAVEN_CENTRAL_PASSWORD")
maven {
def releasesRepoUrl = "https://nexus.kw.kontextwork.com/repository/kw-maven-release"
def snapshotsRepoUrl = "https://nexus.kw.kontextwork.com/repository/kw-maven-snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
if(project.hasProperty("ourNexusAuthorUser")) {
credentials(PasswordCredentials) {
username "$ourNexusAuthorUser"
password "$ourNexusAuthorPassword"
}
}
}
}
}

// to publish to local maven repo skip signing: ./gradlew publishToMavenLocal -x signGraphqlJavaPublication
signing {
def signingKey = System.getenv("MAVEN_CENTRAL_PGP_KEY")
useInMemoryPgpKeys(signingKey, "")
sign publishing.publications
}

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

wrapper {
gradleVersion = '6.5.1'
}
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 = 9.1
version = 21.3.0-kw1
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
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.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading