Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Spotbugs Gradle plugin to 5.1.4 #94

Closed
AlexanderZobkov opened this issue Oct 9, 2023 · 4 comments
Closed

Update Spotbugs Gradle plugin to 5.1.4 #94

AlexanderZobkov opened this issue Oct 9, 2023 · 4 comments

Comments

@AlexanderZobkov
Copy link

When using this quality plugin with Gradle 8.2.1, Gradle reports that API used in Spotbugs Gradle plugin (4.8.0) is deprecated.
Let's upgrade Spotbugs Gradle plugin to 5.1.4 for Gradle 8.x compatibility purposes.

The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2.1/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at org.gradle.internal.extensibility.DefaultConvention.logConventionDeprecation(DefaultConvention.java:398)
        at org.gradle.internal.extensibility.DefaultConvention.findPlugin(DefaultConvention.java:100)
        at org.gradle.internal.extensibility.DefaultConvention.getPlugin(DefaultConvention.java:89)
        at com.github.spotbugs.snom.internal.SpotBugsTaskFactory.lambda$generateForJava$2(SpotBugsTaskFactory.java:48)
        at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:123)
...
        at org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:45)
        at org.gradle.api.internal.collections.CollectionFilter$1.execute(CollectionFilter.java:59)
        at org.gradle.api.internal.DefaultDomainObjectCollection.configureEach(DefaultDomainObjectCollection.java:185)
        at com.github.spotbugs.snom.internal.SpotBugsTaskFactory.generateForJava(SpotBugsTaskFactory.java:45)
        at com.github.spotbugs.snom.internal.SpotBugsTaskFactory.generate(SpotBugsTaskFactory.java:37)
        at ru.vyarus.gradle.plugin.quality.spotbugs.CustomSpotBugsPlugin.apply(CustomSpotBugsPlugin.java:46)
        at ru.vyarus.gradle.plugin.quality.spotbugs.CustomSpotBugsPlugin.apply(CustomSpotBugsPlugin.java:28)
        at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:43)

@xvik
Copy link
Owner

xvik commented Oct 9, 2023

Sure, will do. I was keeping old version for backwards compatibility with old gradle versions (as long as I can).

@baev
Copy link

baev commented Jan 12, 2024

@xvik, are there any updates? This issue is the only one that keeps us from upgrading to Gradle 8.

@xvik
Copy link
Owner

xvik commented Jan 13, 2024

No updates yet. I will look this in priority

xvik added a commit that referenced this issue Jan 25, 2024
upgrade to spotbugs gradle plugin 5.2.5 (#94),
remove spotbugsShowStackTraces (not used by plugin anymore),
remove custom spotbugs xsl file usage for html report generation (use native html report instead)
@xvik
Copy link
Owner

xvik commented Feb 1, 2024

5.0.0 released

Spotbugs plugin updated to the latest 5.x plugin version (because 6.x drops gradle 7 and java 8 support)

I also removed all deprecated apis usage, so there should be no warnings now.
Configuration cache is still not supported (not sure it's possible at all currently)

One downside of new gradle apis usage is that console report might appear not directly below quality task, but only in strict mode (I can't do anything with it)

Gradle 5 and 6 support was dropped (due to switching to groovy 3).

@xvik xvik closed this as completed Feb 1, 2024
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

No branches or pull requests

3 participants