> I wonder if something as simple as putting a circuit breaker > [props_version] property in `gradle.properties` could be helpful? For > changes that could indicate the need to regenerate gradle.properties, the > "magic" property could be incremented. That would simplify detection of > potential error cases, and allow to print more meaningful > warning/instructions. >
This can be made in a number of ways, I guess. I just didn't have time/ care for it much. Typically everything would run just fine - the JVM options that open up modules for spotless is the first thing that caused serious issues... The problem with "magic" property bumps is people who switch between branches (like I do) - for them, this would cause a problem and be a workflow-blocker. So maybe we should just detect whether the right settings are set for spotless (and any other task that needs it) and leave out everything else. > Instructions/failure message could be something like: "[something has > changed]. You might want to consider re-generating your `gradle.properties` > file (and re-applying any custom modifications). to ignore this warning, > you can manually update [props_version] property in your current > `gradle.properties` file". > It's a fairly basic property file. You could even suggest what needs to be changed (additions/ removals/ changed properties). > IMO it'd be ok to fail the first run if gradle.properties hadn't yet been > generated. > I don't know. It should really work on the first run. On the other hand, it's really slow then (not taking advantage of multiple cpus, etc.). D. >