nkiesel
07/09/2020, 12:59 AMdetekt-config.yml
in my root directory, and another `detekt-config.yml`in my module directory. To use both, I use detekt { config = files("${project.rootDir}/detekt-config.yml", "detekt-config.yml") }
. Is there a better way which e.g. does not require to repeat the base config file name or perhaps even a mergeConfigs: true
which will automatically merge these? I tried detekt { config += files("detekt-config.yml") }
but that did not work.gammax
07/09/2020, 7:59 PMIs there a better way which e.g. does not require to repeat the base config file nameYou should be able to write a Gradle function (let’s call it
mergeBaseConfigWith
) that returns a ConfigurableFileCollection
(is Gradle type) and do something like:
detekt { config = mergeBaseConfigWith("detekt-config.yml") }
nkiesel
07/13/2020, 1:26 AM