Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 68a555f

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # build.gradle
2 parents d79cd3f + 0f948f8 commit 68a555f

File tree

33 files changed

+273
-329
lines changed

33 files changed

+273
-329
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Validate Gradle Wrapper"
2+
on: [push, pull_request]
3+
4+
jobs:
5+
validation:
6+
name: "Validation"
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: gradle/wrapper-validation-action@v1

altair-spring-boot-autoconfigure/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
*/
1919
dependencies{
20-
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:$LIB_SPRING_BOOT_VER"
20+
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
2121

22-
compile "org.springframework.boot:spring-boot-autoconfigure:$LIB_SPRING_BOOT_VER"
23-
compile "org.apache.commons:commons-text:1.1"
24-
compileOnly "org.springframework.boot:spring-boot-starter-web:$LIB_SPRING_BOOT_VER"
22+
implementation "org.springframework.boot:spring-boot-autoconfigure"
23+
implementation "org.apache.commons:commons-text:$LIB_APACHE_COMMONS_TEXT"
24+
compileOnly "org.springframework.boot:spring-boot-starter-web"
2525

26-
testCompile "org.springframework.boot:spring-boot-starter-web:$LIB_SPRING_BOOT_VER"
27-
testCompile "org.springframework.boot:spring-boot-starter-test:$LIB_SPRING_BOOT_VER"
26+
testImplementation "org.springframework.boot:spring-boot-starter-web"
27+
testImplementation "org.springframework.boot:spring-boot-starter-test"
2828
}
2929

3030
compileJava.dependsOn(processResources)

altair-spring-boot-starter/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
*/
1919
dependencies {
20-
compile(project(':altair-spring-boot-autoconfigure'))
20+
implementation(project(':altair-spring-boot-autoconfigure'))
2121
}

build.gradle

Lines changed: 62 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,21 @@
1717
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
*/
1919

20-
buildscript {
21-
repositories {
22-
mavenLocal()
23-
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' }
28-
}
29-
dependencies {
30-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
31-
classpath 'net.researchgate:gradle-release:2.7.0'
32-
}
33-
}
34-
3520
plugins {
36-
id 'net.researchgate.release' version '2.7.0'
37-
id 'io.franzbecker.gradle-lombok' version '1.14' apply false
21+
id "com.jfrog.bintray" version "$LIB_BINTRAY_PLUGIN_VER"
22+
id 'net.researchgate.release' version "$LIB_RELEASE_PLUGIN_VER"
23+
id "org.springframework.boot" version "$LIB_SPRING_BOOT_VER" apply false
3824
}
3925

