* 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 https://github.com/diffplug/spotless/issues/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
```
[Hilt] Provided Metadata instance has version 2.3.0, while maximum supported version is 2.2.0. To support newer versions, update the kotlin-metadata-jvm library.: java.lang.IllegalArgumentException: Provided Metadata instance has version 2.3.0, while maximum supported version is 2.2.0. To support newer versions, update the kotlin-metadata-jvm library.
```
- Upgrades to a newer version of compose bom that pulls in newer
versions of lint checks that work with AGP 8.12.2
- Bump the minSdk to 23 because compose now requires minSdk 23
- Update Navigation_fontScale2.png due to compose upgrade
- Clean up BuildConfig set up since we already use Gradle 9.0.0
Test: ./gradlew build
Gradle 9.0.0 has the new enforcement that Test task runs that
have sources but no tests run should fail. Without this change we get
Execution failed for task ':core:analytics:testDemoDebugUnitTest'.
> There are test sources present and no filters are applied, but the test task did not discover any tests to execute. This is likely due to a misconfiguration. Please check your test configuration. If this is not a misconfiguration, this error can be disabled by setting the 'failOnNoDiscoveredTests' property to false.
We get this because before this change AndroidCompose was always setting
isIncludeAndroidResources = true which generates a source to the test
task and in the case of :core:analytics it is the only source.
Instead of setting isIncludeAndroidResources in AndroidCompose move to
setting it in relevant build.gradle.kts files (most already had it)
Calls to Project.properties is not Gradle Isolated Projects safe as it
causes Gradle to look through parent projects to find these. Move to
using providers.gradleProperty as that does not have the same behavior.
Test: ./gradlew build --dry-run -Dorg.gradle.unsafe.isolated-projects=true
fewer warnings after the PR