Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add publish of test code jar to builds. #1230

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading