Skip to content

Commit 710190b

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # gradle.properties
2 parents f6d4167 + 4d34b40 commit 710190b

File tree

179 files changed

+4357
-3528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+4357
-3528
lines changed

build.gradle

+179-171
Original file line numberDiff line numberDiff line change
@@ -1,213 +1,221 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2016 oEmbedler Inc. and Contributors
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
8+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
9+
* persons to whom the Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
14+
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
*/
19+
120
buildscript {
221
repositories {
3-
jcenter()
22+
mavenLocal()
423
mavenCentral()
24+
jcenter()
25+
maven { url "https://dl.bintray.com/graphql-java-kickstart/releases" }
26+
maven { url "https://plugins.gradle.org/m2/" }
27+
maven { url 'https://repo.spring.io/plugins-release' }
528
}
629
dependencies {
7-
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:3.1.0'
30+
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+"
31+
classpath 'net.researchgate:gradle-release:2.7.0'
832
}
933
}
34+
1035
plugins {
11-
id "com.jfrog.bintray" version "1.8.4"
12-
id "com.jfrog.artifactory" version "4.8.1"
1336
id 'net.researchgate.release' version '2.7.0'
14-
id 'io.franzbecker.gradle-lombok' version '3.1.0'
37+
id 'io.franzbecker.gradle-lombok' version '3.2.0' apply false
38+
id "com.jfrog.artifactory" version "4.11.0" apply false
39+
id "biz.aQute.bnd" version "4.3.1" apply false
1540
}
1641

