You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/04/29 01:16:16 UTC

[GitHub] [incubator-iceberg] rdsr commented on a change in pull request #935: [WIP] Internal relocated version of Guava

rdsr commented on a change in pull request #935:
URL: https://github.com/apache/incubator-iceberg/pull/935#discussion_r417014632



##########
File path: build.gradle
##########
@@ -101,8 +97,40 @@ apply from: 'deploy.gradle'
 apply from: 'tasks.gradle'
 apply from: 'jmh.gradle'
 
+project(':iceberg-relocate-external-dependencies') {

Review comment:
       I'm ok with not being minimized.

##########
File path: build.gradle
##########
@@ -108,8 +104,42 @@ apply from: 'deploy.gradle'
 apply from: 'tasks.gradle'
 apply from: 'jmh.gradle'
 
+project(':iceberg-relocate-external-dependencies') {
+  apply plugin: 'com.github.johnrengelman.shadow'
+  
+  tasks.javadoc.enabled = false
+  tasks.javadocJar.enabled = false
+  tasks.assemble.dependsOn tasks.shadowJar
+  tasks.install.dependsOn tasks.shadowJar
+  
+  dependencies {    
+    compile('com.google.guava:guava:28.0-jre') {
+      exclude group: 'com.google.code.findbugs'
+      // may be LGPL - use ALv2 findbugs-annotations instead
+      exclude group: 'com.google.errorprone'
+      exclude group: 'com.google.j2objc'
+    }
+  }
+  
+  shadowJar {
+    configurations = [project.configurations.compile]
+    zip64 true
+
+    // include the LICENSE and NOTICE files for the shaded Jar
+    from(projectDir) {
+      include 'LICENSE'
+      include 'NOTICE'
+    }
+
+    relocate 'com.google.common', 'com.google.common.shaded'

Review comment:
       I don't want to trigger a big set of changes, but just wanted to hear what people think about this. Is `com.google.common.shaded` too generic and can conflict? Should everything we shade be something like `iceberg.[original.package.name]`

##########
File path: build.gradle
##########
@@ -108,8 +104,42 @@ apply from: 'deploy.gradle'
 apply from: 'tasks.gradle'
 apply from: 'jmh.gradle'
 
+project(':iceberg-relocate-external-dependencies') {
+  apply plugin: 'com.github.johnrengelman.shadow'
+  
+  tasks.javadoc.enabled = false
+  tasks.javadocJar.enabled = false
+  tasks.assemble.dependsOn tasks.shadowJar
+  tasks.install.dependsOn tasks.shadowJar
+  
+  dependencies {    
+    compile('com.google.guava:guava:28.0-jre') {
+      exclude group: 'com.google.code.findbugs'
+      // may be LGPL - use ALv2 findbugs-annotations instead
+      exclude group: 'com.google.errorprone'
+      exclude group: 'com.google.j2objc'
+    }
+  }
+  
+  shadowJar {
+    configurations = [project.configurations.compile]
+    zip64 true
+
+    // include the LICENSE and NOTICE files for the shaded Jar
+    from(projectDir) {
+      include 'LICENSE'
+      include 'NOTICE'
+    }
+
+    relocate 'com.google.common', 'com.google.common.shaded'
+    
+    minimize()
+  }
+}
+
 project(':iceberg-api') {
   dependencies {
+    compile project(path: ':iceberg-relocate-external-dependencies', configuration: 'shadow')

Review comment:
       Does this work well with your IDE?




----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org