This message was deleted.
# community-support
s
This message was deleted.
v
To start with, using
subprojects { ... }
(as well as
allprojects { ... }
,
project(...) { ... }
and similar) is highly discouraged and bad practice as it immediately introduces project coupling, disturbs more sophisticated Gradle features, and reduces clarity and maintainability. Instead you should use convention plugins in
buildSrc
or an included build, for example implemented as precompiled script plugin. Regarding the actual problem, if you configure for
configDirectory
the root directory, that is extremely bad, as then the whole directory tree becomes input files for the checkstyle tasks which has very bad consequences, including those warnings you get and the suggestions in those warnings are actually non-sense symptom treatment instead of fixing the root cause. So if you want to set
configDirectory
, make sure this is a dedicated directory like
config/checkstyle
that only has the Checkstyle configuration as content and nothing else. Otherwise, do not set the
configDirectory
, but only the
configFile
. To configure the suppressions file, you probably need to use some variable like in your "first" branch and set the property from the build script.
For example
configProperties["rootDir"] = rootDir
in
checkstyle { ... }
and
${rootDir}/suppressions.xml
in the config file. But additionally you then need to declare the suppressions file as input for the checkstyle tasks, or the task will be considered up-to-date if only the suppressions file was changed.
u
Thanks.
👌 1
I already hit against the wall using subproject 🙂. Some project has third submodule and it inherits all plugins including those are odd.