Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add possibility for specifying the distribution type #278

Open
vnastasi opened this issue Dec 30, 2024 · 4 comments
Open

Add possibility for specifying the distribution type #278

vnastasi opened this issue Dec 30, 2024 · 4 comments

Comments

@vnastasi
Copy link

Hello

I noticed that there is no option in the plugin configurations to specify the distribution type for the wrapper (all or bin), and the wrapper task invoked always defaults to bin distribution type.

While this probably is OK for the vast majority of users, for those of us using all it's a bit inconvenient. I personally like to dig deeper in Gradle sources in my projects when I make custom tasks and plugins, so having the full distribution is a must. I can always go and amend the resulting PR, of course, but still. A property in the plugin extension would be a lot nicer.

Cheers!

@StefMa
Copy link
Contributor

StefMa commented Jan 6, 2025

I didn't find this request too bad and think about adding this feature. However, right now the extension or the specific domain object is used for Gradle and Maven. Since this is a gradle specific request we may wanna talk about the api here.
One approach would be to extract the current domain object to an interface and inherit this by specific GradleDomainObject and a MavenGradleObject.

What do you think about this @alextu ?
Not only about the request itself but also about my api suggestion?

@alextu
Copy link
Member

alextu commented Jan 7, 2025

Yes, I think that's a reasonable feature. Since the "distribution type" exists as well for Maven, we can implement this attribute for both Gradle and Maven in the same domain object.
We won't have time to work on this feature in the near future though, but feel free to submit a PR.

@StefMa
Copy link
Contributor

StefMa commented Jan 13, 2025

But the type is 100% (except of bin) different. Doesn't it make sense in terms of runtime safety to introduce hardcoded enums? So that for Gradle only all and bin is possible while for maven bin source.. etc?

@StefMa
Copy link
Contributor

StefMa commented Jan 14, 2025

I just checked the code and found out that for Gradle, it fetches https://services.gradle.org/versions/current to find out the latest version and the checksum.
It seems that there is only a checksum for the bin vesion, but no checksum of the all version.
I get of course see the checksum here https://gradle.org/release-checksums/, but seems I'm unable to get them via json? 🤔

This would of course a big blocker for this feature...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants