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.

0
2 comments

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

Hey, Ranie Jade Ramiso. Did you find any way of programmatically getting a module's gradle model?

0

Please sign in to leave a comment.