/* * Builds the cbsnexora-dsc-helper.jar consumed by the JNLP from /api/v1/dsc/helper.jar. * * Targets Java 1.8 so the broadest set of client JREs (incl. legacy OpenWebStart installs) * can launch the helper. The JAR is a "fat" jar with Gson shaded in — JNLP can only * list one cleanly, and avoiding network round-trips for tiny Gson is a win. */ plugins { id 'java' } group = 'com.cbsnexora' version = '1.0.0' java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } repositories { mavenCentral() } dependencies { implementation 'com.google.code.gson:gson:2.10.1' } jar { archiveBaseName = 'cbsnexora-dsc-helper' archiveClassifier = '' manifest { attributes( 'Main-Class' : 'com.cbsnexora.dsc.CbsnexoraDscHelper', 'Permissions' : 'all-permissions', 'Application-Name' : 'CBSnexora DSC Helper', 'Codebase' : '*', 'Implementation-Version': project.version ) } // Shade Gson into the same jar so JNLP only needs one entry. duplicatesStrategy = DuplicatesStrategy.EXCLUDE from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } // Strip signatures from shaded deps so re-signing the fat jar is clean. exclude 'META-INF/*.SF' exclude 'META-INF/*.DSA' exclude 'META-INF/*.RSA' }