-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild.gradle
More file actions
179 lines (133 loc) · 4.78 KB
/
build.gradle
File metadata and controls
179 lines (133 loc) · 4.78 KB
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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/5.1/userguide/java_library_plugin.html
*/
buildscript {
repositories {
jcenter()
mavenCentral()
//Add only for SNAPSHOT versions
//maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.20.0"
}
}
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
// Apply the groovy plugin to also add support for Groovy (needed for Spock)
id 'groovy'
id 'io.franzbecker.gradle-lombok' version '1.14'
id 'checkstyle'
id 'net.saliman.cobertura' version '2.5.4'
id 'com.github.kt3k.coveralls' version '2.8.2'
id 'osgi'
}
repositories {
jcenter()
}
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = GROUP
version = VERSION_NAME
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
compile("com.squareup.retrofit2:retrofit:2.5.0")
compile("com.squareup.retrofit2:converter-gson:2.5.0")
compile("com.squareup.okhttp3:okhttp:3.14.0")
compile("com.squareup.okhttp3:logging-interceptor:3.14.0")
compile "com.squareup.retrofit2:adapter-rxjava:2.5.0"
compile 'com.squareup.retrofit2:converter-scalars:2.5.0'
implementation("io.reactivex:rxjava:1.1.5")
compile("commons-codec:commons-codec:1.12")
compile 'joda-time:joda-time:2.10.1'
compile 'com.jakewharton.timber:timber:4.1.0'
implementation("com.google.dagger:dagger:2.21")
annotationProcessor("com.google.dagger:dagger-compiler:2.21")
compile group: 'com.google.code.gson', name: 'gson', version: '2.3.1'
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.0'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
compile group: 'org.gradle', name: 'api', version: '1.0'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:26.0-jre'
// Use the latest Groovy version for Spock testing
testImplementation 'org.codehaus.groovy:groovy-all:2.5.4'
// Use the awesome Spock testing and specification framework even with Java
testImplementation 'org.spockframework:spock-core:1.2-groovy-2.5'
testImplementation 'junit:junit:4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.22.0'
testRuntime group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
testCompile("org.apache.jclouds:jclouds-core:2.0.2:tests")
testCompile("org.apache.jclouds.driver:jclouds-slf4j:2.0.2")
testCompile('org.testng:testng:6.11')
testCompile('org.assertj:assertj-core:3.8.0')
compile "org.apache.jclouds:jclouds-core:2.0.2"
}
jar {
manifest {
attributes("Implementation-Title": POM_NAME,
"Implementation-Version": VERSION_NAME,
"Implementation-Vendor": VENDOR_NAME)
version = VERSION_NAME
symbolicName = POM_ARTIFACT_ID
instruction 'Export-Package', '*'
}
}
lombok {
version = "1.18.2"
sha256 = ""
}
import io.franzbecker.gradle.lombok.task.DelombokTask
task delombok(type: DelombokTask, dependsOn: compileJava) {
ext.outputDir = file("$buildDir/delombok")
outputs.dir(outputDir)
sourceSets.main.java.srcDirs.each {
inputs.dir(it)
args(it, "-d", outputDir)
}
doFirst {
outputDir.deleteDir()
}
}
task delombokHelp(type: DelombokTask) {
args "--help"
}
javadoc {
dependsOn delombok
source = delombok.outputDir
failOnError = true
}
if (project.hasProperty("signing.keyId")) {
apply from: 'deploy.gradle'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
task provisionUser(type: JavaExec) {
standardInput = System.in
classpath sourceSets.main.runtimeClasspath
main = "ug.sparkpl.momoapi.MomoApi"
}
checkstyle {
toolVersion = '8.16'
showViolations = true
ignoreFailures = true
}
cobertura {
coverageFormats = ['html', 'xml'] // coveralls plugin depends on xml format report
coverageIgnoreTrivial = true // ignore getters/setters in coverage report
coverageIgnoreMethodAnnotations = ["java.lang.Deprecated", "lombok.Generated"]
}