4026
subprojects {
4127
apply plugin: 'idea'
4228
apply plugin: 'java'
43-
apply plugin: 'maven'
29+
apply plugin: 'java-library'
4430
apply plugin: 'maven-publish'
4531
apply plugin: "com.jfrog.bintray"
46-
apply plugin: 'io.franzbecker.gradle-lombok'
32+
apply plugin: "io.spring.dependency-management"
4733

48-
group = PROJECT_GROUP
34+
group "$PROJECT_GROUP"
4935

5036
repositories {
5137
mavenLocal()
@@ -56,6 +42,24 @@ subprojects {
5642
maven { url "https://repo.spring.io/libs-milestone" }
5743
}
5844

45+
dependencyManagement {
46+
imports {
47+
mavenBom "org.springframework.boot:spring-boot-starter-parent:$LIB_SPRING_BOOT_VER"
48+
}
49+
}
50+
51+
dependencies {
52+
compileOnly "org.projectlombok:lombok"
53+
annotationProcessor "org.projectlombok:lombok"
54+
55+
testCompileOnly "org.projectlombok:lombok"
56+
testAnnotationProcessor "org.projectlombok:lombok"
57+
}
58+
59+
test {
60+
useJUnitPlatform()
61+
}
62+
5963
idea {
6064
module {
6165
downloadJavadoc = true
@@ -70,79 +74,59 @@ subprojects {
7074

7175
compileJava.dependsOn(processResources)
7276

73-
lombok {
74-
version = "1.18.4"
75-
sha256 = ""
76-
}
77-
78-
7977
if (!it.name.startsWith('example')) {
8078

81-
jar {
82-
from "LICENSE.md"
83-
}
84-
85-
task sourcesJar(type: Jar) {
86-
dependsOn classes
87-
classifier 'sources'
88-
from sourceSets.main.allSource
79+
//disable Gradle Metadata generation as it may cause unwanted side effects
80+
tasks.withType(GenerateModuleMetadata) {
81+
enabled = false
8982
}
9083

91-
task javadocJar(type: Jar, dependsOn: javadoc) {
92-
classifier = 'javadoc'
93-
from javadoc.destinationDir
84+
jar {
85+
from "LICENSE.md"
9486
}
9587

96-
artifacts {
97-
archives sourcesJar
98-
archives javadocJar
88+
java {
89+
withSourcesJar()
90+
withJavadocJar()
9991
}
10092

10193
publishing {
10294
publications {
10395
mainProjectPublication(MavenPublication) {
104-
version version
10596
from components.java
10697

107-
artifact sourcesJar {
108-
classifier "sources"
109-
}
110-
artifact javadocJar {
111-
classifier "javadoc"
98+
// to avoid "Publication only contains dependencies and/or constraints without a version" error
99+
// see https://docs.gradle.org/6.2.1/userguide/publishing_maven.html#publishing_maven:resolved_dependencies
100+
versionMapping {
101+
usage('java-api') {
102+
fromResolutionOf('runtimeClasspath')
103+
}
104+
usage('java-runtime') {
105+
fromResolutionResult()
106+
}
112107
}
113108

114-
pom.withXml {
115-
// Fix dependency scoping.
116-
asNode().dependencies.'*'.findAll() {
117-
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
118-
dep.name == it.artifactId.text()
119-
}
120-
}.each() {
121-
it.scope*.value = 'compile'
109+
pom {
110+
resolveStrategy = DELEGATE_FIRST
111+
name = PROJECT_NAME
112+
description = PROJECT_DESC
113+
url = PROJECT_GIT_REPO_URL
114+
scm {
115+
url = PROJECT_GIT_REPO_URL
116+
connection = PROJECT_GIT_REPO_URL
117+
developerConnection = PROJECT_GIT_REPO_URL
122118
}
123-
124-
asNode().children().last() + {
125-
resolveStrategy = Closure.DELEGATE_FIRST
126-
name PROJECT_NAME
127-
description PROJECT_DESC
128-
url PROJECT_GIT_REPO_URL
129-
scm {
130-
url PROJECT_GIT_REPO_URL
131-
connection PROJECT_GIT_REPO_URL
132-
developerConnection PROJECT_GIT_REPO_URL
119+
licenses {
120+
license {
121+
name = PROJECT_LICENSE
122+
url = PROJECT_LICENSE_URL
123+
distribution = 'repo'
133124
}
134-
licenses {
135-
license {
136-
name PROJECT_LICENSE
137-
url PROJECT_LICENSE_URL
138-
distribution 'repo'
139-
}
140-
}
141-
developers {
142-
developer {
143-
id PROJECT_DEV_ID
144-
name PROJECT_DEV_NAME
145-
}
125+
}
126+
developers {
127+
developer {
128+
id = PROJECT_DEV_ID
129+
name = PROJECT_DEV_NAME
146130
}
147131
}
148132
}
@@ -199,6 +183,6 @@ task build {
199183
dependsOn subprojects.findResults { it.tasks.findByName('bintray') }
200184
}
201185

202-
task wrapper(type: Wrapper) {
203-
gradleVersion = "${GRADLE_WRAPPER_VER}"
186+
wrapper {
187+
distributionType = Wrapper.DistributionType.ALL
204188
}
Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
1-
plugins {
2-
id 'java'
3-
id 'org.springframework.boot' version '2.1.3.RELEASE'
4-
}
5-
6-
sourceCompatibility = 1.8
7-
8-
repositories {
9-
jcenter()
10-
mavenCentral()
11-
}
12-
131
dependencies {
14-
compile(project(":graphql-spring-boot-starter"))
15-
compile(project(":graphiql-spring-boot-starter"))
16-
compile "com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER"
2+
implementation(project(":graphql-spring-boot-starter"))
3+
implementation(project(":graphiql-spring-boot-starter"))
4+
implementation "com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER"
175

18-
compile "io.reactivex.rxjava2:rxjava:2.1.5"
19-
compile "io.projectreactor:reactor-core:3.3.2.RELEASE"
20-
compile("org.springframework.boot:spring-boot-starter-web:$LIB_SPRING_BOOT_VER")
6+
implementation "io.reactivex.rxjava2:rxjava"
7+
implementation "io.projectreactor:reactor-core"
8+
implementation("org.springframework.boot:spring-boot-starter-web")
219

22-
testCompile "org.springframework.boot:spring-boot-starter-test:$LIB_SPRING_BOOT_VER"
10+
testImplementation "org.springframework.boot:spring-boot-starter-test"
2311
}
2412

2513
jar.enabled = false
2614
uploadArchives.enabled = false
2715
bintrayUpload.enabled = false
28-
install.enabled = false
16+
publishToMavenLocal.enabled = false

example-graphql-tools/build.gradle

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,21 @@
1616
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1717
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
*/
19-
plugins {
20-
id 'java'
21-
}
22-
23-
sourceCompatibility = 1.8
24-
25-
repositories {
26-
mavenCentral()
27-
}
2819

2920
dependencies {
30-
compile(project(":graphql-spring-boot-starter"))
31-
compile(project(":graphiql-spring-boot-starter"))
32-
compile(project(":voyager-spring-boot-starter"))
33-
compile "com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER"
21+
implementation(project(":graphql-spring-boot-starter"))
22+
implementation(project(":graphiql-spring-boot-starter"))
23+
implementation(project(":voyager-spring-boot-starter"))
24+
implementation "com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER"
3425

35-
compile("org.springframework.boot:spring-boot-starter-web:$LIB_SPRING_BOOT_VER")
26+
implementation("org.springframework.boot:spring-boot-starter-web")
3627

37-
testCompile "org.springframework.boot:spring-boot-starter-test:$LIB_SPRING_BOOT_VER"
28+
testImplementation "org.springframework.boot:spring-boot-starter-test"
3829

39-
testCompile(project(":graphql-spring-boot-starter-test"))
30+
testImplementation(project(":graphql-spring-boot-starter-test"))
4031
}
4132

4233
jar.enabled = false
4334
uploadArchives.enabled = false
4435
bintrayUpload.enabled = false
45-
install.enabled = false
36+
publishToMavenLocal.enabled = false
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
1-
plugins {
2-
id 'java'
3-
}
4-
5-
sourceCompatibility = 1.8
6-
7-
repositories {
8-
mavenCentral()
9-
}
10-
111
dependencies {
12-
compile("org.springframework.boot:spring-boot-starter-web:$LIB_SPRING_BOOT_VER")
13-
compile(project(":graphql-spring-boot-starter"))
14-
compile(project(":graphiql-spring-boot-starter"))
2+
implementation("org.springframework.boot:spring-boot-starter-web")
3+
implementation(project(":graphql-spring-boot-starter"))
4+
implementation(project(":graphiql-spring-boot-starter"))
155

16-
compile "com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER"
6+
implementation "com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER"
177

18-
testCompile "org.springframework.boot:spring-boot-starter-test:$LIB_SPRING_BOOT_VER"
19-
testCompile(project(":graphql-spring-boot-starter-test"))
8+
testImplementation "org.springframework.boot:spring-boot-starter-test"
9+
testImplementation(project(":graphql-spring-boot-starter-test"))
2010
}
2111

2212
jar.enabled = false
2313
uploadArchives.enabled = false
2414
bintrayUpload.enabled = false
25-
install.enabled = false
15+
publishToMavenLocal.enabled = false

example-spring-common/build.gradle

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,20 @@
1616
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1717
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
*/
19-
buildscript {
20-
repositories {
21-
maven { url "https://plugins.gradle.org/m2/" }
22-
maven { url 'https://repo.spring.io/plugins-release' }
23-
}
24-
dependencies {
25-
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
26-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6"
27-
}
28-
}
2919

30-
apply plugin: 'java'
31-
apply plugin: 'war'
3220
apply plugin: 'org.springframework.boot'
3321

34-
repositories {
35-
jcenter()
36-
}
37-
3822
dependencies{
39-
compile(project(":graphql-spring-boot-starter"))
40-
compile(project(":graphiql-spring-boot-starter"))
23+
implementation(project(":graphql-spring-boot-starter"))
24+
implementation(project(":graphiql-spring-boot-starter"))
4125

42-
compile "com.embedler.moon.graphql:spring-graphql-common:2.1.0-2016-05-22T16-50-32"
43-
compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.3'
26+
implementation "com.embedler.moon.graphql:spring-graphql-common:2.1.0-2016-05-22T16-50-32"
27+
implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.3'
4428

45-
compile("org.springframework.boot:spring-boot-starter-web")
46-
compile("org.springframework.boot:spring-boot-starter-actuator")
29+
implementation("org.springframework.boot:spring-boot-starter-web")
30+
implementation("org.springframework.boot:spring-boot-starter-actuator")
4731

48-
testCompile("org.springframework.boot:spring-boot-starter-test")
32+
testImplementation("org.springframework.boot:spring-boot-starter-test")
4933
}
5034

5135
jar.enabled = false

0 commit comments

Comments
 (0)