@@ -15,15 +15,19 @@ group = 'io.nats'
1515
1616def isRelease = System . getenv(" BUILD_EVENT" ) == " release"
1717def tc = System . getenv(" TARGET_COMPATIBILITY" )
18- def targetId = tc == " 25" ? " 25" : " 21"
19- def targetJavaVersion = tc == " 25" ? JavaVersion . VERSION_25 : JavaVersion . VERSION_21
20- def artifact = " nkeys-java-jdk" + targetId
21- def bundleName = " io.nats.nkeys.java.jdk" + targetId
18+ def targetJavaVersion = tc == null ? JavaVersion . VERSION_1_8 : JavaVersion . toVersion(tc)
19+ def targetId = targetJavaVersion. toString()
20+ def artifact = " nkeys-java" + (targetJavaVersion == JavaVersion . VERSION_1_8 ? " " : " -jdk" + targetId)
21+ def bundleName = " io.nats.nkeys.java" + (targetJavaVersion == JavaVersion . VERSION_1_8 ? " " : " .jdk" + targetId)
22+
23+ System . out. println (" targetCompatibility: " + targetId)
24+ System . out. println (" artifact: " + artifact)
25+ System . out. println (" bundleName: " + bundleName)
2226
2327version = isRelease ? jarVersion : jarVersion + " -SNAPSHOT" // version is the variable the gradle uses.
2428
2529java {
26- sourceCompatibility = JavaVersion . VERSION_21
30+ sourceCompatibility = JavaVersion . VERSION_1_8
2731 targetCompatibility = targetJavaVersion
2832 withSourcesJar()
2933 withJavadocJar()
@@ -41,6 +45,8 @@ dependencies {
4145
4246 testImplementation ' org.junit.jupiter:junit-jupiter:5.7.0'
4347 testImplementation ' nl.jqno.equalsverifier:equalsverifier:3.12.3'
48+
49+ testRuntimeOnly ' org.junit.platform:junit-platform-launcher'
4450}
4551
4652tasks. register(' bundle' , Bundle ) {
0 commit comments