From 461001928b4cef7693d881257e40175fc08058f3 Mon Sep 17 00:00:00 2001 From: scottf Date: Mon, 23 Sep 2024 11:51:45 -0400 Subject: [PATCH] Add publish of test code jar to builds. --- build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 41fef81a7..a82084764 100644 --- a/build.gradle +++ b/build.gradle @@ -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') @@ -168,7 +173,7 @@ jacocoTestReport { } artifacts { - archives javadocJar, sourcesJar, examplesJar + archives javadocJar, sourcesJar, examplesJar, testsJar } nexusPublishing { @@ -187,6 +192,7 @@ publishing { artifact sourcesJar artifact examplesJar artifact javadocJar + artifact testsJar pom { name = 'jnats' packaging = 'jar'