Skip to content

Commit 25bba4c

Browse files
committed
Document the use of of the gradle init script for spotless with respect to the gradle configuration cache
1 parent 459073d commit 25bba4c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/blueprints.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
run: ./gradlew assembleDebug compileDebugUnitTestKotlin
4040

4141
- name: Spotless
42+
# Spotless is not gradle configuration cache compliant. To allow the rest of the build
43+
# comply, run spotless with a gradle init script and disable the cache.
4244
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
4345

4446
- name: Robolectric

gradle/init.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
// The init script is used to run Spotless in a gradle configuration cache compliant manner as
18+
// Spotless itself is not gradle configuration cache compliant.
19+
// Note that the init script needs to be run with the configuration cache turned off.
20+
1721
val ktlintVersion = "0.44.0"
1822

1923
initscript {

0 commit comments

Comments
 (0)