jfrog / artifactory-gradle-plugin

JFrog Gradle plugin for Build Info extraction and Artifactory publishing.
Apache License 2.0
20 stars 15 forks source link

Migrate plugin conventions to extensions #72

Closed yahavi closed 9 months ago

yahavi commented 10 months ago

Fix https://github.com/jfrog/artifactory-gradle-plugin/issues/43 Supersedes https://github.com/jfrog/artifactory-gradle-plugin/pull/62

The notion of Gradle conventions has been deprecated. In essence, this pull request is intended migrate of the plugin to the extensions concept by eliminating all occurrences of ConfigureUtil.configureUsing(Closure closure) and replacing them with ObjectFactory.newInstance(Class, Object...). It also replaces all references to ConventionUtils with ExtensionsUtils.

As per the information provided in the ConfigureUtil documentation:

Gradle automatically generates a Closure-taking method at runtime for each method with an Action as a single argument as long as the object is created with ObjectFactory.newInstance(Class, Object...).

To utilize ObjectFactory.newInstance, a constructor must have the @Inject annotation applied.

github-actions[bot] commented 10 months ago
[![](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noVulnerabilityBannerPR.png)](https://github.com/jfrog/frogbot#readme)

[🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)