You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/06/24 00:10:17 UTC

[GitHub] [geode] kohlmu-pivotal commented on a change in pull request #5292: GEODE-8239 - Add Gradle config to generate manifest file

kohlmu-pivotal commented on a change in pull request #5292:
URL: https://github.com/apache/geode/pull/5292#discussion_r444574296



##########
File path: gradle/publish-java.gradle
##########
@@ -28,3 +28,53 @@ publishing {
     }
   }
 }
+
+gradle.taskGraph.whenReady({ graph ->
+  tasks.withType(Jar).each { jar ->
+    jar.doFirst {
+      def projectDependencies = []
+      def runtimeList = []
+
+      configurations.runtimeClasspath
+              .collect { it.name - ".jar" }
+              .each { dependency ->
+                if (dependency.startsWith("geode-")) {
+                  projectDependencies.add(dependency)
+                } else {
+                  runtimeList.add(dependency)
+                }
+              }
+
+      projectDependencies.clone().each { projectDependency ->
+        def geodeProject = projectDependency - "-${version}.jar"
+          if (projectDependencies.contains(geodeProject)) {
+            def parentProject = project(":$geodeProject" - "-$version")
+            if (parentProject != null) {
+              def collect = parentProject.configurations.runtimeClasspath.collect { it.name - ".jar" }
+              runtimeList.removeAll(collect)
+              projectDependencies.removeAll(collect)
+            }
+          }
+        }
+
+      manifest {
+        attributes(
+                "Manifest-Version": "1.0",

Review comment:
       Yes.. we intended to merge this into `develop`. But we wanted to run against this feature branch first.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org