Skip to content
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
154 changes: 29 additions & 125 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
// maven { url "https://dl.bintray.com/graphql-java-kickstart/releases" }
// maven { url "https://plugins.gradle.org/m2/" }
// maven { url 'https://repo.spring.io/plugins-release' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://repo.spring.io/plugins-release' }
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+"
Expand All @@ -36,14 +34,13 @@ plugins {
id 'net.researchgate.release' version '2.7.0'
id 'io.franzbecker.gradle-lombok' version '3.2.0' apply false
id "com.jfrog.artifactory" version "4.11.0" apply false
id "biz.aQute.bnd.builder" version "5.0.0" apply false
id "biz.aQute.bnd.builder" version "6.3.1" apply false
}

subprojects {
apply plugin: 'idea'
apply plugin: 'java'
// 要执行子build.gradle中的uploadArchives,得加入maven插件
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: "com.jfrog.bintray"
apply plugin: 'io.franzbecker.gradle-lombok'
Expand All @@ -52,9 +49,7 @@ subprojects {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://dl.bintray.com/graphql-java-kickstart/releases" }
maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://repo.spring.io/libs-milestone" }
}

Expand All @@ -73,133 +68,42 @@ subprojects {
compileJava.dependsOn(processResources)

lombok {
version = "1.18.4"
version = "1.18.24"
sha256 = ""
}

task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}

if (!it.name.startsWith('example')) {

jar {
from "LICENSE.md"
}

task sourcesJar(type: Jar) {
dependsOn classes
classifier 'sources'
from sourceSets.main.allSource
}

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

artifacts {
archives sourcesJar
archives javadocJar
}

afterEvaluate {
publishing {
publications {
mainProjectPublication(MavenPublication) {
version version
from components.java

artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}

pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name PROJECT_NAME
description 'relay.js-compatible GraphQL servlet'
url 'https://github.com/graphql-java-kickstart/graphql-java-servlet'
inceptionYear '2016'

scm {
url 'https://github.com/graphql-java-kickstart/graphql-java-servlet'
connection 'scm:https://github.com/graphql-java-kickstart/graphql-java-servlet.git'
developerConnection 'scm:git://github.com/graphql-java-kickstart/graphql-java-servlet.git'
}

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

developers {
developer {
id 'yrashk'
name 'Yurii Rashkovskii'
email '[email protected]'
}
developer {
id 'apottere'
name 'Andrew Potter'
email '[email protected]'
}
}
snapshot(MavenPublication) {
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
// https://discuss.gradle.org/t/maven-publish-plugin-generated-pom-making-dependency-scope-runtime/7494/10
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each { it.scope*.value = 'compile'}
}
groupId = 'com.graphql-java-kickstart'
version = version
artifact sourcesJar
from components.java
}
}
}

bintray {
user = System.env.BINTRAY_USER ?: project.findProperty('BINTRAY_USER') ?: ''
key = System.env.BINTRAY_PASS ?: project.findProperty('BINTRAY_PASS') ?: ''
publications = ['mainProjectPublication']
publish = true
pkg {
repo = 'releases'
name = PROJECT_NAME
desc = PROJECT_DESC
licenses = [PROJECT_LICENSE]
vcsUrl = PROJECT_GIT_REPO_URL
userOrg = 'graphql-java-kickstart'
version {
name = project.version
mavenCentralSync {
close = '1'
repositories {
maven {
name = "snapshot"
credentials {
username = System.env.NEXUS_USERNAME ?: project.findProperty('NEXUS_PASSWORD') ?: ''
password = System.env.NEXUS_PASSWORD ?: project.findProperty('NEXUS_PASSWORD') ?: ''
}
}
}
}

artifactory {
contextUrl = 'https://oss.jfrog.org'
publish {
repository {
repoKey = 'oss-snapshot-local'

username = System.env.BINTRAY_USER ?: System.getProperty('BINTRAY_USER')
password = System.env.BINTRAY_PASS ?: System.getProperty('BINTRAY_PASS')

maven = true
}
defaults {
publications 'maven'
publishArtifacts = true
publishPom = true
}
}
resolve {
repository {
repoKey = 'jcenter'
allowInsecureProtocol true
url = 'https://nexus.8btc-ops.com/repository/maven-snapshots/'
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 9.1.0.OnePiece.1
version = 9.1.0.2-SNAPSHOT
group = com.graphql-java-kickstart

PROJECT_NAME = graphql-java-servlet
Expand All @@ -12,7 +12,9 @@ PROJECT_DEV_NAME = Andrew Potter
LIB_GRAPHQL_JAVA_VER = 14.1
LIB_JACKSON_VER = 2.10.0

SOURCE_COMPATIBILITY = 1.8
TARGET_COMPATIBILITY = 1.8
SOURCE_COMPATIBILITY = 17
TARGET_COMPATIBILITY = 17

GRADLE_WRAPPER_VER = 6.0.1
LIB_SLF4J_VER = 2.0.2
systemProp.org.gradle.internal.publish.checksums.insecure=true
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 @@
#Thu Nov 14 18:53:34 CET 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
14 changes: 8 additions & 6 deletions graphql-java-kickstart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ jar {
bndfile = 'bnd.bnd'
}

apply plugin: 'java-library-distribution'

dependencies {
// GraphQL
compile "com.graphql-java:graphql-java:$LIB_GRAPHQL_JAVA_VER"
api "com.graphql-java:graphql-java:$LIB_GRAPHQL_JAVA_VER"

// JSON
compile "com.fasterxml.jackson.core:jackson-core:$LIB_JACKSON_VER"
compile "com.fasterxml.jackson.core:jackson-annotations:$LIB_JACKSON_VER"
compile "com.fasterxml.jackson.core:jackson-databind:$LIB_JACKSON_VER"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$LIB_JACKSON_VER"
}
api "com.fasterxml.jackson.core:jackson-core:$LIB_JACKSON_VER"
api "com.fasterxml.jackson.core:jackson-annotations:$LIB_JACKSON_VER"
api "com.fasterxml.jackson.core:jackson-databind:$LIB_JACKSON_VER"
api "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$LIB_JACKSON_VER"
}
25 changes: 13 additions & 12 deletions graphql-java-servlet/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
buildscript {
repositories {
jcenter()
mavenCentral()
}
}
Expand All @@ -17,8 +16,10 @@ dependencies {
api(project(':graphql-java-kickstart'))

// Servlet
compile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'javax.websocket:javax.websocket-api:1.1'
api 'jakarta.servlet:jakarta.servlet-api:6.0.0'
api 'jakarta.websocket:jakarta.websocket-api:2.1.0'
api 'jakarta.websocket:jakarta.websocket-client-api:2.1.0'
implementation "org.slf4j:slf4j-api:$LIB_SLF4J_VER"

// OSGi
compileOnly 'org.osgi:org.osgi.core:6.0.0'
Expand All @@ -28,15 +29,15 @@ dependencies {
compileOnly 'org.osgi:org.osgi.service.metatype.annotations:1.3.0'
compileOnly 'org.osgi:org.osgi.annotation:6.0.0'

testCompile 'io.github.graphql-java:graphql-java-annotations:5.2'
testImplementation 'io.github.graphql-java:graphql-java-annotations:5.2'

// Unit testing
testCompile "org.codehaus.groovy:groovy-all:2.4.1"
testCompile "org.spockframework:spock-core:1.1-groovy-2.4-rc-3"
testRuntime "cglib:cglib-nodep:3.2.4"
testRuntime "org.objenesis:objenesis:2.5.1"
testCompile 'org.slf4j:slf4j-simple:1.7.24'
testCompile 'org.springframework:spring-test:4.3.7.RELEASE'
testRuntime 'org.springframework:spring-web:4.3.7.RELEASE'
testCompile 'com.google.guava:guava:24.1.1-jre'
testImplementation "org.apache.groovy:groovy-all:4.0.6"
testImplementation "org.spockframework:spock-core:2.3-groovy-4.0"
testRuntimeOnly "cglib:cglib-nodep:3.3.0"
testRuntimeOnly "org.objenesis:objenesis:3.3"
testImplementation "org.slf4j:slf4j-simple:$LIB_SLF4J_VER"
testImplementation 'org.springframework:spring-test:6.0.2'
testRuntimeOnly 'org.springframework:spring-web:6.0.2'
testImplementation 'com.google.guava:guava:31.1-jre'
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.servlet.AsyncContext;
import javax.servlet.Servlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.AsyncContext;
import jakarta.servlet.Servlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package graphql.kickstart.servlet;

import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.io.Writer;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
import javax.servlet.AsyncContext;
import jakarta.servlet.AsyncContext;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import graphql.kickstart.execution.input.GraphQLInvocationInput;
import graphql.kickstart.servlet.input.GraphQLInvocationInputFactory;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

interface GraphQLInvocationInputParser {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.Part;
import lombok.extern.slf4j.Slf4j;

@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import graphql.kickstart.servlet.input.GraphQLInvocationInputFactory;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

class GraphQLPostInvocationInputParser extends AbstractGraphQLInvocationInputParser {

Expand Down
Loading