I want to analyze the build.gradle of my organization projects, primarily to create a sonarqube plugin that report the use of a dependency or the absence of a dependency.
The sonarqube plugin will be writed in Java and the input will be the .gradle files.
For example:
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile "joda-time:joda-time:2.2"
testCompile "junit:junit:4.12"
}
I want to get the dependency list for example in an List.class
Any idea?, how can I interpretate a .gradle file in Java?
I recommend you to go this way so you do not have to handle the harsh task of keeping your code maintained with any version file change in gradle.