I assume you are using a Bnd workspace since you mention cnf/build.bnd. So you can set a version property in cnf/build.bnd for bundle versions which you can reference in Gradle. In a non-Bnd gradle sub-project, you can ask the workspace via rootProject.bndWorkspace which holds the Bnd Workspace object.
--
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
----- Original message -----
From: "M.J. Heuveling" <mi...@heuveling.net>
Sent by: osgi-dev-boun...@mail.osgi.org
To: osgi-dev@mail.osgi.org
Cc:
Subject: [osgi-dev] Gradle v.s. Build.bnd Versioning
Date: Sun, Jun 25, 2017 9:17 PM
Hi all,
I am struggling a little with versioning. Reason for this is I want create a karaf feature xml with the same version as the OSGI bundles I am creating for my project.
As far as I know BND will not create a features XML for me does it?
Anyway, I created a sub project with a gradle build file which will generate and publish the karaf feature xml file.
I now want to give it the same version as what I have specified in my cnf/build.bnd file. How can I either set the version from gradle into the build.bnd or use the version from the build.bnd to set in my “non-bundle” sub project?
Any best practices that could help me out here?
Thanks,
Misja
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev