Ingwersaft / wildfly-deploy-gradle-plugin

Gradle Plugin for deploying Files to Wildfly
https://plugins.gradle.org/plugin/com.mkring.wildlydeplyplugin.deploy-wildfly-plugin
GNU General Public License v3.0
10 stars 11 forks source link

Do not depend on build task, lazily resolve file #22

Closed jnohlgard closed 4 years ago

jnohlgard commented 4 years ago

It is better to let the user manage the dependencies, especially since different deployment tasks may depend on different build tasks. This PR changes the file property to use @InputFile annotations to allow Gradle to discover the build steps automatically instead of always relying on the build task to produce the archive to deploy. Additionally, in order to allow the names for the archive, runtime and deployment to be lazily resolved, the properties are changed from plain String into Gradle Property<String> and RegularFileProperty

The lazy configuration allows us to avoid adding an afterEvaluate block in build.gradle to set the file name for a project I have at work where the file name is configured from a number of other properties, (git commit id, gradle.properties, and some other things).

See also: https://docs.gradle.org/current/userguide/lazy_configuration.html

Ingwersaft commented 4 years ago

Hey, thanks for your contribution! I'll try to review it this week - if time allows :)

Ingwersaft commented 4 years ago

This breaks the API, so the documentation and the integration will be wrong after your changes. Please adapt the documentation to the changed API and also the integration build script as well, thanks!

jnohlgard commented 4 years ago

@Ingwersaft Updated integration build script and README.md

Ingwersaft commented 4 years ago

Sorry for the late response! Thanks for updating, looks good to me! Will release it right after the CI job succeeds 👍