Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

How to customize the wrapper task in the root plugin #12

Closed
mqware opened this issue Aug 11, 2023 · 2 comments
Closed

How to customize the wrapper task in the root plugin #12

mqware opened this issue Aug 11, 2023 · 2 comments
Labels

Comments

@mqware
Copy link

mqware commented Aug 11, 2023

I'd like to customize the wrapper task to download the "all" distribution. The following code from the doc works in the build.gradle.kts file which is in the project root directory, but it doesn't work in the root plugin. Is there a way to make it work in the plugin?
Thanks.

tasks.wrapper {
    distributionType = Wrapper.DistributionType.ALL
}
@jjohannes
Copy link
Owner

Interesting. This must be a special case in the Kotlin DSL where it fails to provide the tasks.wrapper accessor. This works:

tasks.named<Wrapper>("wrapper") {
    distributionType = Wrapper.DistributionType.ALL
}

(NOTE: It's not really recommended by Gradle to use the ALL distribution. Instead IDEs should download sources on demand. But it's not working well in all scenarios.)

@mqware
Copy link
Author

mqware commented Aug 16, 2023

Hi Jendrik,

Thanks for providing a solution, I will save it, but I will also take your advice and just stick with the BIN distribution for now.

Cheers,
Peter

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

No branches or pull requests

2 participants