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

Use convention method to set task property defaults #5272

merged 1 commit into from Sep 4, 2022


Copy link

@3flex 3flex commented Sep 4, 2022

Often you want to apply some convention, or default value, to a property to be used if no value has been configured for the property. You can use the convention() method for this. This method accepts either a value or a Provider and this will be used as the value until some other value is configured.

This means that whenever the plugin is applied, it will apply only default values, and if the value was set anywhere else in the build script, the convention will not overwrite it.

@schalkms schalkms added this to the 1.22.0 milestone Sep 4, 2022
@3flex 3flex merged commit 9c7a491 into detekt:main Sep 4, 2022
21 checks passed
@3flex 3flex deleted the gradle-property-conventions branch September 4, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants