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

Update sdkman-vendor-gradle-plugin to follow the latest best practices #13

Closed big-guy closed 3 years ago

big-guy commented 3 years ago

Hi @marc0der, long time no see.

This is a revamp of the sdkman-vendor-gradle-plugin. We tried upgrading the Gradle promotion build to 2.0.0 and ran into some problems with the way properties are hooked into the tasks from the plugin. I bumped the version to 3.0.0 since it contains breaking changes.

I had to update the build somewhat:

I also added cross-version tests for Gradle 6.1.1 and above. This isn't exhaustive, but I think adequate. It may be possible to support older versions if necessary.

The tests didn't change very much as the behavior of the plugin is nearly the same when releasing.

Some breaking changes were:

For Groovy DSL, the change to Provider API looks almost transparent. You can still use the same syntax as before most of the time.

The main benefit for using the Provider API is that it completely gets rid of afterEvaluate and the need to configure the sdkman extension or SDKMAN! tasks before/after something else.

I believe this change incidentally fixes both of the open issues: https://github.com/sdkman/sdkman-vendor-gradle-plugin/issues/11 https://github.com/sdkman/sdkman-vendor-gradle-plugin/issues/2

PTAL. We're going to try this out internally until an official release is made.

marc0der commented 3 years ago

Hey @big-guy, I hope you're doing well, and it is great to hear from you!

Thanks so much for spending the time on making this plugin better. I really appreciate the work you've done.

Firstly, I'm happy to merge the PR; it looks awesome. I just had one question regarding docs: If you introduced breaking changes, should this be reflected on the vendors website page too? If you wouldn't mind casting an eye and letting me know what should change, I'd be happy to make the changes on your behalf.

Lastly, I'd be super happy for you to take ownership of this repository as you guys are masters of Gradle :smile: That would include the rights to push to the repository and perform periodic releases if/when necessary. Is this something that you would be willing to take on?

marc0der commented 3 years ago

FYI, I just released 3.0.0 to the plugin portal. Thanks again for the great contribution!

big-guy commented 3 years ago

@marc0der the only minor thing I would change is:

It also exposes some convenience tasks that roll the above into single tasks:

  • sdkMajorRelease: performs release, default and structured announce
  • sdkMinorRelease: performs release and structured announce, no default

I would just say something like "It also exposes some convenience tasks:" instead because those tasks aren't actually doing the work now. There aren't any breaking changes at the CLI level.

Lastly, I'd be super happy for you to take ownership of this repository as you guys are masters of Gradle 😄 That would include the rights to push to the repository and perform periodic releases if/when necessary. Is this something that you would be willing to take on?

I'm happy to be added as a contributor. I don't think we want to move this under the Gradle organization.

For publishing the plugin to the portal, I can get us setup with a bot publishing account on the plugin portal so this plugin is no longer tied to your user account. Is that what you'd want?

marc0der commented 3 years ago

@big-guy, okay I'll make those changes on the site soon.

Rather than transferring the ownership of the repo to Gradle, I was more thinking of letting you as an individual become a contributor with push rights to this repo.

Publishing wise, I'm happy to hand you some credentials to do these whenever you see fit. Otherwise, I'm also happy to continue doing the releases myself. No big deal for me.

big-guy commented 3 years ago

@marc0der sounds good to me. Gradle 7.1 was released with the latest version of the plugin and all went well.

marc0der commented 3 years ago

I've just added you as a maintainer to the project, so you should be good to go.