forked from graphql-java-kickstart/graphql-java-servlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
178 lines (152 loc) · 5.24 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
178
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:3.1.0'
}
}
plugins {
id "com.jfrog.bintray" version "1.6"
id 'net.researchgate.release' version '2.3.4'
}
apply plugin: 'java'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
// Tests
apply plugin: 'groovy'
repositories {
mavenLocal()
mavenCentral()
}
configurations.all {
exclude group:"org.projectlombok", module: "lombok"
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.21'
// Useful utilities
compile 'com.google.guava:guava:20.0'
// 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' // MockHttpServletRequest, MockHttpServletResponse
testRuntime 'org.springframework:spring-web:4.3.7.RELEASE'
// OSGi
compileOnly 'org.osgi:org.osgi.core:6.0.0'
compileOnly 'org.osgi:org.osgi.service.cm:1.5.0'
compileOnly 'org.osgi:org.osgi.service.component:1.3.0'
compileOnly 'biz.aQute.bnd:biz.aQute.bndlib:3.1.0'
// Servlet
compile 'javax.servlet:javax.servlet-api:3.0.1'
// Multipart support
compile 'commons-fileupload:commons-fileupload:1.3.1'
// GraphQL
compile 'com.graphql-java:graphql-java:6.0'
testCompile 'com.graphql-java:graphql-java-annotations:0.13.1'
// JSON
compile 'com.fasterxml.jackson.core:jackson-core:2.8.4'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.4'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.4'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.8.4'
}
apply plugin: 'osgi'
apply plugin: 'java-library-distribution'
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'idea'
jar {
manifest {
instruction 'Require-Capability', 'osgi.extender'
}
}
// 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
}
publishing {
publications {
maven(MavenPublication) {
from components.java
groupId 'com.graphql-java'
artifactId project.name
version project.version
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'graphql-java-servlet'
description 'relay.js-compatible GraphQL servlet'
url 'https://github.com/graphql-java/graphql-java-servlet'
inceptionYear '2016'
scm {
url 'https://github.com/graphql-java/graphql-java-servlet'
connection 'scm:https://[email protected]/graphql-java/graphql-java-servlet.git'
developerConnection 'scm:git://github.com/graphql-java/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]'
}
}
}
// 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'}
}
}
}
}
release {
tagTemplate = 'v${version}'
failOnPublishNeeded = false
}
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 {
repo = 'maven'
name = project.name
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/graphql-java/graphql-java-servlet'
version {
name = project.version
}
}
}
idea {
project {
languageLevel = '1.8'
vcs = 'Git'
}
}