If you use Gradle, I highly recommend to use Niklas' <@U26C0LFMZ> plugin, which allows to configure ...
s
If you use Gradle, I highly recommend to use Niklas' @vanniktech plugin, which allows to configure static analysis for a mixed code base. https://github.com/vanniktech/gradle-code-quality-tools-plugin