Sha*_* M. 6 java parsing gradle build.gradle
我需要解析java中的gradle build.gradle文件,并列出依赖项下提到的所有依赖项(作为Group:Artifact:Version的列表)。最好的解决方案是什么?
build.gradle如下所示,
apply plugin: 'java-library'
repositories {
jcenter()
}
dependencies {
compileOnly group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
compile group: 'com.google.code.findbugs', name: 'annotations' , version: '3.0.0'
compile "com.google.code.gson:gson:2.8.5"
compile "org.owasp:dependency-check-gradle:4.0.1"
compile 'org.apache.httpcomponents:httpclient:4.5.7'
api 'org.apache.commons:commons-math3:3.6.1'
implementation 'com.google.guava:guava:21.0'
testImplementation 'junit:junit:4.12'
}
````
Run Code Online (Sandbox Code Playgroud)