Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

Upgrading graphql-java from Gradle 8.13 to Gradle 9.2.0

Plan

  • Update gradle-wrapper.properties to use Gradle 9.2.0
  • Update bnd plugin from 6.4.0 to 7.1.0 (required for Gradle 9 compatibility)
  • Fix deprecated Convention API usage in bnd configuration
  • Fix settings.gradle URL assignment syntax (Gradle 9 requirement)
  • Add explicit task dependencies for generateTestGrammarSource and generateJmhGrammarSource
  • Add JUnit Platform launcher dependency (required for Gradle 9)
  • Run build to verify compatibility
  • Run tests to ensure everything works
  • Fix deprecation warnings (multi-string dependencies, archives configuration, property assignments)
  • Update Gradle wrapper jar and scripts (gradle-wrapper.jar, gradlew, gradlew.bat)
  • Final verification

Changes Made

  • Updated Gradle wrapper to version 9.2.0 (properties, jar, and scripts)
  • Updated biz.aQute.bnd.builder plugin from 6.4.0 to 7.1.0
  • Removed deprecated Convention API usage and replaced with proper BundleTaskExtension
  • Fixed settings.gradle to use assignment syntax for maven repository URL
  • Added explicit task ordering with mustRunAfter for grammar generation tasks
  • Added org.junit.platform:junit-platform-launcher as testRuntimeOnly dependency
  • Fixed multi-string dependency notation for junit (changed to single-string)
  • Removed deprecated archives configuration
  • Fixed property assignment syntax (version, required)
  • Fixed Task.project usage in doLast blocks
  • Updated Gradle wrapper jar and scripts using ./gradlew wrapper --gradle-version=9.2.0
  • Build and tests work successfully with Gradle 9.2.0

Notes

  • This upgrade unblocks issue Build and Test using Java 25 #4119 as mentioned in the problem statement
  • One remaining deprecation warning from the bnd plugin itself (Task.project during jar task execution) is outside our control
  • All user-defined deprecations have been fixed
  • Gradle wrapper files (jar and scripts) have been properly updated to 9.2.0
Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade to Gradle 9</issue_title>
<issue_description>Beyond accessing the latest Gradle features and bug fixes, it unblocks #4119</issue_description>

Comments on the Issue (you are @copilot in this section)

@andimarek In general we want to upgrade to gradle 9.

Sometimes we are blocked by plugins we use, so we must probably upgrade dependencies first </comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@andimarek
Copy link
Member

Make sure to upgrade the gradle wrapper itself too once upgraded to gradle 9

Copilot AI changed the title [WIP] Upgrade project to Gradle 9 Upgrade to Gradle 9.2.0 Nov 16, 2025
Copilot AI requested a review from andimarek November 16, 2025 04:12
@github-actions
Copy link
Contributor

github-actions bot commented Nov 16, 2025

Test Results

  326 files    326 suites   5m 4s ⏱️
5 218 tests 5 209 ✅ 9 💤 0 ❌
5 307 runs  5 298 ✅ 9 💤 0 ❌

Results for commit 10e3596.

♻️ This comment has been updated with latest results.

@andimarek
Copy link
Member

@copilot Make sure to update the gradle wrapper itself too

Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

Make sure to upgrade the gradle wrapper itself too once upgraded to gradle 9

Done in commit 10e3596. Updated gradle-wrapper.jar, gradlew, and gradlew.bat using ./gradlew wrapper --gradle-version=9.2.0.

@copilot Make sure to update the gradle wrapper itself too

Done in commit 10e3596. The gradle wrapper jar and scripts have been updated to 9.2.0.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades graphql-java from Gradle 8.13 to Gradle 9.2.0, addressing compatibility issues and deprecation warnings introduced in the newer Gradle version.

Key changes:

  • Updated Gradle wrapper and bnd plugin to versions compatible with Gradle 9
  • Migrated from deprecated Convention API to BundleTaskExtension for OSGi bundle configuration
  • Fixed syntax and API usage patterns deprecated in Gradle 9

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
gradle/wrapper/gradle-wrapper.properties Updated distribution URL to Gradle 9.2.0
gradle/wrapper/gradle-wrapper.jar Updated wrapper JAR binary to Gradle 9.2.0
gradlew Updated wrapper script with new invocation syntax for Gradle 9
gradlew.bat Updated Windows wrapper script with new invocation syntax for Gradle 9
settings.gradle Fixed maven repository URL syntax to use assignment operator
build.gradle Updated bnd plugin version, migrated deprecated Convention API, added JUnit Platform launcher dependency, fixed deprecated property assignments, and added explicit task dependencies

@andimarek andimarek merged commit 1846e70 into master Nov 16, 2025
11 checks passed
@andimarek andimarek mentioned this pull request Nov 16, 2025
@reneleonhardt
Copy link

Why is JUnit 4 still needed if 5 is already required?

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.

Upgrade to Gradle 9

3 participants