rdblue commented on a change in pull request #4009:
URL: https://github.com/apache/iceberg/pull/4009#discussion_r798830156
##########
File path: spark/v3.2/build.gradle
##########
@@ -17,258 +17,301 @@
* under the License.
*/
-def sparkProjects = [
+def sparkProjects212 = [
project(':iceberg-spark:iceberg-spark-3.2_2.12'),
project(":iceberg-spark:iceberg-spark-extensions-3.2_2.12"),
project(':iceberg-spark:iceberg-spark-runtime-3.2_2.12')
]
-configure(sparkProjects) {
+def sparkProjects213 = [
+ project(':iceberg-spark:iceberg-spark-3.2_2.13'),
+ project(":iceberg-spark:iceberg-spark-extensions-3.2_2.13"),
+ project(':iceberg-spark:iceberg-spark-runtime-3.2_2.13')
+]
+
+configure(sparkProjects212) {
project.ext {
sparkVersion = '3.2.0'
+ scalaMajorVersion = '2.12'
+ scalaMinorVersion = '2.12.10'
}
configurations {
all {
resolutionStrategy {
- force 'com.fasterxml.jackson.module:jackson-module-scala_2.12:2.12.3'
+ force
"com.fasterxml.jackson.module:jackson-module-scala_${scalaMajorVersion}:2.12.3"
force 'com.fasterxml.jackson.module:jackson-module-paranamer:2.12.3'
}
}
}
}
-project(':iceberg-spark:iceberg-spark-3.2_2.12') {
- apply plugin: 'scala'
- apply plugin: 'com.github.alisiikh.scalastyle'
+configure(sparkProjects213) {
+ project.ext {
+ sparkVersion = '3.2.0'
+ scalaMajorVersion = '2.13'
+ scalaMinorVersion = '2.13.8'
+ }
- sourceSets {
- main {
- scala.srcDirs = ['src/main/scala', 'src/main/java']
- java.srcDirs = []
+ configurations {
+ all {
+ resolutionStrategy {
+ force
'com.fasterxml.jackson.module:jackson-module-scala_${scalaMajorVersion}:2.12.3'
+ force 'com.fasterxml.jackson.module:jackson-module-paranamer:2.12.3'
+ }
}
}
+}
- dependencies {
- implementation project(path: ':iceberg-bundled-guava', configuration:
'shadow')
- api project(':iceberg-api')
- implementation project(':iceberg-common')
- implementation project(':iceberg-core')
- implementation project(':iceberg-data')
- implementation project(':iceberg-orc')
- implementation project(':iceberg-parquet')
- implementation project(':iceberg-arrow')
-
- compileOnly "com.google.errorprone:error_prone_annotations"
- compileOnly "org.apache.avro:avro"
- compileOnly("org.apache.spark:spark-hive_2.12:${sparkVersion}") {
- exclude group: 'org.apache.avro', module: 'avro'
- exclude group: 'org.apache.arrow'
- // to make sure io.netty.buffer only comes from project(':iceberg-arrow')
- exclude group: 'io.netty', module: 'netty-buffer'
- exclude group: 'org.roaringbitmap'
- }
+def spark_3_2_project(String projectScalaMajorVersion) {
+ project(":iceberg-spark:iceberg-spark-3.2_${projectScalaMajorVersion}") {
+ apply plugin: 'scala'
+ apply plugin: 'com.github.alisiikh.scalastyle'
- implementation("org.apache.orc:orc-core::nohive") {
- exclude group: 'org.apache.hadoop'
- exclude group: 'commons-lang'
- // These artifacts are shaded and included in the orc-core fat jar
- exclude group: 'com.google.protobuf', module: 'protobuf-java'
- exclude group: 'org.apache.hive', module: 'hive-storage-api'
+ sourceSets {
+ main {
+ scala.srcDirs = ['src/main/scala', 'src/main/java']
+ java.srcDirs = []
+ }
}
- implementation("org.apache.arrow:arrow-vector") {
- exclude group: 'io.netty', module: 'netty-buffer'
- exclude group: 'io.netty', module: 'netty-common'
- exclude group: 'com.google.code.findbugs', module: 'jsr305'
- }
+ dependencies {
+ implementation project(path: ':iceberg-bundled-guava', configuration:
'shadow')
+ api project(':iceberg-api')
+ implementation project(':iceberg-common')
+ implementation project(':iceberg-core')
+ implementation project(':iceberg-data')
+ implementation project(':iceberg-orc')
+ implementation project(':iceberg-parquet')
+ implementation project(':iceberg-arrow')
+
implementation("org.scala-lang.modules:scala-collection-compat_${scalaMajorVersion}:2.6.0")
Review comment:
Only Scala versions should be embedded directly. Everything else can
still use versions.props because you can have multiple entries as long as the
Scala library has the Scala version in the artifact name like this one
(`scala-collection-compat_2.13`).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]