How to enable error-prone for some modules in a multi-module Gradle project? I want to have the ability to turn on error-prone for several modules (not for all).
How to enable error-prone for some modules in a multi-module Gradle project? I want to have the ability to turn on error-prone for several modules (not for all).
You can share this build logic as a plugin in
buildSrc
and only apply this plugin to your target modules.For example, this sample in the official website https://docs.gradle.org/current/samples/sample_convention_plugins.html has two plugins and three modules:
Two of them apply the
myproject.library-conventions
and only one apply themyproject.java-conventions
plugin: