Modernize build infrastructure: Gradle 6.7.1 → 8.6#580
Modernize build infrastructure: Gradle 6.7.1 → 8.6#580wmoustafa merged 1 commit intolinkedin:masterfrom
Conversation
- Gradle wrapper 6.7.1 → 8.6 - compile/testCompile → implementation/api/testImplementation (removed in Gradle 7+) - Shadow 6.1.0 → 8.3.5 (ConfigureShadowRelocation removed, compileOnly not resolvable) - classifier → archiveClassifier (removed in Gradle 8) - Spring Boot 2.4.0 → 2.7.18 (LazyPublishArtifact incompatible with Gradle 8) - conjars http → https (Gradle 8 blocks insecure HTTP repos) - settings.gradle: pluginManagement block, subproject discovery filter - coral-spark/spark_itest.gradle: testCompile/testRuntime → testImplementation/testRuntimeOnly - coral-hive: spotless/ANTLR task ordering for Gradle 8 strict validation Stays on Java 8, Hive 1.2.2, Spotless 5.9.0 — no functional changes.
faeedb0 to
5d8855d
Compare
Shadow JAR Verification: master vs PR branchVerifying that the shadow JAR produced by the new Shadow 8.3.5 configuration is identical to the one produced by the old Shadow 6.1.0 + JAR Metadata
Entry DiffIDENTICAL — all 3,450 entries match exactly. Zero differences. Unrelocated Packages CheckPASS — all class files are under Bytecode Reference VerificationChecked PASS — no unrelocated Relocated Top-Level Packages
Verification Commands# Build both JARs
git checkout master && ./gradlew :shading:coral-trino-parser:shadowJar
# produces: coral-trino-parser-2.3.0.jar
git checkout pr1-gradle-modernization && ./gradlew :shading:coral-trino-parser:shadowJar
# produces: coral-trino-parser-2.3.3.jar
# Compare all entries
jar tf coral-trino-parser-2.3.0.jar | sort > master-entries.txt
jar tf coral-trino-parser-2.3.3.jar | sort > pr-entries.txt
diff master-entries.txt pr-entries.txt
# (no output — identical)
# Check for unrelocated classes
jar tf coral-trino-parser-2.3.3.jar | grep '\.class$' | grep -v "^coral/shading/"
# (no output — all classes properly relocated)
# Check bytecode references
javap -v -c -cp coral-trino-parser-2.3.3.jar coral.shading.io.trino.sql.parser.SqlParser | grep " io\.trino\."
# (no output — no unrelocated references in bytecode) |
wmoustafa
left a comment
There was a problem hiding this comment.
Thanks for the upgrade @YogeshKothari26!
|
@wmoustafa @aastha25 @ruolin59 Could you help approve the pending workflow to enable merging PR? |

What changes are proposed in this pull request, and why are they necessary?
This PR upgrades Coral's build infrastructure from Gradle 6.7.1 to Gradle 8.6. This is the first of three PRs to migrate Coral to Java 17 + Hive 2.3.9. This PR contains no functional changes — only build tooling updates required for Gradle 8 compatibility.
Why Gradle 8: Gradle 6.x does not support Java 17 toolchains, which are needed for the upcoming Java 17 migration.
Gradle wrapper: 6.7.1 → 8.6
Dependency configurations:
compile→implementation/api,testCompile→testImplementationacross all modulebuild.gradlefiles. These configurations were removed in Gradle 7 — the build fails withCould not find method testCompile()without this change.Shadow plugin: 6.1.0 → 8.3.5 in
shading/coral-trino-parser. The oldConfigureShadowRelocationauto-relocation task was removed in Shadow 8. Replaced with explicitrelocatecalls covering the same packages (verified: shadow JAR contents are identical to master).compileOnlyis no longer resolvable in Gradle 8, so a resolvableshadowDepsconfiguration is used instead. Publication override added because disabling the standardjartask requires explicitly telling Maven publishing to use the shadow jar.Publication:
classifier→archiveClassifieringradle/java-publication.gradle(removed in Gradle 8). Publishing and signing remain fully functional.Spring Boot: 2.4.0 → 2.7.18 in
coral-service(2.4.0 is incompatible with Gradle 8 due toLazyPublishArtifactAPI change).http://conjars.org→https://conjars.org(Gradle 8 blocks insecure HTTP repository URLs by default).settings.gradle: Added
pluginManagementblock (required by Gradle 8 for plugin resolution). Changed subproject discovery to filter directories withoutbuild.gradle(the oldeachDirpattern includesbuild/andsrc/as phantom subprojects, causing Gradle 8 strict validation failures on non-clean checkouts).spark_itest.gradle:
testCompile/testRuntime→testImplementation/testRuntimeOnly(removed in Gradle 8).sparktestCompile/spark3testCompile→sparktestImplementation/spark3testImplementation.coral-hive: Added
spotlessJava.mustRunAfter(generateGrammarSource)(Gradle 8 strict validation requires explicit task ordering between Spotless and ANTLR source generation).coral-common/coral-hive: Added
java-libraryplugin and changedcompile→apifor dependencies that downstream modules use transitively. This preserves the transitive behavior thatcompileprovided in Gradle 6.How was this patch tested?
./gradlew clean buildon Java 8 — BUILD SUCCESSFUL (233 tasks, all tests pass)./gradlew spotlessApply— all formatting checks passpublishJavaLibraryPublicationToMavenLocalsucceeds for all modules