Skip to content

Commit

Permalink
Add publish of test code jar to builds. (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottf authored Sep 23, 2024
1 parent 95987a2 commit e6426b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ task sourcesJar(type: Jar) {
from sourceSets.main.allSource
}

task testsJar(type: Jar) {
archiveClassifier.set('tests')
from sourceSets.test.allSource
}

// run build before running fat jar to get classes
task fatJar(type: Jar) {
archiveClassifier.set('fat')
Expand Down Expand Up @@ -168,7 +173,7 @@ jacocoTestReport {
}

artifacts {
archives javadocJar, sourcesJar, examplesJar
archives javadocJar, sourcesJar, examplesJar, testsJar
}

nexusPublishing {
Expand All @@ -187,6 +192,7 @@ publishing {
artifact sourcesJar
artifact examplesJar
artifact javadocJar
artifact testsJar
pom {
name = 'jnats'
packaging = 'jar'
Expand Down

0 comments on commit e6426b7

Please sign in to comment.