17-
apply plugin: 'java'
18-
sourceCompatibility = 1.8
19-
targetCompatibility = 1.8
42+
subprojects {
43+
apply plugin: 'idea'
44+
apply plugin: 'java'
45+
apply plugin: 'maven-publish'
46+
apply plugin: "com.jfrog.bintray"
47+
apply plugin: 'io.franzbecker.gradle-lombok'
48+
apply plugin: 'com.jfrog.artifactory'
2049

21-
// Tests
22-
apply plugin: 'groovy'
50+
repositories {
51+
mavenLocal()
52+
mavenCentral()
53+
jcenter()
54+
maven { url "https://dl.bintray.com/graphql-java-kickstart/releases" }
55+
maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local" }
56+
maven { url "https://repo.spring.io/libs-milestone" }
57+
}
2358

24-
repositories {
25-
mavenLocal()
26-
mavenCentral()
27-
}
59+
idea {
60+
module {
61+
downloadJavadoc = true
62+
downloadSources = true
63+
}
64+
}
2865

29-
dependencies {
30-
compile 'org.slf4j:slf4j-api:1.7.21'
31-
32-
// Useful utilities
33-
compile 'com.google.guava:guava:24.1.1-jre'
34-
35-
// Unit testing
36-
testCompile "org.codehaus.groovy:groovy-all:2.4.1"
37-
testCompile "org.spockframework:spock-core:1.1-groovy-2.4-rc-3"
38-
testRuntime "cglib:cglib-nodep:3.2.4"
39-
testRuntime "org.objenesis:objenesis:2.5.1"
40-
testCompile 'org.slf4j:slf4j-simple:1.7.24'
41-
testCompile 'org.springframework:spring-test:4.3.7.RELEASE'
42-
testRuntime 'org.springframework:spring-web:4.3.7.RELEASE'
43-
44-
// OSGi
45-
compileOnly 'org.osgi:org.osgi.core:6.0.0'
46-
compileOnly 'org.osgi:org.osgi.service.cm:1.5.0'
47-
compileOnly 'org.osgi:org.osgi.service.component:1.3.0'
48-
compileOnly 'biz.aQute.bnd:biz.aQute.bndlib:3.1.0'
49-
50-
// Servlet
51-
compile 'javax.servlet:javax.servlet-api:3.1.0'
52-
compile 'javax.websocket:javax.websocket-api:1.1'
53-
54-
// GraphQL
55-
compile "com.graphql-java:graphql-java:$LIB_GRAPHQL_JAVA_VER"
56-
57-
testCompile 'io.github.graphql-java:graphql-java-annotations:5.2'
58-
59-
// JSON
60-
compile "com.fasterxml.jackson.core:jackson-core:$LIB_JACKSON_VER"
61-
compile "com.fasterxml.jackson.core:jackson-annotations:$LIB_JACKSON_VER"
62-
compile "com.fasterxml.jackson.core:jackson-databind:$LIB_JACKSON_VER"
63-
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$LIB_JACKSON_VER"
64-
}
66+
compileJava {
67+
sourceCompatibility = SOURCE_COMPATIBILITY
68+
targetCompatibility = TARGET_COMPATIBILITY
69+
}
70+
71+
compileJava.dependsOn(processResources)
6572

66-
apply plugin: 'osgi'
67-
apply plugin: 'java-library-distribution'
68-
apply plugin: 'biz.aQute.bnd.builder'
69-
apply plugin: 'com.jfrog.bintray'
70-
apply plugin: 'maven-publish'
71-
apply plugin: 'idea'
72-
apply plugin: 'maven'
73-
74-
jar {
75-
manifest {
76-
instruction 'Require-Capability', 'osgi.extender'
73+
lombok {
74+
version = "1.18.4"
75+
sha256 = ""
7776
}
78-
}
7977

80-
// custom tasks for creating source/javadoc jars
81-
task sourcesJar(type: Jar, dependsOn: classes) {
82-
classifier = 'sources'
83-
from sourceSets.main.allSource
84-
}
8578

86-
task javadocJar(type: Jar, dependsOn: javadoc) {
87-
classifier = 'javadoc'
88-
from javadoc.destinationDir
89-
}
79+
if (!it.name.startsWith('example')) {
9080

91-
publishing {
92-
publications {
93-
maven(MavenPublication) {
94-
from components.java
95-
groupId 'com.graphql-java-kickstart'
96-
artifactId project.name
97-
version project.version
98-
99-
artifact sourcesJar
100-
artifact javadocJar
101-
102-
pom.withXml {
103-
asNode().children().last() + {
104-
resolveStrategy = Closure.DELEGATE_FIRST
105-
name 'graphql-java-servlet'
106-
description 'relay.js-compatible GraphQL servlet'
107-
url 'https://github.com/graphql-java-kickstart/graphql-java-servlet'
108-
inceptionYear '2016'
109-
110-
scm {
111-
url 'https://github.com/graphql-java-kickstart/graphql-java-servlet'
112-
connection 'scm:https://github.com/graphql-java-kickstart/graphql-java-servlet.git'
113-
developerConnection 'scm:git://github.com/graphql-java-kickstart/graphql-java-servlet.git'
114-
}
81+
jar {
82+
from "LICENSE.md"
83+
}
11584

116-
licenses {
117-
license {
118-
name 'The Apache Software License, Version 2.0'
119-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
120-
distribution 'repo'
121-
}
85+
task sourcesJar(type: Jar) {
86+
dependsOn classes
87+
classifier 'sources'
88+
from sourceSets.main.allSource
89+
}
90+
91+
task javadocJar(type: Jar, dependsOn: javadoc) {
92+
classifier = 'javadoc'
93+
from javadoc.destinationDir
94+
}
95+
96+
artifacts {
97+
archives sourcesJar
98+
archives javadocJar
99+
}
100+
101+
publishing {
102+
publications {
103+
mainProjectPublication(MavenPublication) {
104+
version version
105+
from components.java
106+
107+
artifact sourcesJar {
108+
classifier "sources"
109+
}
110+
artifact javadocJar {
111+
classifier "javadoc"
122112
}
123113

124-
developers {
125-
developer {
126-
id 'yrashk'
127-
name 'Yurii Rashkovskii'
128-
129-
}
130-
developer {
131-
id 'apottere'
132-
name 'Andrew Potter'
133-
114+
pom.withXml {
115+
asNode().children().last() + {
116+
resolveStrategy = Closure.DELEGATE_FIRST
117+
name 'graphql-java-servlet'
118+
description 'relay.js-compatible GraphQL servlet'
119+
url 'https://github.com/graphql-java-kickstart/graphql-java-servlet'
120+
inceptionYear '2016'
121+
122+
scm {
123+
url 'https://github.com/graphql-java-kickstart/graphql-java-servlet'
124+
connection 'scm:https://github.com/graphql-java-kickstart/graphql-java-servlet.git'
125+
developerConnection 'scm:git://github.com/graphql-java-kickstart/graphql-java-servlet.git'
126+
}
127+
128+
licenses {
129+
license {
130+
name 'The Apache Software License, Version 2.0'
131+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
132+
distribution 'repo'
133+
}
134+
}
135+
136+
developers {
137+
developer {
138+
id 'yrashk'
139+
name 'Yurii Rashkovskii'
140+
141+
}
142+
developer {
143+
id 'apottere'
144+
name 'Andrew Potter'
145+
146+
}
147+
}
134148
}
149+
// https://discuss.gradle.org/t/maven-publish-plugin-generated-pom-making-dependency-scope-runtime/7494/10
150+
asNode().dependencies.'*'.findAll() {
151+
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
152+
dep.name == it.artifactId.text()
153+
}
154+
}.each { it.scope*.value = 'compile'}
135155
}
136156
}
137-
// https://discuss.gradle.org/t/maven-publish-plugin-generated-pom-making-dependency-scope-runtime/7494/10
138-
asNode().dependencies.'*'.findAll() {
139-
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
140-
dep.name == it.artifactId.text()
141-
}
142-
}.each { it.scope*.value = 'compile'}
143157
}
144158
}
145-
}
146-
}
147-
148-
release {
149-
tagTemplate = 'v${version}'
150-
failOnPublishNeeded = false
151-
ignoredSnapshotDependencies = ['com.graphql-java-kickstart:graphql-java-servlet']
152-
}
153159

154-
afterReleaseBuild.dependsOn bintrayUpload
155-
156-
bintray {
157-
user = System.env.BINTRAY_USER ?: project.findProperty('BINTRAY_USER') ?: ''
158-
key = System.env.BINTRAY_PASS ?: project.findProperty('BINTRAY_PASS') ?: ''
159-
publications = ['maven']
160-
publish = true
161-
pkg {
162-
repo = 'releases'
163-
name = project.name
164-
licenses = ['Apache-2.0']
165-
vcsUrl = 'https://github.com/graphql-java-kickstart/graphql-java-servlet'
166-
userOrg = 'graphql-java-kickstart'
167-
version {
168-
name = project.version
169-
mavenCentralSync {
170-
close = '1'
160+
bintray {
161+
user = System.env.BINTRAY_USER ?: project.findProperty('BINTRAY_USER') ?: ''
162+
key = System.env.BINTRAY_PASS ?: project.findProperty('BINTRAY_PASS') ?: ''
163+
publications = ['mainProjectPublication']
164+
publish = true
165+
pkg {
166+
repo = 'releases'
167+
name = PROJECT_NAME
168+
desc = PROJECT_DESC
169+
licenses = [PROJECT_LICENSE]
170+
vcsUrl = PROJECT_GIT_REPO_URL
171+
userOrg = 'graphql-java-kickstart'
172+
version {
173+
name = project.version
174+
mavenCentralSync {
175+
close = '1'
176+
}
177+
}
171178
}
172179
}
173-
}
174-
}
175180

176-
artifactory {
177-
contextUrl = 'https://oss.jfrog.org'
178-
publish {
179-
repository {
180-
repoKey = 'oss-snapshot-local'
181+
artifactory {
182+
contextUrl = 'https://oss.jfrog.org'
183+
publish {
184+
repository {
185+
repoKey = 'oss-snapshot-local'
181186

182-
username = System.env.BINTRAY_USER ?: System.getProperty('BINTRAY_USER')
183-
password = System.env.BINTRAY_PASS ?: System.getProperty('BINTRAY_PASS')
187+
username = System.env.BINTRAY_USER ?: System.getProperty('BINTRAY_USER')
188+
password = System.env.BINTRAY_PASS ?: System.getProperty('BINTRAY_PASS')
184189

185-
maven = true
186-
}
187-
defaults {
188-
publications 'maven'
189-
publishArtifacts = true
190-
publishPom = true
191-
}
192-
}
193-
resolve {
194-
repository {
195-
repoKey = 'jcenter'
190+
maven = true
191+
}
192+
defaults {
193+
publications 'maven'
194+
publishArtifacts = true
195+
publishPom = true
196+
}
197+
}
198+
resolve {
199+
repository {
200+
repoKey = 'jcenter'
201+
}
202+
}
196203
}
197204
}
198205
}
199206

200-
idea {
201-
project {
202-
languageLevel = '11'
203-
vcs = 'Git'
204-
}
207+
release {
208+
tagTemplate = 'v${version}'
209+
failOnPublishNeeded = false
210+
ignoredSnapshotDependencies = ['com.graphql-java-kickstart:graphql-java-servlet']
205211
}
206212

207-
wrapper {
208-
gradleVersion = '4.10.3'
213+
task build {
214+
dependsOn subprojects.findResults { it.tasks.findByName('assemble') }
215+
dependsOn subprojects.findResults { it.tasks.findByName('check') }
216+
dependsOn subprojects.findResults { it.tasks.findByName('bintray') }
209217
}
210218

211-
lombok {
212-
version = '1.18.10'
219+
wrapper {
220+
gradleVersion = "${GRADLE_WRAPPER_VER}"
213221
}

0 commit comments

Comments
 (0)