-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
129 lines (114 loc) · 4.07 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' version '3.3.0' apply false
}
ext {
moduleProjects = [
project(":graphql-voyager-spring-boot-starter"),
project(":graphql-graphiql-spring-boot-starter"),
project(":graphql-playground-spring-boot-starter")
]
}
subprojects {
group 'ru.sadv1r.spring.graphql'
version '0.4.0'
repositories {
mavenCentral()
}
}
configure(moduleProjects) {
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
dependencyManagement {
imports {
mavenBom SpringBootPlugin.BOM_COORDINATES
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
// from components.java
artifact jar
artifact sourcesJar
artifact javadocJar
pom {
afterEvaluate {
name = project.description
description = project.description
}
url = 'https://github.com/sadv1r/spring-graphql-editors'
licenses {
license {
name = "MIT License"
url = "https://opensource.org/licenses/mit-license.php"
}
}
developers {
developer {
id = 'sadv1r'
name = 'Dmitry Ivanov'
email = 'me@sadv1r.ru'
}
}
scm {
url = 'https://github.com/sadv1r/spring-graphql-editors'
connection = 'scm:git:git://github.com/sadv1r/spring-graphql-editors.git'
developerConnection = 'scm:git:git://github.com/sadv1r/spring-graphql-editors.git'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/sadv1r/spring-graphql-editors/issues'
}
}
// to avoid "Publication only contains dependencies and/or constraints without a version" error
// see https://docs.gradle.org/7.6.4/userguide/publishing_maven.html#publishing_maven:resolved_dependencies
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
repositories {
maven {
credentials {
credentials {
url = version.endsWith('SNAPSHOT') ? 'https://oss.sonatype.org/content/repositories/snapshots' : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
username = System.env.OSSRH_USERNAME ?: project.findProperty('ossrhUsername') ?: ''
password = System.env.OSSRH_PASSWORD ?: project.findProperty('ossrhPassword') ?: ''
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
}
}