Skip to content
Open
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
74 changes: 74 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,80 @@ tasks.register('checkAllRuntimeDeps') {
}
}

tasks.register('verifyRuntimeDepsApplied') {
description = 'Ensures every subproject either applies runtime-deps.gradle or is explicitly excluded'
group = 'verification'

// Every subproject must either apply runtime-deps.gradle or be listed here.
def excluded = [
// Aggregate modules — no artifacts produced
'iceberg-bom',
'iceberg-spark',
'iceberg-flink',
'iceberg-kafka-connect',
// Library and catalog modules — publish normal JARs, not fat JARs
'iceberg-bundled-guava',
'iceberg-open-api',
'iceberg-api',
'iceberg-common',
'iceberg-core',
'iceberg-data',
'iceberg-arrow',
'iceberg-orc',
'iceberg-parquet',
'iceberg-hive-metastore',
'iceberg-nessie',
'iceberg-delta-lake',
'iceberg-mr',
'iceberg-aliyun',
'iceberg-aws',
'iceberg-azure',
'iceberg-gcp',
'iceberg-bigquery',
'iceberg-dell',
'iceberg-snowflake',
// Integration modules — the corresponding *-runtime carries the shadow JAR
'iceberg-spark-3.4_2.12',
'iceberg-spark-3.4_2.13',
'iceberg-spark-3.5_2.12',
'iceberg-spark-3.5_2.13',
'iceberg-spark-4.0_2.13',
'iceberg-spark-4.1_2.13',
'iceberg-spark-extensions-3.4_2.12',
'iceberg-spark-extensions-3.4_2.13',
'iceberg-spark-extensions-3.5_2.12',
'iceberg-spark-extensions-3.5_2.13',
'iceberg-spark-extensions-4.0_2.13',
'iceberg-spark-extensions-4.1_2.13',
'iceberg-flink-1.20',
'iceberg-flink-2.0',
'iceberg-flink-2.1',
'iceberg-kafka-connect-events',
'iceberg-kafka-connect-transforms',
] as Set

doLast {
def uncovered = []
subprojects.each { subproject ->
if (!excluded.contains(subproject.name) &&
subproject.tasks.matching { it.name == 'checkRuntimeDeps' }.isEmpty()) {
uncovered << subproject.name
}
}
if (uncovered) {
throw new GradleException(
"The following modules are missing runtime-deps.gradle and are not in the exclusion list:\n" +
uncovered.toSorted().collect { " - ${it}" }.join('\n') + '\n\n' +
"Either apply runtime-deps.gradle to the module or add it to the exclusion list in " +
"the verifyRuntimeDepsApplied task in build.gradle.")
}
}
}

tasks.named('checkAllRuntimeDeps') {
dependsOn 'verifyRuntimeDepsApplied'
}

subprojects {
if (it.name == 'iceberg-bom') {
// the BOM does not build anything, the code below expects "source code"
Expand Down
4 changes: 2 additions & 2 deletions runtime-deps.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
// lifecycle.
//
// Workflow:
// 1. ./gradlew check -- fails if deps changed
// 2. ./gradlew generateRuntimeDeps -- auto-updates all baselines
// 1. ./gradlew checkAllRuntimeDeps -DallModules=true -- fails if deps changed
// 2. ./gradlew generateRuntimeDeps -DallModules=true -- auto-updates all baselines
// 3. Update LICENSE and NOTICE if dependency licenses changed -- This is a Manual Step
// 4. Commit

Expand Down
Loading