Skip to content

Gradle 9.3.0 Upgrade#18850

Draft
tinogutierrez wants to merge 3 commits intomainfrom
om/18736/update-to-gradle-9
Draft

Gradle 9.3.0 Upgrade#18850
tinogutierrez wants to merge 3 commits intomainfrom
om/18736/update-to-gradle-9

Conversation

@tinogutierrez
Copy link
Copy Markdown
Collaborator

@tinogutierrez tinogutierrez commented Feb 2, 2026

Gradle 9.3.0 Upgrade

Resolves #18736

Overview

This PR upgrades the project from Gradle 8.x to Gradle 9.3.0, updating plugins and fixing deprecated API calls to ensure compatibility with the latest Gradle version.

Changes Made

1. Gradle Wrapper Upgrade

  • Upgraded Gradle wrapper to 9.3.0
  • Updated gradle/wrapper/gradle-wrapper.properties

2. Plugin Updates

Shadow Plugin

  • Before: com.github.johnrengelman.shadow version 8.1.1
  • After: com.gradleup.shadow version 9.3.1
  • Reason: The original Shadow plugin was archived. The new com.gradleup.shadow fork provides Gradle 9 support.

Flyway Plugin

  • Upgraded to: 12.0.0
  • Reason: Required for Gradle 9 compatibility

JOOQ Plugin

  • Upgraded to: nu.studer.jooq version 9.0
  • Reason: Gradle 9 compatibility

3. Deprecated API Fixes

Build Script (build.gradle.kts)

  • Replaced exec blocks with ProcessBuilder for Git command execution
  • Updated task declarations from task<Type>() to tasks.register<Type>()
  • Fixed task dependency chains and ordering

Database Code (DatabaseAccess.kt)

  • Removed: Flyway's deprecated PluginRegister.getPlugin() API call
  • Removed: PostgreSQLConfigurationExtension.setTransactionalLock() usage
  • Reason: Internal Flyway APIs were removed in version 12.0.0

4. Dependency Management

hl7v2-fhir-converter

  • Note: See Next Steps below regarding compatibility

5. Task Configuration Updates

  • Updated azureFunctionsPackage task to ensure output directories exist before execution
  • Modified generateVersionFile task with proper dependency ordering
  • Added doFirst blocks to create required directories

Known Issues & Blockers

🚨 Azure Functions Plugin (BLOCKER)

  • Issue: Azure Functions Gradle plugin version 1.16.1 is incompatible with Gradle 9
  • Impact: Cannot build Azure Functions deployment packages
  • Status: Waiting for Microsoft to release Gradle 9-compatible version. See issue in Microsoft's repository

⚠️ hl7v2-fhir-converter Dependency

  • Issue: CDC fork's build.gradle uses Gradle syntax incompatible with Gradle 9
  • Alternative Attempted: Update hl7v2-fhir-converter locally
  • Long-term Solution Needed: Update CDCgov/hl7v2-fhir-converter fork repository

❌ Blocked

  • Azure Functions deployment packaging
  • FHIR integration tests
  • Full test suite execution (some database tests hang)

Migration Path

Immediate (This PR)

  • Gradle 9 build infrastructure in place
  • Most functionality working for local development
  • Non-Azure Functions workflows operational

Next Steps (Follow-up Work)

  1. Azure Functions Plugin

    • Monitor Microsoft's azure-gradle-plugins repository for Gradle 9 update
    • File issue requesting Gradle 9 support if not already tracked
    • Consider alternative deployment strategies if plugin remains unmaintained
  2. hl7v2-fhir-converter

Replace:

sourceCompatibility = 11
targetCompatibility = 11

with:

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(11)
    }
}
  1. Test Suite
    • Investigate and fix database test hangs

Backwards Compatibility

  • Gradle Version: This PR requires Gradle 9.3.0+
  • Plugin Changes: Shadow plugin ID changed (see Plugin Updates above)
  • API Changes: Removed deprecated Gradle and Flyway API usage
  • Breaking: Cannot build with Gradle 8.x after this change

References

Checklist

  • Code compiles with Gradle 9.3.0
  • Deprecated APIs removed/updated
  • Plugin versions updated for compatibility
  • Build scripts updated (build.gradle.kts)
  • Known blockers documented
  • Azure Functions deployment tested (blocked by plugin)
  • Unit tests pass (some blocked tests)
  • Integration tests pass (blocked by dependencies)
  • Documentation updated

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 2, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 2, 2026

Test Results

0 tests   - 1 338   0 ✅  - 1 332   0s ⏱️ - 8m 14s
0 suites  -   174   0 💤  -     6 
0 files    -   174   0 ❌ ±    0 

Results for commit ec30d2d. ± Comparison against base commit 0f23b2d.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 2, 2026

Integration Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit ec30d2d.

@scott-aquia
Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan and execute update to Gradle 9

2 participants