Skip to content

Commit

Permalink
Use correct resolvable/consumable flags on detekt's configurations (#…
Browse files Browse the repository at this point in the history
…5657)

Both flags have a default value of true, but as a plugin author, you should
always determine the right values for those flags, or you might
accidentally introduce resolution errors.

Source: https://docs.gradle.org/7.6/userguide/declaring_dependencies.html#sec:resolvable-consumable-configs
  • Loading branch information
3flex committed Jan 1, 2023
1 parent edab3ee commit 25b560f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ class DetektPlugin : Plugin<Project> {
configuration.isVisible = false
configuration.isTransitive = true
configuration.description = "The $CONFIGURATION_DETEKT_PLUGINS libraries to be used for this project."
configuration.isCanBeResolved = true
configuration.isCanBeConsumed = false
}

project.configurations.create(CONFIGURATION_DETEKT) { configuration ->
configuration.isVisible = false
configuration.isTransitive = true
configuration.description = "The $CONFIGURATION_DETEKT dependencies to be used for this project."
configuration.isCanBeResolved = true
configuration.isCanBeConsumed = false

configuration.defaultDependencies { dependencySet ->
val version = extension.toolVersion
Expand Down

0 comments on commit 25b560f

Please sign in to comment.