jenkinsci / gradle-jpi-plugin

Build Jenkins Plugins with Gradle
79 stars 50 forks source link

Upgrade to Gradle 7.1 and remove usage of Gradle deprecated APIs #227

Closed rpalcolea closed 10 months ago

rpalcolea commented 1 year ago

This is to upgrade to Gradle 7.1 to use sourceSet from JavaPluginExtension.

JavaPluginConvention has been deprecated for years and soon to be removed

This is a breaking change though that would require 7.1+

With that said, because the plugin is written in Kotlin, there won't be Gradle backwards compatibility issues with Groovy :). I can potentially change this to have conditional logic but at some point that would have to be moved to reflection (when the class goes away). So wondering if it makes sense to introduce the breaking change sooner than later

sghill commented 1 year ago

Thanks!

Note to myself that LocalizationPlugin is also impacted:

The Project.getConvention() method 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/userguide/upgrading_version_8.html#deprecated_access_to_conventions
    at org.gradle.api.internal.project.DefaultProject.getConvention(DefaultProject.java:593)
    at org.jenkinsci.gradle.plugins.jpi.localization.LocalizationPlugin.apply(LocalizationPlugin.java:29)
    at org.jenkinsci.gradle.plugins.jpi.localization.LocalizationPlugin.apply(LocalizationPlugin.java:23)
sghill commented 10 months ago

Thanks @rpalcolea!