-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
177 lines (146 loc) · 5.09 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
import aQute.bnd.gradle.Bundle
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.1.9.RELEASE"
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:3.1.0'
}
}
plugins {
id "com.jfrog.bintray" version "1.8.4"
}
group 'io.github.enigmatis'
version '0.1.5'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
//release {
// tagTemplate = 'v${version}'
// failOnPublishNeeded = false
// failOnCommitNeeded = false
//}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
jar {
baseName = 'graphql-spring-annotations'
version = project.version
enabled = true
}
repositories {
mavenCentral()
}
bootJar.enabled = false
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile "io.github.graphql-java:graphql-java-annotations:7.2"
compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.10.0'
compile 'org.reflections:reflections:0.9.11';
// to embed Altair tool
runtime 'com.graphql-java-kickstart:altair-spring-boot-starter:5.10.0'
// to embed GraphiQL tool
runtime 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.10.0'
// to embed Voyager tool
runtime 'com.graphql-java-kickstart:voyager-spring-boot-starter:5.10.0'
compileOnly 'biz.aQute.bnd:biz.aQute.bndlib:3.2.0'
// testing facilities
testCompile 'com.graphql-java-kickstart:graphql-spring-boot-starter-test:5.10.0'
testCompile("junit:junit")
}
publishing {
// repositories {
// maven {
// name = "GitHubPackages"
// url = uri("https://maven.pkg.github.com/yarinvak/graphql-spring-annotations")
// credentials {
// username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
// password = project.find("gpr.key") ?: System.getenv("GPR_API_KEY")
// }
// }
// }
publications {
/*
gpr(MavenPublication) {
from(components.java)
}
*/
maven(MavenPublication) {
from components.java
groupId 'io.github.enigmatis'
artifactId 'graphql-spring-annotations'
version project.version
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'graphql-spring-annotations'
description 'Annotation based graphql server'
url 'https://github.com/yarinvak/graphql-spring-annotations'
inceptionYear '2019'
scm {
url 'https://github.com/yarinvak/graphql-spring-annotations'
}
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 'yarinvak'
name 'Yarin Vaknin'
email 'yarinvak@gmail.com'
}
}
}
}
}
}
}
//afterReleaseBuild.dependsOn bintrayUpload
bintray {
user = System.getenv('BINTRAY_USER') ?: project.findProperty('BINTRAY_USER') ?: ''
key = System.getenv('BINTRAY_KEY') ?: project.findProperty('BINTRAY_KEY') ?: ''
publications = ['maven']
publish = true
pkg {
desc = 'A graphql server based on java annotations'
repo = 'graphql-spring-annotations'
name = 'graphql-spring-annotations'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/yarinvak/graphql-spring-annotations'
version {
name = project.version
released = new Date()
gpg {
sign = false
}
mavenCentralSync {
sync = false //[Default: true] Determines whether to sync the version to Maven Central..
user = System.getenv('OSS_USER') ?: project.findProperty('OSS_USER') ?: ''
password = System.getenv('OSS_PASS') ?: project.findProperty('OSS_PASS') ?: ''
close = '1'
//Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
}
}
}
}