plugins { id 'distribution' id 'maven-publish' } repositories { mavenCentral() } configurations { jre } dependencies { jre 'net.adoptopenjdk:jre:11.0.10_9:x64@zip' } def client_exe_dir = "${buildDir}/unpacked/client" def versionEnding = System.getProperty("release.marker") == 'doRelease' ? '' : '-SNAPSHOT' version = "1.0.5"+versionEnding task unpackClient(type: Copy) { from zipTree('cnf.run/generated/distributions/executable/eclipse.jar') into client_exe_dir } task unpackJre(type: Copy, dependsOn: unpackClient) { from zipTree(configurations.jre.singleFile) into "${client_exe_dir}/jre" } distributions { main { baseName = 'minimal.eclipse.bnd' contents { from "${client_exe_dir}" } } } publish.dependsOn unpackJre publishing { publications { maven(MavenPublication) { artifact distZip groupId = 'minimal.eclipse.bnd' artifactId = 'minimal.eclipse.bnd.client' } } repositories { maven "${buildDir}/repo/" } }