Gradle: Preventing Cyclic Dependencies in the Java Package Structure

Viewed 966

I have a Gradle build for a Java program and I would like to include static analysis to cause the build to fail if a cyclic dependency is found in the package structure. Can FindBugs, for example, be configured to do this? I currently have FindBugs defined in the build.gradle and it will stop the build for various problems but not for package cycles:

apply plugin: 'findbugs'

findbugs {
    toolVersion = '3.0.1'
    effort = 'max'
    reportLevel = 'medium'
}
2 Answers
Related