I have a gradle project with several subprojects and would like to enforce certain properties about them.
For example, I might want to make sure that no project depends on project A. Or that projects with property B are the only projects that depend on some specific dependency. Can I do this (reasonably easily) from a test class (and if so, how), or am I better off using an afterEvaluate
block on all subprojects and running validation from there?
In a more annoying example, I might be using a dependency version management plugin like gradle-consistent-versions, but this plugin won't evaluate against dependencies in the buildSrc
project. How could I write a test to make sure the dependency versions in buildSrc
line up with those in versions.props
, without necessarily relying on specific build.gradle
formatting?
Thanks
Aucun commentaire:
Enregistrer un commentaire