gradle-bundle-plugin
gradle-bundle-plugin copied to clipboard
Export of the sources only from classes folder
I can be mistaken about any tricks with Export-Package in this plugin. As for me default behavior from maven-bundle-plugin and gradle osgi plugin looks very handy with exporting all packages except impl and internal under source folder. Here corresponding doc for maven http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#default-behavior
May be I miss something, since I haven't read plugin sources yet
Or may be you could give me example for Export-Package except the specifying concrete package for every module?
I am also interested in this. So far the best I have come up with is exporting the unique part of the java package compared to other modules, and it auto-exports the rest underneath. If there was a mode where it would auto-detect this like you mentioned above, that would be great.
instruction 'Export-Package', 'com.company.appName.module.*'
I understand that such approach of writing down packages is ok, however I'm working on migration about 300 bundles from maven to gradle and manual handling is not an option Hopefully I can afford merge request of this functionality if no such
One of the reasons why this plugin was developed in the first place was that there were people who were unhappy with the default behaviour of the built-in osgi plugin, particularly with the default value it sets for Export-Package, which is "*;-noimport:=false;version=" + getVersion() (see https://github.com/gradle/gradle/blob/master/subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifest.java). In this plugin the same value can be set by hand.
On 11 November 2015 at 18:27, SOVALINUX [email protected] wrote:
I understand that such approach of writing down packages is ok, however I'm working on migration about 300 bundles from maven to gradle and manual handling is not an option Hopefully I can afford merge request of this functionality if no such
— Reply to this email directly or view it on GitHub https://github.com/TomDmitriev/gradle-bundle-plugin/issues/36#issuecomment-155815829 .
Yours sincerely, Artyom Dmitriev
Hm, looks like the trick not only in Export-Package. I think theirs analyzer.setJar(getClassesDir()); also plays significant role I still having all dependencies included in export-package and it becomes 250kb Also resulting bundle contains a lot of code included from the dependency jars