I'm trying to get a list of all valid values for the --configuration
flag of the dependencyInsight or dependencies gradle tasks. How would I go about doing this with Gradle 3.2.1?
We can get to the settings from the Gradle Tool Window, or from the usual Settings/Preferences dialog (⌘, (macOS), or Ctrl+Alt+S (Windows/Linux)) and navigating to Build, Execution, Deployment | Build Tools | Gradle. Generally these settings are fine for most projects, and don't need changing.
A “configuration” is a named grouping of dependencies. A Gradle build can have zero or more of them. A “repository” is a source of dependencies. Dependencies are often declared via identifying attributes, and given these attributes, Gradle knows how to find a dependency in a repository.
To get an overview of all Gradle tasks in our project, we need to run the tasks task. Since Gradle 5.1, we can use the --group option followed by a group name. Gradle will then show all tasks belonging to the group and not the other tasks in the project.
Gradle allows us to list all the essential tasks of the project. To list the task, run the below command: gradle -q tasks.
Have you tried:
configurations.each { println it.name }
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With