I wanted to find unused dependencies in my project. Is there a feature for this in Gradle, like in Maven?
Editor's Note: This answer is out of date. Please see the top answer.
You can try the com.github.nullstress.dependency-analysis Gradle plugin
Build script snippet for use in all Gradle versions:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.nullstress:DependencyAnalysisPlugin:1.0.3"
}
}
apply plugin: "com.github.nullstress.dependency-analysis"
Build script snippet for new, incubating, plugin mechanism introduced in Gradle 2.1:
plugins {
id "com.github.nullstress.dependency-analysis" version "1.0.3"
}
Also, there is a thread (Is there a Gradle equivalent of "mvn dependency:analyze"?) in the Gradle forum about this.