Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,22 @@ jobs:
run: |
flox activate -d flox/base -- ./gradlew :plugin-api:apiCheck --no-daemon

- name: Run spotlessCheck
# Combined with a compile task on purpose: spotlessCheck alone never pulls a
# source-tree-writing task into the graph, so the implicit-dependency failure ADFA-5244 fixed
# cannot reproduce in a standalone run. Without this step a regression of that exclude is
# invisible to CI and shows up only on a developer's machine at push time.
- name: Run spotlessCheck alongside a compile task
run: |
flox activate -d flox/base -- ./gradlew spotlessCheck --no-daemon || {
echo "::error::Spotless found formatting violations in this branch. Run './gradlew spotlessApply' locally, then commit and push the formatted files."
exit 1
}
# Two tasks, so two possible causes: the message must not name one of them. Blaming
# Spotless for a compile error is the exact misdiagnosis this step exists to catch.
set +e
flox activate -d flox/base -- ./gradlew :common:compileV8DebugKotlin spotlessCheck --no-daemon
status=$?
set -e
if [ "$status" -ne 0 ]; then
echo "::error::Gradle failed on ':common:compileV8DebugKotlin spotlessCheck'. If the output above shows formatting violations, run './gradlew spotlessApply' locally and commit the result; if it shows a compile error, spotlessApply will not help. The Gradle output says which."
exit "$status"
fi

- name: Install advancecomp (advzip, used by recompressApk)
run: |
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ sentry.properties

/app/google-services.json

# Written by the gradle-plugin tests, not by a Gradle task: writeInitScript() in
# gradle-plugin/src/test/.../utils.kt resolves FileProvider.testHomeDir() and creates
# .cg/init/androidide.init.gradle there on every run. ADFA-5263 deleted copyToTestDir, so the
# model.jar entry that used to sit beside this one is dead, but the directory still fills up.
tests/test-home

# Kotlin build files
.kotlin/

Expand Down
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ spotless {
// Spotless's auto-prune of .git/.gradle/build, so restore them. flox is the
// ADFA-4816 fix: its /nix/store symlinks (millions of files) made
// spotlessCheck take 12+ minutes.
// Bare dir names required: Gradle prunes a subtree only when an exclude
// matches the dir node itself; `dir/**` matches contents and forces a
// descend-and-filter (no pruning).
// The pattern must match the directory node itself, because Gradle prunes a subtree only then;
// `dir/**` matches the contents instead and forces a descend-and-filter. Bare names are
// root-anchored: "flox" prunes only rootDir/flox, so anything that has to match at depth needs
// the `**/` prefix the three entries below carry. Dropping it -- reading "**/.gradle" as
// equivalent to ".gradle" -- would stop pruning every per-project cache dir and bring back the
// ADFA-4816 12-minute spotlessCheck.
val traversalExcludes =
arrayOf(
"flox",
Expand Down
Loading