From 97e592c732835ee06eb311f2b6f64f49899c2fef Mon Sep 17 00:00:00 2001 From: Ash Date: Tue, 29 Mar 2022 20:32:17 +0800 Subject: [PATCH] Change build configuration --- app/build.gradle | 4 ++++ app/proguard-rules.pro | 8 +++++++- gradle.properties | 27 ++++----------------------- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a59b3b9..24da39e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,6 +29,9 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + kotlinOptions { + freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn" + } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -50,6 +53,7 @@ android { } dependencies { + implementation "androidx.profileinstaller:profileinstaller:1.2.0-alpha02" implementation("io.coil-kt:coil-compose:2.0.0-rc02") implementation("androidx.compose.animation:animation-graphics:$compose_version") implementation("com.google.accompanist:accompanist-flowlayout:0.24.3-alpha") diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb43..175709e 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,10 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +-dontobfuscate + +# Disable ServiceLoader reproducibility-breaking optimizations +-keep class kotlinx.coroutines.CoroutineExceptionHandler +-keep class kotlinx.coroutines.internal.MainDispatcherFactory \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 3c7a8bd..29e09e0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,23 +1,4 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true +org.gradle.daemon=true +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -XX:+UseParallelGC +org.gradle.parallel=true +android.useAndroidX=true \ No newline at end of file