More tweaks to the MANIFEST entry
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/9edb31f4 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/9edb31f4 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/9edb31f4 Branch: refs/heads/GROOVY_2_6_X Commit: 9edb31f4d8c39f217974c93347cd5c8f5ef1c136 Parents: d389d26 Author: Cedric Champeau <[email protected]> Authored: Thu Dec 14 12:27:09 2017 +0100 Committer: Cedric Champeau <[email protected]> Committed: Sun Dec 17 14:28:37 2017 +0100 ---------------------------------------------------------------------- gradle/assemble.gradle | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/9edb31f4/gradle/assemble.gradle ---------------------------------------------------------------------- diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle index 819e4cf..d60fab4 100644 --- a/gradle/assemble.gradle +++ b/gradle/assemble.gradle @@ -82,8 +82,15 @@ task copy(type: Copy) { into "$buildDir/meta" } +// unnecessary entries which in addition may trigger unnecessary rebuilds +def excludedFromManifest = [ + 'Originally-Created-By', + 'Bnd-LastModified', + 'Created-By' +] + ext.allManifest = manifest { - attributes('Built-By': System.properties['user.name'], + attributes( 'Extension-Name': 'groovy', 'Specification-Title': 'Groovy: a powerful, dynamic language for the JVM', 'Specification-Version': groovyBundleVersion, @@ -106,7 +113,7 @@ ext.groovyOsgiManifest = { // Exclude the Bnd-LastModified attribute as it always triggers a rebuild without being really needed. from(allManifest) { eachEntry { details -> - if (details.key == 'Bnd-LastModified') { + if (excludedFromManifest.any { it == details.key}) { details.exclude() } } @@ -121,7 +128,7 @@ ext.subprojectOsgiManifest = { // Exclude attributes not needed for subprojects. from(allManifest) { eachEntry { details -> - if (details.key in ['Bnd-LastModified', 'Extension-Name', 'Bundle-Name', 'Bundle-Description', 'Main-class']) { + if (details.key in [*excludedFromManifest, 'Bnd-LastModified', 'Extension-Name', 'Bundle-Name', 'Bundle-Description', 'Main-class']) { details.exclude() } }
