From 4588b7eaa58e94bfa30bc1e6b8a5fea0f5c3b4e1 Mon Sep 17 00:00:00 2001 From: FooIbar <118464521+FooIbar@users.noreply.github.com> Date: Sat, 19 Oct 2024 15:02:48 +0800 Subject: [PATCH] Refine resources packing options --- app/build.gradle.kts | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1496726f0..5f2b72009 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -137,10 +137,16 @@ android { useLegacyPackaging = false } resources { + // Required by Layout Inspector + pickFirsts += "/META-INF/androidx.compose.ui_ui.version" + excludes += listOf( - "META-INF/DEPENDENCIES", - "com", // Compose Destination - "org", // Apache 5 HC version info + "/META-INF/**", + "/kotlin/**", + "**.txt", + "**.bin", + "**.{html,mmd}", // Compose Destination + "**.properties", // Apache 5 HC version info ) } } @@ -178,17 +184,6 @@ composeCompiler { featureFlags = setOf(ComposeFeatureFlag.OptimizeNonSkippingGroups) } -androidComponents { - onVariants(selector().withBuildType("release")) { - it.packaging.resources.excludes.addAll( - "/META-INF/**", - "/kotlin/**", - "**.txt", - "**.bin", - ) - } -} - baselineProfile { mergeIntoMain = true }