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.

Please sign in to leave a comment.