-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
137 lines (111 loc) · 3.77 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.6.3"
}
}
final String PHASE = "TEST"
group 'in.ankushs'
version '1.2'
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: "jacoco"
apply plugin: "com.github.kt3k.coveralls"
apply plugin: 'maven'
if(PHASE == 'PRODUCTION'){
apply plugin: 'signing'
}
jar{
baseName = "linode4j"
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.google.guava', name: 'guava', version: '23.5-jre'
//logging
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
//Lombok
compile group: 'org.projectlombok', name: 'lombok', version: '1.16.18'
//Jackson for JSON
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.2'
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.9.1'
compile 'org.codehaus.groovy:groovy-all:2.4.12'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.spockframework', name: 'spock-core', version: '1.1-groovy-2.4'
}
jacocoTestReport {
group = "Reporting"
reports {
xml.setEnabled(true)
csv.setEnabled(false)
html.setEnabled(false)
html.destination "${buildDir}/reports/coverage"
}
}
if(PHASE == 'PRODUCTION'){
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer{
beforeDeployment{MavenDeployment deployment->
signing.signPom(deployment)
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom{
project{
name 'linode4j'
description "Java API for Linode's V4 REST API"
packaging 'jar'
url 'https://github.com/ankushs92/linode4j/issues'
inceptionYear '2017'
scm {
connection 'scm:git:[email protected]:ankushs92/linode4j.git'
developerConnection 'scm:git:[email protected]:ankushs92/linode4j.git'
url '[email protected]:ankushs92/linode4j.git'
}
licenses {
license {
name 'The MIT License'
url 'https://github.com/ankushs92/linode4j/blob/master/LICENSE.md'
}
}
developers {
developer {
name 'Ankush Sharma'
email '[email protected]'
}
}
issueManagement{
system 'Github'
url 'https://github.com/ankushs92/linode4j/issues'
}
}
}
}
}
}
}