Detekt gradle task finish successfully when there are changes to custom RuleProvider or Rule.
Detekt gralde task failed with the following stack.
Caused by: java.util.ServiceConfigurationError: io.gitlab.arturbosch.detekt.api.RuleSetProvider: Error reading configuration file
at io.gitlab.arturbosch.detekt.core.RuleSetLocator.load(RuleSetLocator.kt:29)
at io.gitlab.arturbosch.detekt.cli.config.DefaultPropertiesConfigValidator$validate$1.invoke(DefaultPropertiesConfigValidator.kt:20)
at io.gitlab.arturbosch.detekt.cli.config.DefaultPropertiesConfigValidator.validate(DefaultPropertiesConfigValidator.kt:27)
at io.gitlab.arturbosch.detekt.cli.config.ConfigValidatorsKt.checkConfiguration(ConfigValidators.kt:15)
at io.gitlab.arturbosch.detekt.cli.runners.Runner.execute(Runner.kt:31)
at io.gitlab.arturbosch.detekt.invoke.DefaultCliInvoker.invokeCli(DetektInvoker.kt:51)
... 89 more
Caused by: java.util.zip.ZipException: invalid code lengths set
... 95 more
1) Remove a rule from a RuleProvider
2) Run gradle detekt task.
1) Run ./gradlew detekt on current master
2) Remove for example the rule ChainWrapping from file io.gitlab.arturbosch.detekt.formatting.KtLintMultiRule
3) Rerun the gradle task
This happens due to classloader caching of the newer Gradle plugins (1.7.0+).
What you can do is to stop all daemons with gradle --stop and restart with a fresh classloader or start builds without a daemon gradle build --no-daemon.
I think we should introduce an additional timestamp comparision ...
Yup, stopping all the gradle daemon seems to be a good temporary solution. :+1:
I've added the regression and api tag as this hurts all extension authors.
So imo this is now a blocker.
I will experiment with simple/cheap hashes.
Most helpful comment
This happens due to classloader caching of the newer Gradle plugins (1.7.0+).
What you can do is to stop all daemons with
gradle --stopand restart with a fresh classloader or start builds without a daemongradle build --no-daemon.I think we should introduce an additional timestamp comparision ...