Consistently create manifests

This commit is a build cache optimization: while we don't really care about the 
manifest of
the "raw" cache, it's better to consistently create one that does **not** 
include the OSGI
last modified entry, as it will trigger unnecessary rebuilds, because of cache 
misses.


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/b019f9d5
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/b019f9d5
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/b019f9d5

Branch: refs/heads/GROOVY_2_5_X
Commit: b019f9d5eb61c79db702e7e0afea2dbf5a6fdf1b
Parents: da8fdb2
Author: Cedric Champeau <[email protected]>
Authored: Fri Dec 15 09:29:32 2017 +0100
Committer: Cedric Champeau <[email protected]>
Committed: Sun Dec 17 15:37:06 2017 +0100

----------------------------------------------------------------------
 gradle/assemble.gradle | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/b019f9d5/gradle/assemble.gradle
----------------------------------------------------------------------
diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle
index 0fdaf16..26174ce 100644
--- a/gradle/assemble.gradle
+++ b/gradle/assemble.gradle
@@ -113,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 (excludedFromManifest.any { it == details.key}) {
+            if (excludedFromManifest.any { it == details.key }) {
                 details.exclude()
             }
         }
@@ -143,6 +143,15 @@ allprojects {
     def producedJars = [jar]
     jar {
         appendix = 'raw'
+        manifest {
+            from(allManifest) {
+                eachEntry { details ->
+                    if (excludedFromManifest.any { it == details.key }) {
+                        details.exclude()
+                    }
+                }
+            }
+        }
     }
     if (rootProject.indyCapable()) {
         task jarWithIndy(type: Jar) {

Reply via email to