-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
229 lines (190 loc) · 6.64 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
buildscript {
repositories {
mavenCentral()
maven {
url 'http://repo.spring.io/plugins-release'
}
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://jitpack.io' }
jcenter()
}
dependencies {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
}
}
plugins {
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
apply plugin: 'java'
description = 'This project provides rsql api for querydsl framework by integrating it with rsql-parser'
allprojects {
apply plugin: 'base'
group = 'com.github.vineey'
version = '2.0.0.RELEASE'
repositories {
mavenCentral()
maven {
url 'http://repo.spring.io/plugins-release'
}
//maven {url 'https://repo.spring.io/libs-milestone'}
maven { url "https://plugins.gradle.org/m2/" }
//maven { url "https://repository.jboss.org/nexus/content/repositories/releases" }
maven { url 'https://jitpack.io' }
jcenter()
}
jacoco {
toolVersion = '0.7.1.201405082137'
}
}
def deployableSubproject =
['rsql-api-core',
'rsql-api-filter',
'rsql-api-page',
'rsql-api-sort',
'rsql-api-select',
'rsql-api-all',
'rsql-querydsl-select',
'rsql-querydsl-filter',
'rsql-querydsl-page',
'rsql-querydsl-sort',
'rsql-querydsl-all',
'rsql-querydsl-spring']
def generatedSourceDir = 'src/generated/java'
subprojects {
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
sourceSets {
generated {
java {
srcDirs = [generatedSourceDir]
}
}
}
clean {
delete sourceSets.generated.java.srcDirs
}
test.onlyIf { ! Boolean.getBoolean('skip.tests') }
dependencies {
compile 'org.slf4j:slf4j-api:1.7.5'
provided 'org.slf4j:jcl-over-slf4j:1.7.5'
provided 'ch.qos.logback:logback-core:1.0.13'
provided 'ch.qos.logback:logback-classic:1.0.13'
testCompile 'junit:junit:4.12'
}
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['**/ast/**', '**/test/**'])
})
}
}
}
coveralls {
sourceDirs = files(subprojects.findAll{deployableSubproject.contains(it.name)}.sourceSets.main.allSource.srcDirs).files.absolutePath
}
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
def testableSubprojects = subprojects.findAll{deployableSubproject.contains(it.name)}
dependsOn = testableSubprojects.test
sourceDirectories = files(testableSubprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(testableSubprojects.sourceSets.main.output)
executionData = files(testableSubprojects.jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
xml.destination = "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"
}
onlyIf = {
true
}
doFirst {
executionData = files(executionData.findAll {
it.exists()
})
}
}
if (project.hasProperty('release')) {
subprojects
{
if (deployableSubproject.contains(project.name)) {
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
}
}
subprojects {
apply plugin: 'signing'
apply plugin: 'maven'
def subprojectDescription = 'RSQL Querydsl Integration'
if (deployableSubproject.contains(project.name)) {
// Signature of artifacts
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
// POM signature
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
// Target repository
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
version '2.0.0.RELEASE'
name project.name
description subprojectDescription
packaging 'jar'
url 'https://github.com/vineey/archelix-rsql'
scm {
connection 'scm:git:https://github.com/vineey/archelix-rsql.git'
developerConnection 'scm:git:git@https://github.com/vineey/archelix-rsql.git'
url 'https://github.com/vineey/archelix-rsql.git'
}
licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}
developers {
developer {
id = 'vineey'
name = 'John Michael Vincent S. Rustia'
email = '[email protected]'
}
}
}
}
}
}
}
}
}