From 8cfc90d67203a05933d7b5861a55ebb8cbd3ec4b Mon Sep 17 00:00:00 2001 From: Sungyong An Date: Sat, 9 Dec 2023 11:38:48 +0900 Subject: [PATCH] Fix R8 issues temporarily --- .github/workflows/build.yaml | 2 +- app/proguard-rules.pro | 3 --- .../src/main/kotlin/soup/movie/buildlogic/Kotlin.kt | 3 +++ gradle.properties | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d3cb8fdb5..69c4590fb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,4 +28,4 @@ jobs: java-version: 17 - name: Build, lint and spotless - run: ./gradlew spotlessCheck dependencyGuard assemble lintDebug --scan + run: ./gradlew spotlessCheck dependencyGuard lintDebug assemble --scan diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index a52599ad4..c8d09f9d3 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -39,9 +39,6 @@ -dontwarn org.jetbrains.annotations.** -keep class kotlin.Metadata { *; } -# For dynamic-features module --keep class soup.movie.theatermap.** { *; } - # For kotlinx.serialization -keepattributes *Annotation*, InnerClasses -dontnote kotlinx.serialization.SerializationKt diff --git a/build-logic/convention/src/main/kotlin/soup/movie/buildlogic/Kotlin.kt b/build-logic/convention/src/main/kotlin/soup/movie/buildlogic/Kotlin.kt index 513a05a73..b6e097e74 100644 --- a/build-logic/convention/src/main/kotlin/soup/movie/buildlogic/Kotlin.kt +++ b/build-logic/convention/src/main/kotlin/soup/movie/buildlogic/Kotlin.kt @@ -13,6 +13,9 @@ fun Project.configureKotlin() { freeCompilerArgs = freeCompilerArgs + listOf( "-opt-in=kotlin.RequiresOptIn", "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", + + // https://github.com/Kotlin/kotlinx.serialization/issues/2145#issuecomment-1653091753 + "-Xstring-concat=inline", ) } } diff --git a/gradle.properties b/gradle.properties index 4ba89be4b..d6c4a759b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,6 +28,11 @@ kapt.include.compile.classpath=false # Non-transitive R classes is recommended and is faster/smaller android.nonTransitiveRClass=true +# Default values changed on AGP 8.0 +# https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes#default-changes +android.nonFinalResIds=false +android.enableR8.fullMode=false + # Default build features android.defaults.buildfeatures.buildconfig=false android.defaults.buildfeatures.aidl=false