Fix release build

This commit is contained in:
Nullptr 2022-02-20 16:14:30 +08:00
parent 187bd4c89d
commit a6f381920d
2 changed files with 8 additions and 21 deletions

View File

@ -1,3 +1,5 @@
import com.android.build.gradle.BaseExtension
val androidCompileSdkVersion: Int by rootProject.extra val androidCompileSdkVersion: Int by rootProject.extra
val androidMinSdkVersion: Int by rootProject.extra val androidMinSdkVersion: Int by rootProject.extra
val androidTargetSdkVersion: Int by rootProject.extra val androidTargetSdkVersion: Int by rootProject.extra
@ -32,6 +34,7 @@ android {
release { release {
isMinifyEnabled = true isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = projects.app.dependencyProject.extensions.getByName<BaseExtension>("android").buildTypes["release"].signingConfig
} }
} }

View File

@ -1,21 +1,5 @@
# Add project specific ProGuard rules here. -keep class com.beust.jcommander.** { *; }
# You can control the set of applied configuration files using the -keep class org.lsposed.lspatch.Patcher$Options { *; }
# proguardFiles setting in build.gradle. -keepclassmembers class org.lsposed.patch.LSPatch {
# private <fields>;
# For more details, see }
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile