Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,63 @@ project(':iceberg-pig') {
}
}

project(':iceberg-runtime') {
apply plugin: 'com.github.johnrengelman.shadow'

tasks.assemble.dependsOn tasks.shadowJar
tasks.install.dependsOn tasks.shadowJar
tasks.javadocJar.dependsOn tasks.shadowJar

configurations {
compileOnly {
// included in Spark
exclude group: 'org.slf4j'
exclude group: 'org.apache.commons'
exclude group: 'commons-pool'
exclude group: 'commons-codec'
exclude group: 'org.xerial.snappy'
exclude group: 'javax.xml.bind'
}
}

dependencies {
compileOnly project(':iceberg-core')
compileOnly project(':iceberg-orc')
compileOnly project(':iceberg-hive')
}

shadowJar {
// shade compileOnly dependencies to avoid including in transitive dependencies
configurations = [project.configurations.compileOnly]

zip64 true

// include the LICENSE and NOTICE files for the shaded Jar
from(projectDir) {
include 'LICENSE'
include 'NOTICE'
}

// Relocate dependencies to avoid conflicts
relocate 'com.google', 'org.apache.iceberg.shaded.com.google'
relocate 'com.fasterxml', 'org.apache.iceberg.shaded.com.fasterxml'
relocate 'com.github.benmanes', 'org.apache.iceberg.shaded.com.github.benmanes'
relocate 'org.checkerframework', 'org.apache.iceberg.shaded.org.checkerframework'
relocate 'org.apache.avro', 'org.apache.iceberg.shaded.org.apache.avro'
relocate 'avro.shaded', 'org.apache.iceberg.shaded.org.apache.avro.shaded'
relocate 'com.thoughtworks.paranamer', 'org.apache.iceberg.shaded.com.thoughtworks.paranamer'
relocate 'org.apache.parquet', 'org.apache.iceberg.shaded.org.apache.parquet'
relocate 'shaded.parquet', 'org.apache.iceberg.shaded.org.apache.parquet.shaded'
// relocate Avro's jackson dependency to share parquet-jackson locations
relocate 'org.codehaus.jackson', 'org.apache.iceberg.shaded.org.apache.parquet.shaded.org.codehaus.jackson'
relocate 'org.apache.orc', 'org.apache.iceberg.shaded.org.apache.orc'
relocate 'io.airlift', 'org.apache.iceberg.shaded.io.airlift'

archiveName = "iceberg-runtime-${version}.${extension}"
}
}


// the runtime jar is a self-contained artifact for testing in a notebook
project(':iceberg-spark-runtime') {
apply plugin: 'com.github.johnrengelman.shadow'
Expand Down
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ include 'parquet'
include 'spark'
include 'pig'
include 'runtime'
include 'spark-runtime'
include 'hive'

project(':api').name = 'iceberg-api'
Expand All @@ -37,6 +38,7 @@ project(':orc').name = 'iceberg-orc'
project(':parquet').name = 'iceberg-parquet'
project(':spark').name = 'iceberg-spark'
project(':pig').name = 'iceberg-pig'
project(':runtime').name = 'iceberg-spark-runtime'
project(':runtime').name = 'iceberg-runtime'
project(':spark-runtime').name = 'iceberg-spark-runtime'
project(':hive').name = 'iceberg-hive'