Skip to content

Commit e6426b7

Browse files
authored
Add publish of test code jar to builds. (#1230)
1 parent 95987a2 commit e6426b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ task sourcesJar(type: Jar) {
138138
from sourceSets.main.allSource
139139
}
140140

141+
task testsJar(type: Jar) {
142+
archiveClassifier.set('tests')
143+
from sourceSets.test.allSource
144+
}
145+
141146
// run build before running fat jar to get classes
142147
task fatJar(type: Jar) {
143148
archiveClassifier.set('fat')
@@ -168,7 +173,7 @@ jacocoTestReport {
168173
}
169174

170175
artifacts {
171-
archives javadocJar, sourcesJar, examplesJar
176+
archives javadocJar, sourcesJar, examplesJar, testsJar
172177
}
173178

174179
nexusPublishing {
@@ -187,6 +192,7 @@ publishing {
187192
artifact sourcesJar
188193
artifact examplesJar
189194
artifact javadocJar
195+
artifact testsJar
190196
pom {
191197
name = 'jnats'
192198
packaging = 'jar'

0 commit comments

Comments
 (0)