From 513a5bd1d288d442a48a26543f5b72f0581cf9fc Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Tue, 27 Jan 2026 18:14:49 -0800 Subject: [PATCH] Scope down spotless targets Using broad target("**/*.kt") results in huge cost in configuration cache serialization. Before: 30,102.48 ms mean with 561.58 ms standard deviation After: 16,482.29 ms mean with 235.55 ms standard deviation For the following Gradle profiler scenario build_dry_run { tasks = ["build"] gradle-args = ["--dry-run"] clear-configuration-cache-state-before = BUILD } Using steps described in https://www.liutikas.net/2025/11/02/Unreasonable-Configuration.html Format all existing code with ./gradlew spotlessApply Lastly, update settings.gradle to use buildScript.sourceFile as previous code was making an assumption current path is the checkout of the project. --- app/src/main/AndroidManifest.xml | 3 +- .../androidify/navigation/MainNavigation.kt | 2 +- build.gradle.kts | 9 ++--- .../testing/data/TestGeminiNanoDownloader.kt | 17 ++++++++- .../TestGeminiNanoGenerationDataSource.kt | 2 +- .../TestLocalSegmentationDataSource.kt | 19 ++++++++-- .../developers/androidify/theme/Motion.kt | 2 -- .../androidify/util/AdaptivePreview.kt | 3 +- .../developers/androidify/util/LayoutUtils.kt | 2 +- .../data/GeminiNanoGenerationDataSource.kt | 4 +-- .../data/ImageGenerationRepository.kt | 2 +- .../GeminiNanoDownloaderInitializer.kt | 2 +- .../data/ImageGenerationRepositoryTest.kt | 21 +++++++++-- .../androidify/camera/CameraLayout.kt | 2 +- .../androidify/creation/CreationScreen.kt | 1 - .../androidify/creation/PhotoPrompt.kt | 21 ++++++----- .../androidify/creation/PromptTypePager.kt | 16 ++------- .../creation/CreationViewModelTest.kt | 2 +- .../data/TextGenerationRepositoryImplTest.kt | 36 ++++++++++++------- settings.gradle.kts | 7 ++-- 20 files changed, 108 insertions(+), 65 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d2b31569..c8f6e0fe 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ -