Skip to content

Commit 5ba16ed

Browse files
authored
Apply spotless by default (#2055)
* Apply spotless by default - Upgrades to spotless 8.2.1 - Moves spotless setup from an init.gradle.kts to build-logic - Narrows down the scope of `target` in spotless configuration to be more precise to workaround diffplug/spotless#2717 - Updates all references to init.gradle.kts Ran gradle-profiler ./gradlew build --dry-run to validate performance impact. Before PR: Mean 10,527.96 ms with 289.01 ms std dev After PR: Mean 11,251.78 ms with 530.29 ms std dev Regression is there, but quite minor. Test: ./gradlew spotlessCheck * Address comments from AI overlords * Fix usage of rootProject * Enable spotless for build-logic via root project
1 parent eee94e4 commit 5ba16ed

File tree

70 files changed

+349
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+349
-305
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Thanks for submitting a pull request. To accept your pull request we need you do
1010
**Ensure tests pass and code is formatted correctly**
1111

1212
- Run local tests on the `DemoDebug` variant by running `./gradlew testDemoDebug`
13-
- Fix code formatting: `./gradlew --init-script gradle/init.gradle.kts spotlessApply`
13+
- Fix code formatting: `./gradlew spotlessApply`
1414

1515
**Add a description**
1616

.github/workflows/Build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: ./gradlew :build-logic:convention:check
4949

5050
- name: Check spotless
51-
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
51+
run: ./gradlew spotlessCheck
5252

5353
- name: Check Dependency Guard
5454
id: dependencyguard_verify

.run/spotlessApply.run.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<option name="executionName" />
55
<option name="externalProjectPath" value="$PROJECT_DIR$" />
66
<option name="externalSystemIdString" value="GRADLE" />
7-
<option name="scriptParameters" value="--init-script=gradle/init.gradle.kts" />
87
<option name="taskDescriptions">
98
<list />
109
</option>

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The main Android app lives in the `app/` folder. Feature modules live in `featur
2626
The app and Android libraries have two product flavors: `demo` and `prod`, and two build types: `debug` and `release`.
2727

2828
- Build: `./gradlew assemble{Variant}`. Typically `assembleDemoDebug`.
29-
- Fix linting/formatting: `./gradlew --init-script gradle/init.gradle.kts spotlessApply`
29+
- Fix linting/formatting: `./gradlew spotlessApply`
3030
- Run local tests: `./gradlew {variant}Test`
3131
- Run single test: `./gradlew {variant}Test --tests "com.example.myapp.MyTestClass"`
3232
- Run local screenshot tests: `./gradlew verifyRoborazziDemoDebug`

app-nia-catalog/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
</activity>
3737
</application>
3838

39-
</manifest>
39+
</manifest>

app-nia-catalog/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
<background android:drawable="@drawable/ic_launcher_background"/>
1919
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
2020
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
21-
</adaptive-icon>
21+
</adaptive-icon>

app-nia-catalog/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
<background android:drawable="@drawable/ic_launcher_background"/>
1919
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
2020
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
21-
</adaptive-icon>
21+
</adaptive-icon>

app-nia-catalog/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
-->
1717
<resources>
1818
<string name="app_name">NiA Catalog</string>
19-
</resources>
19+
</resources>

app-nia-catalog/src/main/res/values/themes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
-->
1717
<resources>
1818
<style name="Theme.NiaCatalog" parent="android:Theme.Material.Light.NoActionBar" />
19-
</resources>
19+
</resources>

app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
<background android:drawable="@drawable/ic_launcher_background"/>
1919
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
2020
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
21-
</adaptive-icon>
21+
</adaptive-icon>

0 commit comments

Comments
 (0)