[ 
https://issues.apache.org/jira/browse/GEODE-8239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143415#comment-17143415
 ] 

ASF GitHub Bot commented on GEODE-8239:
---------------------------------------

rhoughton-pivot commented on a change in pull request #5292:
URL: https://github.com/apache/geode/pull/5292#discussion_r444573116



##########
File path: gradle/java.gradle
##########
@@ -29,88 +29,65 @@ targetCompatibility = 1.8
 compileJava.options.encoding = 'UTF-8'
 
 dependencies {
-  // log4j-core has an annotation processor that is passed on the 
compile-classpath via geode-core and others.
-  // Fix Gradle warning here until we clean up our own classpath
-  annotationProcessor 'org.apache.logging.log4j:log4j-core:' + 
DependencyConstraints.get('log4j.version')
+    // log4j-core has an annotation processor that is passed on the 
compile-classpath via geode-core and others.
+    // Fix Gradle warning here until we clean up our own classpath
+    annotationProcessor 'org.apache.logging.log4j:log4j-core:' + 
DependencyConstraints.get('log4j.version')
 }
 
 String javaVersion = System.properties['java.version']
 if (javaVersion.startsWith("1.8.0") && 
javaVersion.split("-")[0].split("_")[1].toInteger() < 121) {
-  throw new GradleException("Java version 1.8.0_121 or later required, but was 
" + javaVersion)
+    throw new GradleException("Java version 1.8.0_121 or later required, but 
was " + javaVersion)
 }
 
 // apply compiler options
 gradle.taskGraph.whenReady({ graph ->
-  tasks.withType(JavaCompile).each { javac ->
-    javac.configure {
-      sourceCompatibility '1.8'
-      targetCompatibility '1.8'
-      options.encoding = 'UTF-8'
+    tasks.withType(JavaCompile).each { javac ->
+        javac.configure {
+            sourceCompatibility '1.8'
+            targetCompatibility '1.8'
+            options.encoding = 'UTF-8'
+        }
+        javac.options.incremental = true
+        javac.options.fork = true
+        javac.options.forkOptions.with({

Review comment:
       See above about indentation.

##########
File path: geode-modules/build.gradle
##########
@@ -163,5 +162,7 @@ dependencies {
     module4WithManifestCompileOnly(sourceSets.test.output)
     module5WithManifestCompileOnly(sourceSets.test.output)
 
-    module1WithManifestCompile('org.springframework:spring-core')
+    module1WithManifestCompile('com.google.guava:guava:29.0-jre')

Review comment:
       Check in 
`buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy`
 to see if this version is already defined

##########
File path: geode-modules/build.gradle
##########
@@ -163,5 +162,7 @@ dependencies {
     module4WithManifestCompileOnly(sourceSets.test.output)
     module5WithManifestCompileOnly(sourceSets.test.output)
 
-    module1WithManifestCompile('org.springframework:spring-core')
+    module1WithManifestCompile('com.google.guava:guava:29.0-jre')
+
+    testCompile(project(":geode-core"))

Review comment:
       Prefer `testImplementation` over `testCompile`

##########
File path: gradle.properties
##########
@@ -82,3 +82,4 @@ org.gradle.parallel = true
 
 org.gradle.internal.http.socketTimeout=120000
 org.gradle.internal.http.connectionTimeout=120000
+org.gradle.workers.max = 3

Review comment:
       Really not sure about this change. I think it will slow down builds a 
ton.

##########
File path: gradle/java.gradle
##########
@@ -29,88 +29,65 @@ targetCompatibility = 1.8
 compileJava.options.encoding = 'UTF-8'
 
 dependencies {
-  // log4j-core has an annotation processor that is passed on the 
compile-classpath via geode-core and others.
-  // Fix Gradle warning here until we clean up our own classpath
-  annotationProcessor 'org.apache.logging.log4j:log4j-core:' + 
DependencyConstraints.get('log4j.version')
+    // log4j-core has an annotation processor that is passed on the 
compile-classpath via geode-core and others.

Review comment:
       See above about indentation.

##########
File path: gradle/java.gradle
##########
@@ -17,10 +17,10 @@
 import org.apache.geode.gradle.plugins.DependencyConstraints
 
 if (project.name.endsWith("geode-all-bom")) {
-  // This anti-pattern is a workaround -- java-platform must be applied before 
java or java-library
-  // to avoid conflicts over redefining certain configurations.
-  // Evaluation as to whether java-platform should be applied at all is left 
to GEODE-6611.
-  apply plugin: 'java-platform'
+    // This anti-pattern is a workaround -- java-platform must be applied 
before java or java-library

Review comment:
       Please restore this to a two-space indent, and change style in a 
different PR.

##########
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:
       Would love if we could merge the new attributes in, instead of 
overwriting. Any chance of that, before we merge to `develop` ?




----------------------------------------------------------------
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:
[email protected]


> Gradle configuration to create manifests for all Geode jars
> -----------------------------------------------------------
>
>                 Key: GEODE-8239
>                 URL: https://issues.apache.org/jira/browse/GEODE-8239
>             Project: Geode
>          Issue Type: Sub-task
>          Components: client/server
>            Reporter: Patrick Johnsn
>            Assignee: Patrick Johnsn
>            Priority: Major
>
> Modify the Gradle configuration to generate a manifest file with "Class-Path" 
> and "Dependent-Modules" attributes inside the jars. This manifest will be 
> used when defining modules using the jars.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to