-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
170 lines (142 loc) · 4.08 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
plugins {
id 'idea'
id 'groovy'
id 'jacoco'
id 'project-report'
id 'ru.vyarus.java-lib' version '1.0.1'
id 'ru.vyarus.github-info' version '1.0.0'
id 'ru.vyarus.animalsniffer' version '1.0.0'
id 'ru.vyarus.quality' version '1.2.0'
id 'com.github.kt3k.coveralls' version '2.4.0x'
id 'com.jfrog.bintray' version '1.5'
id 'net.researchgate.release' version '2.3.4'
id 'com.github.ben-manes.versions' version '0.11.3'
id 'net.saliman.cobertura' version '2.3.1'
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
wrapper {
gradleVersion = 2.10
}
repositories { jcenter(); mavenCentral(); mavenLocal() }
sourceSets {
integrationTest {
groovy {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/integration-test/groovy')
}
resources.srcDir file('src/integration-test/resources')
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
dependencies {
signature 'org.codehaus.mojo.signature:java17:+@signature'
provided 'com.google.code.findbugs:jsr305:3.0.1'
provided 'com.google.code.findbugs:annotations:3.0.1'
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'com.google.code.gson:gson:2.7'
compile 'com.ning:async-http-client:1.9.38'
compile 'org.jdeferred:jdeferred-core:1.2.4'
testCompile 'org.apache.commons:commons-lang3:3.4'
testCompile 'ch.qos.logback:logback-classic:1.1.7'
testCompile 'org.slf4j:jul-to-slf4j:1.7.21'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'org.jmock:jmock-legacy:2.5.1'
testCompile 'junit-addons:junit-addons:1.4'
integrationTestCompile 'com.firebase:firebase-token-generator:2.0.0'
}
group = 'com.github.j-fischer'
description = 'Firebase REST API wrapper for Java'
github {
user = 'j-fischer'
license = 'Apache'
}
pom {
developers {
developer {
id "j-fischer"
name "Johannes Fischer"
email "fischer.jh@gmail.com"
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? bintrayUser : 'USER'
key = project.hasProperty('bintrayKey') ? bintrayKey : 'KEY'
publications = ['maven']
dryRun = false
publish = true
pkg {
repo = 'maven'
name = project.name
desc = project.description
labels = ['firebase', 'rest', 'api', 'wrapper']
publicDownloadNumbers = true
licenses = ['Apache-2.0']
version {
gpg {
sign = true
passphrase = project.hasProperty('gpgPassphrase') ? gpgPassphrase : ''
}
mavenCentralSync {
sync = true
user = project.hasProperty('sonatypeUser') ? sonatypeUser : 'USER'
password = project.hasProperty('sonatypePassword') ? sonatypePassword : 'PASSWORD'
}
}
}
}
afterReleaseBuild {
dependsOn = [bintrayUpload]
doLast {
logger.warn "RELEASED $project.group:$project.name:$project.version"
}
}
afterEvaluate {
checkstyle {
ignoreFailures = true
}
findbugs {
ignoreFailures = true
}
pmd {
ignoreFailures = true
}
}
cobertura {
coverageFormats = ['html', 'xml']
coverageIgnoreTrivial = true
coverageIgnores = ['org.slf4j.Logger.*']
coverageReportDir = new File("$buildDir/reports/cobertura")
}
test {
testLogging {
events "skipped", "failed", "standard_error"
exceptionFormat "full"
}
maxHeapSize = "512m"
}
test.finalizedBy(project.tasks.cobertura)
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
testLogging {
events "skipped", "failed", "standard_error"
exceptionFormat "full"
}
systemProperties System.properties
outputs.upToDateWhen { false }
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
}
dependencyUpdates.revision = 'release'
jacocoTestReport.reports.xml.enabled = true
task showDependenciesTree(dependsOn: 'htmlDependencyReport', group: 'help', description:
'Generates dependencies tree report and opens it in browser') << {
java.awt.Desktop.getDesktop().open(file('/build/reports/project/dependencies/root.html'))
}