sdkman / sdkman-vendor-gradle-plugin

A plugin for Gradle to allow Vendors to release Candidate Versions on SDKMAN!
Apache License 2.0
15 stars 12 forks source link

Allow deferred configuration of tasks. #3

Closed pledbrook closed 9 years ago

pledbrook commented 9 years ago

Fixes issue #2. All the tasks now have properties that need to be initialised before the tasks can be used. Instead of having the tasks pull the required information from the GVM extension, the plugin class performs the binding between the extension and task properties.

This means that users can define their own GVM task instances and they can also configure the convention-based ones at any time before execution.

pledbrook commented 9 years ago

On the question of whether this changes behaviour for anyone already using the plugin, the answer is no. Users can still configure everything through the gvm DSL, it's just that they also have the option of configuring the tasks directly at any time before execution. That's largely what the plugin class now does: binds the extension's values to the relevant tasks.

pledbrook commented 9 years ago

An additional benefit of this approach is that users can define their own instances of the SDK.env tasks, with their own settings.