build: proguard rules

- minify release build
- upgrade compose
This commit is contained in:
rhunk
2023-08-04 13:18:45 +02:00
parent 910cbd0bba
commit 9aef7a1b86
5 changed files with 28 additions and 18 deletions

View File

@@ -28,31 +28,42 @@ android {
buildTypes {
release {
isMinifyEnabled = true
proguardFiles += file("proguard-rules.pro")
}
debug {
isDebuggable = true
isMinifyEnabled = false
isShrinkResources = false
}
}
flavorDimensions += "abi"
//noinspection ChromeOsAbiSupport
productFlavors {
packaging {
jniLibs {
excludes += "**/*_neon.so"
}
resources {
excludes += "DebugProbesKt.bin"
excludes += "okhttp3/internal/publicsuffix/**"
excludes += "META-INF/*.version"
excludes += "META-INF/services/**"
excludes += "META-INF/*.kotlin_builtins"
excludes += "META-INF/*.kotlin_module"
}
}
create("armv8") {
ndk {
abiFilters.add("arm64-v8a")
abiFilters += "arm64-v8a"
}
dimension = "abi"
}
create("armv7") {
ndk {
abiFilters.add("armeabi-v7a")
}
packaging {
jniLibs {
excludes += "**/*_neon.so"
}
abiFilters += "armeabi-v7a"
}
dimension = "abi"
}
@@ -89,7 +100,7 @@ dependencies {
implementation(libs.gson)
debugImplementation("androidx.compose.ui:ui-tooling:1.4.3")
debugImplementation("androidx.compose.ui:ui-tooling-preview:1.4.3")
implementation("androidx.compose.ui:ui-tooling-preview:1.4.3")
implementation(kotlin("reflect"))
}

2
app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,2 @@
-dontwarn de.robv.android.xposed.**
-keep class me.rhunk.** { *; }

View File

@@ -28,11 +28,7 @@ class MainActivity : ComponentActivity() {
}
sections = EnumSection.values().toList().associateWith {
runCatching {
it.section.constructors.first().call()
}.onFailure {
it.printStackTrace()
}.getOrThrow()
it.section.constructors.first().call()
}.onEach { (section, instance) ->
with(instance) {
enumSection = section

View File

@@ -2,10 +2,11 @@ package me.rhunk.snapenhance.ui.manager.sections.download
import androidx.compose.runtime.Composable
import me.rhunk.snapenhance.ui.manager.Section
import me.rhunk.snapenhance.ui.manager.sections.NotImplemented
class DownloadSection : Section() {
@Composable
override fun Content() {
NotImplemented()
}
}

View File

@@ -6,7 +6,7 @@ kotlin = "1.8.22"
kotlinx-coroutines-android = "1.7.2"
kotlin-reflect = "1.8.22"
material-icons-extended = "1.6.0-alpha03"
navigation-compose = "2.6.0"
navigation-compose = "2.7.0-rc01"
recyclerview = "1.3.1"
gson = "2.10.1"
ffmpeg-kit = "5.1.LTS"