diff --git a/aws-bundle/build.gradle b/aws-bundle/build.gradle index 5b9054812a50..f9d356a774f5 100644 --- a/aws-bundle/build.gradle +++ b/aws-bundle/build.gradle @@ -44,7 +44,7 @@ project(":iceberg-aws-bundle") { shadowJar { archiveClassifier.set(null) - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/azure-bundle/build.gradle b/azure-bundle/build.gradle index 0bdc30fdaa7e..25a1e4c856fe 100644 --- a/azure-bundle/build.gradle +++ b/azure-bundle/build.gradle @@ -32,7 +32,7 @@ project(":iceberg-azure-bundle") { shadowJar { archiveClassifier.set(null) - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/baseline.gradle b/baseline.gradle index 7884c1a65ae3..c4cea08c7507 100644 --- a/baseline.gradle +++ b/baseline.gradle @@ -36,7 +36,6 @@ subprojects { // Thus we concede to applying all of the Baseline plugins individually on all the projects we are // ready to enforce linting on. - apply plugin: 'org.inferred.processors' if (!project.hasProperty('quick')) { apply plugin: 'com.palantir.baseline-checkstyle' apply plugin: 'com.palantir.baseline-error-prone' diff --git a/bom/build.gradle b/bom/build.gradle new file mode 100644 index 000000000000..3579f7b5df9c --- /dev/null +++ b/bom/build.gradle @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// This file is intentionally minimal - BOM configuration is in root build.gradle \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2c6ba9da2e06..9c0bc87100db 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,6 @@ buildscript { classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.9' classpath 'com.palantir.baseline:gradle-baseline-java:6.90.0' classpath 'com.diffplug.spotless:spotless-plugin-gradle:8.2.1' - classpath 'gradle.plugin.org.inferred:gradle-processors:3.7.0' classpath 'me.champeau.jmh:jmh-gradle-plugin:0.7.3' classpath 'gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.6' classpath "com.github.alisiikh:gradle-scalastyle-plugin:3.5.0" @@ -250,7 +249,7 @@ subprojects { } else { events "failed" } - exceptionFormat "full" + exceptionFormat = "full" } systemProperty 'project.version', project.version @@ -285,7 +284,7 @@ project(':iceberg-bundled-guava') { shadowJar { archiveClassifier.set(null) configurations = [project.configurations.compileClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { @@ -440,7 +439,7 @@ project(':iceberg-data') { test { useJUnitPlatform() // Only for TestSplitScan as of Gradle 5.0+ - maxHeapSize '1500m' + maxHeapSize = '1500m' } } @@ -618,9 +617,23 @@ project(':iceberg-delta-lake') { test { useJUnitPlatform() } - configurations { - integrationImplementation.extendsFrom testImplementation - integrationRuntime.extendsFrom testRuntimeOnly + + // The newest version of delta-core uses Spark 3.5.*. Define integration source set and config + // before dependencies so integrationImplementation exists when dependencies are applied. + if (sparkVersions.contains("3.5")) { + sourceSets { + integration { + java.srcDir "$projectDir/src/integration/java" + resources.srcDir "$projectDir/src/integration/resources" + compileClasspath += main.output + test.output + runtimeClasspath += main.output + test.output + } + } + + configurations { + integrationImplementation.extendsFrom testImplementation + integrationRuntime.extendsFrom testRuntimeOnly + } } dependencies { @@ -671,15 +684,6 @@ project(':iceberg-delta-lake') { // The newest version of delta-core uses Spark 3.5.*. The integration test should only be built // if iceberg-spark-3.5 is available if (sparkVersions.contains("3.5")) { - sourceSets { - integration { - java.srcDir "$projectDir/src/integration/java" - resources.srcDir "$projectDir/src/integration/resources" - compileClasspath += main.output + test.output - runtimeClasspath += main.output + test.output - } - } - task integrationTest(type: Test) { useJUnitPlatform() testClassesDirs = sourceSets.integration.output.classesDirs @@ -1041,7 +1045,8 @@ project(':iceberg-open-api') { dependencies { testImplementation project(':iceberg-api') testImplementation project(':iceberg-core') - testImplementation project(':iceberg-core').sourceSets.test.runtimeClasspath + testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') testImplementation(testFixtures(project(':iceberg-open-api'))) testImplementation libs.junit.jupiter @@ -1125,7 +1130,7 @@ project(':iceberg-open-api') { archiveClassifier.set(null) configurations = [project.configurations.testFixturesRuntimeClasspath] from sourceSets.testFixtures.output - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the runtime Jar from(projectDir) { diff --git a/deploy.gradle b/deploy.gradle index 740d0056273b..9b3313350abc 100644 --- a/deploy.gradle +++ b/deploy.gradle @@ -33,13 +33,13 @@ subprojects { task sourceJar(type: Jar, dependsOn: classes) { archiveClassifier.set('sources') from sourceSets.main.allSource - group 'build' + group = 'build' } task javadocJar(type: Jar, dependsOn: javadoc) { archiveClassifier.set('javadoc') from javadoc.destinationDir - group 'build' + group = 'build' } task testJar(type: Jar) { @@ -124,8 +124,8 @@ subprojects { repositories { maven { credentials { - username project.hasProperty('mavenUser') ? "$mavenUser" : "" - password project.hasProperty('mavenPassword') ? "$mavenPassword" : "" + username = project.hasProperty('mavenUser') ? "$mavenUser" : "" + password = project.hasProperty('mavenPassword') ? "$mavenPassword" : "" } // upload to the releases repository using ./gradlew -Prelease publish def apacheSnapshotsRepoUrl = 'https://repository.apache.org/content/repositories/snapshots' diff --git a/flink/v1.20/build.gradle b/flink/v1.20/build.gradle index 3591bf37b1a7..a82b3db064c7 100644 --- a/flink/v1.20/build.gradle +++ b/flink/v1.20/build.gradle @@ -176,14 +176,16 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { // all of those dependencies are required because the integration test extends FlinkTestBase integrationCompileOnly project(':iceberg-api') integrationImplementation libs.assertj.core + integrationImplementation libs.junit.jupiter + integrationImplementation libs.junit.platform.launcher integrationImplementation project(path: ":iceberg-flink:iceberg-flink-${flinkMajorVersion}", configuration: "testArtifacts") integrationImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') integrationImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') integrationImplementation(libs.flink120.test.utils) { exclude group: "org.apache.curator", module: 'curator-test' - exclude group: 'junit' } + integrationImplementation libs.flink120.connector.base integrationImplementation libs.flink120.table.api.java.bridge integrationImplementation "org.apache.flink:flink-table-planner_${scalaVersion}:${libs.versions.flink120.get()}" @@ -226,7 +228,7 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { shadowJar { configurations = [project.configurations.runtimeClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { @@ -255,6 +257,9 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { task integrationTest(type: Test) { description = "Test Flink Runtime Jar against Flink ${flinkMajorVersion}" group = "verification" + useJUnitPlatform { + excludeEngines "junit-vintage" + } jvmArgs += project.property('extraJvmArgs') testClassesDirs = sourceSets.integration.output.classesDirs classpath = sourceSets.integration.runtimeClasspath + files(shadowJar.archiveFile.get().asFile.path) diff --git a/flink/v2.0/build.gradle b/flink/v2.0/build.gradle index 5907f41b3544..7bfc6387f75b 100644 --- a/flink/v2.0/build.gradle +++ b/flink/v2.0/build.gradle @@ -181,9 +181,9 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { integrationImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') integrationImplementation(libs.flink20.test.utils) { exclude group: "org.apache.curator", module: 'curator-test' - exclude group: 'junit' } + integrationImplementation libs.flink20.connector.base integrationImplementation libs.flink20.table.api.java.bridge integrationImplementation "org.apache.flink:flink-table-planner_${scalaVersion}:${libs.versions.flink20.get()}" @@ -226,7 +226,7 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { shadowJar { configurations = [project.configurations.runtimeClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/flink/v2.1/build.gradle b/flink/v2.1/build.gradle index 91081bdc2e42..b17a275b16ec 100644 --- a/flink/v2.1/build.gradle +++ b/flink/v2.1/build.gradle @@ -176,14 +176,16 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { // all of those dependencies are required because the integration test extends FlinkTestBase integrationCompileOnly project(':iceberg-api') integrationImplementation libs.assertj.core + integrationImplementation libs.junit.jupiter + integrationImplementation libs.junit.platform.launcher integrationImplementation project(path: ":iceberg-flink:iceberg-flink-${flinkMajorVersion}", configuration: "testArtifacts") integrationImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') integrationImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') integrationImplementation(libs.flink21.test.utils) { exclude group: "org.apache.curator", module: 'curator-test' - exclude group: 'junit' } + integrationImplementation libs.flink21.connector.base integrationImplementation libs.flink21.table.api.java.bridge integrationImplementation "org.apache.flink:flink-table-planner_${scalaVersion}:${libs.versions.flink21.get()}" @@ -226,7 +228,7 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { shadowJar { configurations = [project.configurations.runtimeClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { @@ -255,6 +257,9 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") { task integrationTest(type: Test) { description = "Test Flink Runtime Jar against Flink ${flinkMajorVersion}" group = "verification" + useJUnitPlatform { + excludeEngines "junit-vintage" + } jvmArgs += project.property('extraJvmArgs') testClassesDirs = sourceSets.integration.output.classesDirs classpath = sourceSets.integration.runtimeClasspath + files(shadowJar.archiveFile.get().asFile.path) diff --git a/gcp-bundle/build.gradle b/gcp-bundle/build.gradle index 6ebe05ccdbce..f2b048caa6ee 100644 --- a/gcp-bundle/build.gradle +++ b/gcp-bundle/build.gradle @@ -34,7 +34,7 @@ project(":iceberg-gcp-bundle") { shadowJar { archiveClassifier.set(null) - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 207c4600bb1b..41465649341d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=f1771298a70f6db5a29daf62378c4e18a17fc33c9ba6b14362e0cdf40610380d -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip +distributionSha256Sum=b266d5ff6b90eada6dc3b20cb090e3731302e553a27c5d3e4df1f0d76beaff06 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/mr/build.gradle b/mr/build.gradle index dac7e3d4542b..6efffae6546b 100644 --- a/mr/build.gradle +++ b/mr/build.gradle @@ -76,7 +76,7 @@ project(':iceberg-mr') { test { // testJoinTables / testScanTable - maxHeapSize '2500m' + maxHeapSize = '2500m' } } diff --git a/spark/v3.4/build.gradle b/spark/v3.4/build.gradle index 714ee703b842..adee7b926447 100644 --- a/spark/v3.4/build.gradle +++ b/spark/v3.4/build.gradle @@ -287,7 +287,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio shadowJar { configurations = [project.configurations.runtimeClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/spark/v3.5/build.gradle b/spark/v3.5/build.gradle index 20a9cfb007bd..e95304382a76 100644 --- a/spark/v3.5/build.gradle +++ b/spark/v3.5/build.gradle @@ -289,7 +289,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio shadowJar { configurations = [project.configurations.runtimeClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/spark/v4.0/build.gradle b/spark/v4.0/build.gradle index fb9df4e0e0f2..7274c5135942 100644 --- a/spark/v4.0/build.gradle +++ b/spark/v4.0/build.gradle @@ -132,7 +132,7 @@ project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") { tasks.withType(Test) { // Vectorized reads need more memory - maxHeapSize '3160m' + maxHeapSize = '3160m' } } @@ -298,7 +298,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio shadowJar { configurations = [project.configurations.runtimeClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/spark/v4.1/build.gradle b/spark/v4.1/build.gradle index a342a0b59c92..f37eaf193819 100644 --- a/spark/v4.1/build.gradle +++ b/spark/v4.1/build.gradle @@ -133,7 +133,7 @@ project(":iceberg-spark:iceberg-spark-${sparkMajorVersion}_${scalaVersion}") { tasks.withType(Test) { // Vectorized reads need more memory - maxHeapSize '3160m' + maxHeapSize = '3160m' } } @@ -300,7 +300,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio shadowJar { configurations = [project.configurations.runtimeClasspath] - zip64 true + zip64 = true // include the LICENSE and NOTICE files for the shaded Jar from(projectDir) { diff --git a/tasks.gradle b/tasks.gradle index 5515d7b75052..42e7b30877bd 100644 --- a/tasks.gradle +++ b/tasks.gradle @@ -22,7 +22,7 @@ task aggregateJavadoc(type: Javadoc) { def javadocTasks = subprojects.findAll { it.name != 'iceberg-bom' }.javadoc dependsOn javadocTasks source javadocTasks.source - destinationDir project.rootProject.file("site/docs/javadoc/${getJavadocVersion()}") + destinationDir = project.rootProject.file("site/docs/javadoc/${getJavadocVersion()}") classpath = project.rootProject.files(javadocTasks.classpath) final JAVADOC_FIX_SEARCH_STR = '\n\n' +