Skip to content

[rewrite] Add GradleBestPractices#3401

Closed
Pankraz76 wants to merge 1 commit intoSonarSource:masterfrom
Pankraz76:pr-gradle-bump
Closed

[rewrite] Add GradleBestPractices#3401
Pankraz76 wants to merge 1 commit intoSonarSource:masterfrom
Pankraz76:pr-gradle-bump

Conversation

@Pankraz76
Copy link
Copy Markdown

@Pankraz76 Pankraz76 commented Nov 9, 2025

related to:

Changes have been made to gradle/wrapper/gradle-wrapper.jar by:
    org.openrewrite.gradle.GradleBestPractices
        org.openrewrite.gradle.MigrateToGradle9
            org.openrewrite.gradle.MigrateToGradle8
                org.openrewrite.gradle.UpdateGradleWrapper: {version=8.x, addIfMissing=false}
            org.openrewrite.gradle.UpdateGradleWrapper: {version=9.x, addIfMissing=false}

Changes have been made to gradle/wrapper/gradle-wrapper.jar by:
    org.openrewrite.gradle.GradleBestPractices
        org.openrewrite.gradle.MigrateToGradle9
            org.openrewrite.gradle.MigrateToGradle8
                org.openrewrite.gradle.UpdateGradleWrapper: {version=8.x, addIfMissing=false}
            org.openrewrite.gradle.UpdateGradleWrapper: {version=9.x, addIfMissing=false}

Signed-off-by: Vincent Potucek <vpotucek@me.com>
@Pankraz76 Pankraz76 marked this pull request as ready for review November 9, 2025 13:43
@Pankraz76 Pankraz76 requested a review from a team as a code owner November 9, 2025 13:43
@@ -1,7 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

locally not running anymore. Maybe on CI or someone can fix the missing part, thank you.

* Where:
Build file '/Users/vincent.potucek/IdeaProjects/sonarqube/build.gradle' line: 712

* What went wrong:
A problem occurred evaluating root project 'sonarqube'.
> Failed to apply plugin 'com.google.protobuf'.
   > Could not get unknown property 'convention' for project ':sonar-core' of type org.gradle.api.Project.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Moving from Gradle 8 to Gradle 9 has to be checked properly with our full build process.
Very often plugins break (like protobuf in this case) and the whole operation has to be planned.

@matteo-mara-sonarsource
Copy link
Copy Markdown
Contributor

Thanks a lot for your contribution @Pankraz76.
We are going to review this change, and we will let you know if will be taken into consideration to be merged to the repository.

@matteo-mara-sonarsource
Copy link
Copy Markdown
Contributor

This pull request cannot be taken as is mainly due to the huge change introduced by moving from Gradle 8 to Gradle 9.
That is a change that we need to plan in advance and validate against our full build process (A super set of the build process of the sonarqube public repository).

In any case thanks for the contribution @Pankraz76 I created a Jira to keep track of this upgrade.

@Pankraz76
Copy link
Copy Markdown
Author

Pankraz76 commented Nov 25, 2025

Thanks for the feedback. Of course every codebase is unique.

What about java migration?

This could also help to improve outdated patterns, also this change should not do any harm.

Each recipe is individual.

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.

2 participants