-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (99 loc) · 3.61 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
plugins {
id 'java'
id 'jacoco'
id 'maven-publish'
id 'signing'
id 'net.researchgate.release' version '2.8.1'
id 'io.codearte.nexus-staging' version '0.21.2'
}
group 'com.github.simkuenzi'
version version
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation group: 'org.jsoup', name: 'jsoup', version: '1.13.1'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.xmlunit', name: 'xmlunit-core', version: '2.7.0'
testImplementation group: 'org.xmlunit', name: 'xmlunit-matchers', version: '2.7.0'
testImplementation group: 'org.xmlunit', name: 'xmlunit-placeholders', version: '2.7.0'
testImplementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'
testImplementation group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.0'
testImplementation group: 'javax.activation', name: 'activation', version: '1.1.1'
testImplementation group: 'io.javalin', name: 'javalin', version: '3.9.1'
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.30'
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
test {
finalizedBy jacocoTestReport
systemProperty 'com.github.simkuenzi.webplay.testfs', "${project.buildDir}/testfs"
testLogging {
exceptionFormat "full"
}
}
nexusStaging {
username = project.hasProperty('mavenUser') ? mavenUser : ''
password = project.hasProperty('mavenPassword') ? mavenPassword : ''
}
publishing {
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = nexusStaging.username
password = nexusStaging.password
}
}
}
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
packaging = 'jar'
name = "$project.group:$project.name"
description = 'Records HTTP requests and plays them back as tests.'
url = "https://github.com/simkuenzi/$project.name"
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Simon Künzi'
email = 'sim.kuenzi@gmail.com'
organizationUrl = 'https://github.com/simkuenzi'
}
}
scm {
connection = 'scm:git:https://github.com/simkuenzi/' + project.name + '/' + project.name + '.git'
developerConnection = 'scm:git:https://github.com/simkuenzi/' + project.name + '/' + project.name + '.git'
url = "https://github.com/simkuenzi/$project.name"
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
useGpgCmd()
}
closeAndReleaseRepository.mustRunAfter = [publish]
release {
buildTasks = project.hasProperty('autoStaging') ? ['publish', 'closeAndReleaseRepository'] : ['publish']
}