This repository has been archived by the owner on Aug 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
160 lines (130 loc) · 4.17 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
plugins {
id 'java'
id 'jacoco'
id 'maven'
id 'signing'
id 'net.researchgate.release' version '2.6.0'
}
group 'com.gitlab.siege-insights'
version version
sourceCompatibility = 1.8
test {
// enable TestNG support (default is JUnit)
useTestNG()
jacoco {
enabled = true
}
}
jacocoTestReport {
reports {
html {
enabled true
}
}
executionData(test)
}
tasks.build.dependsOn(jacocoTestReport)
test {
jacoco {
append = false
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
}
repositories {
mavenCentral()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
useGpgCmd()
sign configurations.archives
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
release {
preTagCommitMessage = '[Release]: '
tagCommitMessage = '[Release]: creating tag '
newVersionCommitMessage = '[Release]: new snapshot version '
tagTemplate = 'release-v${version}'
failOnUnversionedFiles = false
git {
signTag = true
}
}
uploadArchives {
repositories {
mavenDeployer {
if(isReleaseVersion) {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: System.getenv("MAVEN_REPO_USER"),
password: System.getenv("MAVEN_REPO_PASS"))
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: System.getenv("MAVEN_REPO_USER"),
password: System.getenv("MAVEN_REPO_PASS"))
}
pom.project {
name = rootProject.name
description = "Java API Wrapper for the R6Tab API"
url = "https://gitlab.com/siege-insights/r6tab-java-api-client"
version = rootProject.version
artifactId = rootProject.name
groupId = rootProject.group
scm {
connection = "scm:git:https://gitlab.com/siege-insights/r6tab-java-api-client"
developerConnection = "scm:git:https://gitlab.com/siege-insights/r6tab-java-api-client"
url = "https://gitlab.com/siege-insights/r6tab-java-api-client"
}
developers {
developer {
id = "rays3t"
name = "Kevin Urbainczyk"
email = "kevin@rays3t.info"
url = "https://rays3t.info"
}
}
licenses {
license {
name 'GNU General Public License, Version 3'
url 'http://www.gnu.de/documents/gpl.de.html'
distribution 'repo'
}
}
}
}
}
}
dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.13.1'
implementation 'com.google.code.gson:gson:2.8.5'
// Logging
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.26'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.2'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
// https://mvnrepository.com/artifact/org.testng/testng
testCompile group: 'org.testng', name: 'testng', version: '6.14.3'
testCompile 'com.google.guava:guava:27.0.1-jre'
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.24.5'
}