Configuring the jar task with additional bnd instructions using Kotlin DSL - bndtools/bnd GitHub Wiki

Configuring the jar task with additional bnd instructions using Kotlin DSL

apply(plugin = "biz.aQute.bnd.builder")

tasks["jar"].withConvention(aQute.bnd.gradle.BundleTaskConvention::class) {
	setBnd("""
		-noextraheaders: true
		-removeheaders: Private-Package
	""")
}