From 364a82154d47b0efe5ee47cc23b3b09909a78b90 Mon Sep 17 00:00:00 2001 From: Jeroen van Erp Date: Fri, 15 Apr 2016 11:01:50 +0200 Subject: [PATCH] Add correct source manifest headers for OSGI (#244) (Fixes #242) * Improved OSGI sources manifest * Added correct manifest entries for OSGI source bundle (Fixes #242) * Removed empty sourceset --- build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b8f85d3d..16dd09af 100644 --- a/build.gradle +++ b/build.gradle @@ -103,7 +103,16 @@ task javadocJar(type: Jar) { task sourcesJar(type: Jar) { classifier = 'sources' from sourceSets.main.allSource - manifest = project.tasks.jar.manifest + manifest { + attributes( + // Add the needed OSGI attributes + "Bundle-ManifestVersion": "2", + "Bundle-Name": "${project.jar.manifest.name} Source", + "Bundle-Version": project.jar.manifest.version, + "Eclipse-SourceBundle": "${project.jar.manifest.symbolicName};version=\"${project.jar.manifest.version}\";roots:=\".\"", + "Bundle-SymbolicName": "${project.jar.manifest.symbolicName}.source" + ) + } } artifacts {