From 858492b1777e0b2d2c319daea445bf5631947189 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 28 Apr 2014 11:22:42 +0200 Subject: [PATCH] Fix OSGi Bundle-Version Bundle-Version's forth field, the qualifier, must be separated from the 'micro' version with a dot. --- build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e60a608a6..21e699db8 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,12 @@ allprojects { ext.sharedManifest = manifest { attributes('Implementation-Version': version, 'Implementation-GitRevision': ext.gitCommit, - 'Bundle-Version': version) + // According to OSGi core 5.0 section 3.2.5 the qualifier (the fourth + // version element) must begin with a dot. So we replace only the + // first occurence of an dash with a dot. + // For example 4.0.0-rc1 becomes 4.0.0.rc1, but + // 4.0.0-SNAPSHOT-2014-05-01 becomes 4.0.0.SNAPSHOT-2014-05-01 + 'Bundle-Version': version.replaceFirst("-", ".")) } }