Skip to content

Commit

Permalink
Add correct source manifest headers for OSGI (#244) (Fixes #242)
Browse files Browse the repository at this point in the history
* Improved OSGI sources manifest

* Added correct manifest entries for OSGI source bundle (Fixes #242)

* Removed empty sourceset
  • Loading branch information
hierynomus committed Apr 15, 2016
1 parent 11fbf29 commit 364a821
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 364a821

Please sign in to comment.