aokolnychyi commented on a change in pull request #1728:
URL: https://github.com/apache/iceberg/pull/1728#discussion_r518892881
##########
File path: build.gradle
##########
@@ -884,6 +884,49 @@ project(':iceberg-spark3') {
}
}
+project(":iceberg-spark3-extensions") {
+ apply plugin: 'java'
+ apply plugin: 'scala'
+ apply plugin: 'antlr'
+
+ configurations {
+ /*
+ The Gradle Antlr plugin erroneously adds both antlr-build and runtime
dependencies to the runtime path. This
+ bug https://github.com/gradle/gradle/issues/820 exists because older
versions of Antlr do not have separate
+ runtime and compile dependencies and they do not want to break backwards
compatibility. So to only end up with
+ the runtime dependency on the runtime classpath we remove the
dependencies added by the plugin here. Then add
+ the runtime dependency back to only the runtime configuration manually.
+ */
+ compile {
+ extendsFrom = extendsFrom.findAll { it != configurations.antlr }
+ }
+ }
+
+ dependencies {
+ compileOnly project(':iceberg-spark3')
+
+ compileOnly "org.scala-lang:scala-library"
+ compileOnly("org.apache.spark:spark-hive_2.12") {
+ exclude group: 'org.apache.avro', module: 'avro'
+ exclude group: 'org.apache.arrow'
+ }
+
+ testCompile project(path: ':iceberg-api', configuration: 'testArtifacts')
+ testCompile project(path: ':iceberg-hive-metastore', configuration:
'testArtifacts')
+ testCompile project(path: ':iceberg-spark', configuration: 'testArtifacts')
+ testCompile project(path: ':iceberg-spark3', configuration:
'testArtifacts')
+
+ // Required because we remove antlr plugin dependencies from the compile
configuration, see note above
+ runtime "org.antlr:antlr4-runtime:4.7.1"
Review comment:
This is the same version Spark uses.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]