-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
153 lines (129 loc) · 4.35 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
plugins {
// Apply the java plugin to add support for Java
id 'java-library'
id 'maven-publish'
id 'signing'
id 'io.codearte.nexus-staging' version '0.21.1'
id 'de.marcphilipp.nexus-publish' version '0.4.0'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}
group 'com.slickqa'
version '1.0.0-' + projectBuildNumber
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
sourceCompatibility = 1.8
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
}
dependencies {
// This dependency is used by the application.
implementation 'com.google.guava:guava:28.0-jre'
// Use JUnit Jupiter API for testing.
testImplementation 'com.google.truth:truth:1.0'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.4.2'
compile 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
compile 'org.junit.jupiter:junit-jupiter-api:5.4.2'
compile 'org.junit.platform:junit-platform-engine:1.5.1'
compile 'org.junit.platform:junit-platform-launcher:1.5.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.9.1'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.9'
compile 'com.slickqa:slickqa-junit-jupiter:1.0.0-25'
compile 'info.picocli:picocli:4.0.3'
compile 'io.github.classgraph:classgraph:4.8.47'
compile 'de.vandermeer:asciitable:0.3.2'
compile 'org.jline:jline:3.12.1'
}
test {
// Use junit platform for unit tests
useJUnitPlatform {
filter {
excludeTestsMatching 'com.slickqa.junit.testrunner.example.*'
}
}
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
with copySpec {
from 'src/main/resources'
filter ReplaceTokens, tokens: [
version: version,
]
}
}
// Shadowing Test Sources and Dependencies
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
task testJar(type: ShadowJar) {
appendix = 'test'
configurations = [project.configurations.compile, project.configurations.testRuntimeClasspath]
from sourceSets.main.output
from sourceSets.test.output
//configurations = [project.configurations.testRuntime]
mergeServiceFiles()
manifest {
attributes 'Main-Class': 'com.slickqa.junit.testrunner.TestRunnerMain'
}
}
task javadocJar(type: Jar) {
archiveClassifier.set("javadoc")
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'junit-testrunner'
description = 'A testrunner for junit that has the ability to configure slick automatically.'
url = 'https://github.com/slickqa/junit-testrunner'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'jasoncorbett'
name = 'Jason Corbett'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/slickqa/junit-testrunner.git'
developerConnection = 'scm:git:https://github.com/slickqa/junit-testrunner.git'
url = 'https://github.com/slickqa/junit-testrunner'
}
}
}
}
}
signing {
required { isReleaseVersion }
sign publishing.publications.mavenJava
}
nexusStaging {
packageGroup = 'com.slickqa'
username = ossrhUsername
password = ossrhPassword
numberOfRetries = 80
}
nexusPublishing {
repositories {
sonatype {
username = ossrhUsername // defaults to project.properties["nexusUsername"]
password = ossrhPassword // defaults to project.properties["nexusPassword"]
connectTimeout = java.time.Duration.ofMinutes(5)
clientTimeout = java.time.Duration.ofMinutes(5)
}
}
}