hey folks, I'm using the autonomousapps dependency...
# community-support
a
hey folks, I'm using the autonomousapps dependency analysis plugin to clean up our dependencies and am looking into ways to automate the buildHealth task into part of our build workflow. Is there a convention of where/when to run this task to prevent regressions of our dependencies without being too much of a hindrance on active development? I haven't found too much documentation about using the plugin in this regard. Thanks in advance 🙂
c
I simply have it run in ci. I also have a separate build that only runs on PRs
Copy code
./gradlew build buildHealth --build-cache
1
I tend to only pay attention to it when I'm thinking about merging
and I don't create PR's unless I'm thinking about merging
ci-build
always runs
ci-full
only runs on PR's but would fail fast if this isn't right since it's the thing most likely to fail at that point (I hope)
Copy code
ci-build:
	./gradlew build buildHealth --build-cache

ci-full:
	./gradlew buildHealth build --no-build-cache --no-configuration-cache
j
I usually add a task called
qualityCheck
. This then runs in the first stage of PR builds and can also be run locally by developer before pushing. For the dependency analysis plugin I typically wire these to
projectHealth
to have each project checked individually. And you then set that task to fail.
Copy code
// in root -> make analysis plugin lead to failure
dependencyAnalysis { issues { all { onAny { severity("fail") } } } }
And the
check
task something like this:
Copy code
// each project has a 'qualityCheck'
tasks.register("qualityCheck") {
    group = "build"
    description = "Runs all checks (without executing tests)"
    dependsOn(tasks.withType<ProjectHealthTask>())
    // Other checks like spotless or checkstyle etc.
}
First stage of CI:
Copy code
./gradlew qualityCheck --continue
1
a
thanks guys!
btw @Jendrik Johannes I've been watching your youtube series in the background while working - really good content!
🙏 1