thunderbird / thunderbird-android

Thunderbird for Android – Open Source Email App for Android (fka K-9 Mail)
https://thunderbird.net/mobile
Apache License 2.0
11.02k stars 2.51k forks source link

Fix spotless being slow #8395

Closed wmontwe closed 1 month ago

wmontwe commented 1 month ago

This limits the scope of Spotless to the module it is applied to. This greatly improves the check and formatting speed. With version 7.0.0 of Spotless the configuration cache is better supported providing an additional boost. But that is currently in beta and not included yet in this changes.

Resolves #8362

cketti commented 4 weeks ago

It looks like this introduced a problem. I now often have full builds (gradlew build) fail with an error similar to this:

Execution failed for task ':spotlessKotlinGradle'.
> Could not read path '…/app-thunderbird/build/intermediates/merged-not-compiled-resources/full/beta/values-lu/values-lu.xml'

I'm guessing this is because spotless gets the file listing of a directory first, then when it gets around to opening the files on that list some of them may have been deleted by another task already. Hopefully this is an easy fix because we don't want spotless to look at the build/ directories anyway.