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/e7ee1f2d
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/e7ee1f2d
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/e7ee1f2d

Branch: refs/heads/GROOVY_2_6_X
Commit: e7ee1f2da24adf7f2f32cf55eb82933ef2e36128
Parents: 386389d
Author: Cedric Champeau <[email protected]>
Authored: Fri Dec 15 09:29:32 2017 +0100
Committer: Cedric Champeau <[email protected]>
Committed: Sun Dec 17 14:53:23 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/groovy/blob/e7ee1f2d/gradle/assemble.gradle
----------------------------------------------------------------------
diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle
index e56fd2b..c02659c 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