Get gradle model programmatically

Is there a way to get the gradle model from a module programmatically? When I say model, I mean information like, what gradle project the module represents, the tasks, source sets and configuration it has, etc ... I've been looking at the forums for a similar question, however most are about how to run gradle tasks programmatically, which I don't need help with.

1 comment
Comment actions Permalink

Well, if you want to fetch the `tasks` then you can include `Gradle` as a dependency to your plugin, and get the list as follows:

GradleTasksIndices.getInstance(project).findTasks(project.basePath)
0

Please sign in to leave a comment.