Skip to content

Commit 630e2fb

Browse files
committed
feat(build): Upgrade to Gradle 9.4.0
This closes #14094
1 parent b4eddbc commit 630e2fb

11 files changed

Lines changed: 116 additions & 29 deletions

File tree

baseline.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ subprojects {
3636

3737
// Thus we concede to applying all of the Baseline plugins individually on all the projects we are
3838
// ready to enforce linting on.
39-
apply plugin: 'org.inferred.processors'
4039
if (!project.hasProperty('quick')) {
4140
apply plugin: 'com.palantir.baseline-checkstyle'
4241
apply plugin: 'com.palantir.baseline-error-prone'
@@ -57,8 +56,6 @@ subprojects {
5756
spotless {
5857
java {
5958
target 'src/main/java/**/*.java', 'src/test/java/**/*.java', 'src/testFixtures/java/**/*.java', 'src/jmh/java/**/*.java', 'src/integration/java/**/*.java'
60-
// 1.23.0 has an issue in formatting comments https://github.com/google/google-java-format/issues/1155
61-
// so we stick to 1.22.0 to produce consistent result for JDK 17/21
6259
googleJavaFormat("1.22.0")
6360
removeUnusedImports()
6461
licenseHeaderFile "$rootDir/.baseline/copyright/copyright-header-java.txt"

bom/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
// This file is intentionally minimal - BOM configuration is in root build.gradle

build.gradle

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ buildscript {
2828
dependencies {
2929
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.10'
3030
classpath 'com.palantir.baseline:gradle-baseline-java:6.90.0'
31-
classpath 'com.diffplug.spotless:spotless-plugin-gradle:8.3.0'
32-
classpath 'gradle.plugin.org.inferred:gradle-processors:3.7.0'
31+
classpath 'com.diffplug.spotless:spotless-plugin-gradle:8.2.1'
3332
classpath 'me.champeau.jmh:jmh-gradle-plugin:0.7.3'
3433
classpath 'gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.6'
3534
classpath "com.github.alisiikh:gradle-scalastyle-plugin:3.5.0"
@@ -622,9 +621,23 @@ project(':iceberg-delta-lake') {
622621
test {
623622
useJUnitPlatform()
624623
}
625-
configurations {
626-
integrationImplementation.extendsFrom testImplementation
627-
integrationRuntime.extendsFrom testRuntimeOnly
624+
625+
// The newest version of delta-core uses Spark 3.5.*. The integration test should only be built
626+
// if iceberg-spark-3.5 is available
627+
if (sparkVersions.contains("3.5")) {
628+
sourceSets {
629+
integration {
630+
java.srcDir "$projectDir/src/integration/java"
631+
resources.srcDir "$projectDir/src/integration/resources"
632+
compileClasspath += main.output + test.output
633+
runtimeClasspath += main.output + test.output
634+
}
635+
}
636+
637+
configurations {
638+
integrationImplementation.extendsFrom testImplementation
639+
integrationRuntime.extendsFrom testRuntimeOnly
640+
}
628641
}
629642

630643
dependencies {
@@ -672,18 +685,7 @@ project(':iceberg-delta-lake') {
672685
}
673686
}
674687

675-
// The newest version of delta-core uses Spark 3.5.*. The integration test should only be built
676-
// if iceberg-spark-3.5 is available
677688
if (sparkVersions.contains("3.5")) {
678-
sourceSets {
679-
integration {
680-
java.srcDir "$projectDir/src/integration/java"
681-
resources.srcDir "$projectDir/src/integration/resources"
682-
compileClasspath += main.output + test.output
683-
runtimeClasspath += main.output + test.output
684-
}
685-
}
686-
687689
task integrationTest(type: Test) {
688690
useJUnitPlatform()
689691
testClassesDirs = sourceSets.integration.output.classesDirs
@@ -1044,8 +1046,9 @@ project(':iceberg-open-api') {
10441046

10451047
dependencies {
10461048
testImplementation project(':iceberg-api')
1049+
testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts')
10471050
testImplementation project(':iceberg-core')
1048-
testImplementation project(':iceberg-core').sourceSets.test.runtimeClasspath
1051+
testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts')
10491052
testImplementation(testFixtures(project(':iceberg-open-api')))
10501053

10511054
testImplementation libs.junit.jupiter

flink/v1.20/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ project(":iceberg-flink:iceberg-flink-${flinkMajorVersion}") {
7373
testImplementation libs.flink120.runtime
7474
testImplementation(libs.flink120.test.utilsjunit) {
7575
exclude group: 'junit'
76+
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
7677
}
7778
testImplementation(libs.flink120.test.utils) {
7879
exclude group: "org.apache.curator", module: 'curator-test'
@@ -176,14 +177,18 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
176177
// all of those dependencies are required because the integration test extends FlinkTestBase
177178
integrationCompileOnly project(':iceberg-api')
178179
integrationImplementation libs.assertj.core
180+
integrationImplementation libs.junit.jupiter
181+
integrationImplementation libs.junit.jupiter.engine
182+
integrationImplementation libs.junit.platform.launcher
179183
integrationImplementation project(path: ":iceberg-flink:iceberg-flink-${flinkMajorVersion}", configuration: "testArtifacts")
180184
integrationImplementation project(path: ':iceberg-api', configuration: 'testArtifacts')
181185
integrationImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts')
182186
integrationImplementation(libs.flink120.test.utils) {
183187
exclude group: "org.apache.curator", module: 'curator-test'
184-
exclude group: 'junit'
185188
}
186189

190+
integrationImplementation libs.flink120.connector.base
191+
integrationImplementation libs.flink120.connector.files
187192
integrationImplementation libs.flink120.table.api.java.bridge
188193
integrationImplementation "org.apache.flink:flink-table-planner_${scalaVersion}:${libs.versions.flink120.get()}"
189194

@@ -253,6 +258,9 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
253258
}
254259

255260
task integrationTest(type: Test) {
261+
useJUnitPlatform {
262+
excludeEngines 'junit-vintage'
263+
}
256264
description = "Test Flink Runtime Jar against Flink ${flinkMajorVersion}"
257265
group = "verification"
258266
jvmArgs += project.property('extraJvmArgs')

flink/v1.20/flink-runtime/src/integration/java/org/apache/iceberg/flink/TestIcebergConnectorSmoke.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,19 @@
1818
*/
1919
package org.apache.iceberg.flink;
2020

21-
public class TestIcebergConnectorSmoke extends TestIcebergConnector {}
21+
import org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException;
22+
import org.junit.jupiter.api.Disabled;
23+
import org.junit.jupiter.api.TestTemplate;
24+
25+
public class TestIcebergConnectorSmoke extends TestIcebergConnector {
26+
27+
@Override
28+
@TestTemplate
29+
@Disabled("Not supported in the runtime integration test")
30+
public void testCreateDynamicIcebergSink() throws DatabaseAlreadyExistException {}
31+
32+
@Override
33+
@TestTemplate
34+
@Disabled("Not supported in the runtime integration test")
35+
public void testMissingDynamicRecordGeneratorImpl() throws DatabaseAlreadyExistException {}
36+
}

flink/v2.0/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,18 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
176176
// all of those dependencies are required because the integration test extends FlinkTestBase
177177
integrationCompileOnly project(':iceberg-api')
178178
integrationImplementation libs.assertj.core
179+
integrationImplementation libs.junit.jupiter
180+
integrationImplementation libs.junit.jupiter.engine
181+
integrationImplementation libs.junit.platform.launcher
179182
integrationImplementation project(path: ":iceberg-flink:iceberg-flink-${flinkMajorVersion}", configuration: "testArtifacts")
180183
integrationImplementation project(path: ':iceberg-api', configuration: 'testArtifacts')
181184
integrationImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts')
182185
integrationImplementation(libs.flink20.test.utils) {
183186
exclude group: "org.apache.curator", module: 'curator-test'
184-
exclude group: 'junit'
185187
}
186188

189+
integrationImplementation libs.flink20.connector.base
190+
integrationImplementation libs.flink20.connector.files
187191
integrationImplementation libs.flink20.table.api.java.bridge
188192
integrationImplementation "org.apache.flink:flink-table-planner_${scalaVersion}:${libs.versions.flink20.get()}"
189193

@@ -253,6 +257,9 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
253257
}
254258

255259
task integrationTest(type: Test) {
260+
useJUnitPlatform {
261+
excludeEngines 'junit-vintage'
262+
}
256263
description = "Test Flink Runtime Jar against Flink ${flinkMajorVersion}"
257264
group = "verification"
258265
jvmArgs += project.property('extraJvmArgs')

flink/v2.0/flink-runtime/src/integration/java/org/apache/iceberg/flink/TestIcebergConnectorSmoke.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,19 @@
1818
*/
1919
package org.apache.iceberg.flink;
2020

21-
public class TestIcebergConnectorSmoke extends TestIcebergConnector {}
21+
import org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException;
22+
import org.junit.jupiter.api.Disabled;
23+
import org.junit.jupiter.api.TestTemplate;
24+
25+
public class TestIcebergConnectorSmoke extends TestIcebergConnector {
26+
27+
@Override
28+
@TestTemplate
29+
@Disabled("Not supported in the runtime integration test")
30+
public void testCreateDynamicIcebergSink() throws DatabaseAlreadyExistException {}
31+
32+
@Override
33+
@TestTemplate
34+
@Disabled("Not supported in the runtime integration test")
35+
public void testMissingDynamicRecordGeneratorImpl() throws DatabaseAlreadyExistException {}
36+
}

flink/v2.1/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,18 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
176176
// all of those dependencies are required because the integration test extends FlinkTestBase
177177
integrationCompileOnly project(':iceberg-api')
178178
integrationImplementation libs.assertj.core
179+
integrationImplementation libs.junit.jupiter
180+
integrationImplementation libs.junit.jupiter.engine
181+
integrationImplementation libs.junit.platform.launcher
179182
integrationImplementation project(path: ":iceberg-flink:iceberg-flink-${flinkMajorVersion}", configuration: "testArtifacts")
180183
integrationImplementation project(path: ':iceberg-api', configuration: 'testArtifacts')
181184
integrationImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts')
182185
integrationImplementation(libs.flink21.test.utils) {
183186
exclude group: "org.apache.curator", module: 'curator-test'
184-
exclude group: 'junit'
185187
}
186188

189+
integrationImplementation libs.flink21.connector.base
190+
integrationImplementation libs.flink21.connector.files
187191
integrationImplementation libs.flink21.table.api.java.bridge
188192
integrationImplementation "org.apache.flink:flink-table-planner_${scalaVersion}:${libs.versions.flink21.get()}"
189193

@@ -253,6 +257,9 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
253257
}
254258

255259
task integrationTest(type: Test) {
260+
useJUnitPlatform {
261+
excludeEngines 'junit-vintage'
262+
}
256263
description = "Test Flink Runtime Jar against Flink ${flinkMajorVersion}"
257264
group = "verification"
258265
jvmArgs += project.property('extraJvmArgs')

flink/v2.1/flink-runtime/src/integration/java/org/apache/iceberg/flink/TestIcebergConnectorSmoke.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,19 @@
1818
*/
1919
package org.apache.iceberg.flink;
2020

21-
public class TestIcebergConnectorSmoke extends TestIcebergConnector {}
21+
import org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException;
22+
import org.junit.jupiter.api.Disabled;
23+
import org.junit.jupiter.api.TestTemplate;
24+
25+
public class TestIcebergConnectorSmoke extends TestIcebergConnector {
26+
27+
@Override
28+
@TestTemplate
29+
@Disabled("Not supported in the runtime integration test")
30+
public void testCreateDynamicIcebergSink() throws DatabaseAlreadyExistException {}
31+
32+
@Override
33+
@TestTemplate
34+
@Disabled("Not supported in the runtime integration test")
35+
public void testMissingDynamicRecordGeneratorImpl() throws DatabaseAlreadyExistException {}
36+
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=f1771298a70f6db5a29daf62378c4e18a17fc33c9ba6b14362e0cdf40610380d
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
3+
distributionSha256Sum=60ea723356d81263e8002fec0fcf9e2b0eee0c0850c7a3d7ab0a63f2ccc601f3
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)