plugins { id 'java-library' } group = "net.woggioni.osgi" configurations { tar { visible = true canBeConsumed = true transitive = false } } dependencies { compileOnly catalog.osgi.core compileOnly catalog.osgi.annotation compileOnly catalog.osgi.service.component.annotations compileOnly project(":osgi-app:osgi-simple-bootstrapper-api") } Provider tarTaskProvider = tasks.register("tar", Tar) { archiveFileName = "${project.name}.tar" from(project.tasks.named(JavaPlugin.JAR_TASK_NAME) .flatMap { it.archiveFile } .map { it.getAsFile() } .map(project.&zipTree)) } artifacts { tar tarTaskProvider }