Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a list of all configurations for a Gradle project?

Tags:

gradle

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?

like image 498
Cliabhach Avatar asked Dec 15 '16 21:12

Cliabhach


People also ask

How do I check my Gradle settings?

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.

What are Gradle configurations?

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.

How do I list all tasks in Gradle?

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.

Which command is used to view the list of available projects in Gradle?

Gradle allows us to list all the essential tasks of the project. To list the task, run the below command: gradle -q tasks.


1 Answers

Have you tried:

configurations.each { println it.name } 

?

like image 54
Opal Avatar answered Oct 14 '22 09:10

Opal