I’m working to assist the LMAX Disruptor team add OSGi headers back into their latest 4.0.0 release. I’m not familiar with gradle and require assistance.
The LMAX-Disruptor project uses gradle, and needs assistance configuring the gradle bundle plugin. Very simple jar. No external dependencies (JDK-only) and exports 3 packages.
Added:
import aQute.bnd.gradle.Bundle
tasks.register('bundle', Bundle) {
from sourceSets.main.output
}
I tried variations:
jar {
bundle {
bnd(
'Export-Package': 'com.lmax.disruptor,com.lmax.disruptor.dsl,com.lmax.disruptor.util',
'Import-Package': '!*'
)
}
}
and…
jar {
bundle {
bnd(
'-exportcontents': 'com.lmax.disruptor.*',
'-includepackage': '!*'
)
}
}
Continue to generate this MANIFEST.MF:
Manifest-Version: 1.0
Bnd-LastModified: 1630595039939
Bundle-ManifestVersion: 2
Bundle-Name: disruptor
Bundle-SymbolicName: disruptor
Bundle-Version: 4.0.0.SNAPSHOT
Created-By: 11.0.11 (Oracle Corporation)
Import-Package: java.lang,java.lang.invoke,java.lang.reflect,java.secu
rity,java.util,java.util.concurrent,java.util.concurrent.atomic,java.
util.concurrent.locks,java.util.function,sun.misc
Private-Package: com.lmax.disruptor,com.lmax.disruptor.dsl,com.lmax.di
sruptor.util
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
Tool: Bnd-5.3.0.202102221516
Assistance would be appreciated!
WIP lmax-osgi branch: GitHub - Palmr/disruptor at osgi