mirror of
https://github.com/rumboalla/apkupdater.git
synced 2025-08-06 13:50:58 +08:00
Support for signed and minified builds
This commit is contained in:
@ -17,9 +17,32 @@ android {
|
||||
vectorDrawables { useSupportLibrary true }
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
try {
|
||||
Properties props = new Properties()
|
||||
props.load(new FileInputStream(file("../local.properties")))
|
||||
storeFile file(props['keystore.file'])
|
||||
storePassword props['keystore.password']
|
||||
keyAlias props['keystore.keyalias']
|
||||
keyPassword props['keystore.keypassword']
|
||||
} catch (ignored) {
|
||||
storeFile signingConfigs.debug.storeFile
|
||||
storePassword signingConfigs.debug.storePassword
|
||||
keyAlias signingConfigs.debug.keyAlias
|
||||
keyPassword signingConfigs.debug.keyPassword
|
||||
println "Signing config not found. Using debug settings."
|
||||
}
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
enableV3Signing true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.release
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
@ -48,7 +71,6 @@ dependencies {
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-compose:2.6.1'
|
||||
implementation 'androidx.compose.ui:ui:1.4.3'
|
||||
implementation "androidx.tv:tv-foundation:1.0.0-alpha08"
|
||||
// implementation "androidx.tv:tv-material:1.0.0-alpha08"
|
||||
implementation 'androidx.compose.material3:material3:1.1.1'
|
||||
implementation 'androidx.work:work-runtime-ktx:2.8.1'
|
||||
implementation 'io.insert-koin:koin-android:3.4.2'
|
||||
@ -56,7 +78,7 @@ dependencies {
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0'
|
||||
implementation 'com.google.code.gson:gson:2.9.0'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'io.coil-kt:coil-compose:2.4.0'
|
||||
implementation 'com.github.rumboalla.KryptoPrefs:kryptoprefs:0.4.3'
|
||||
implementation 'com.github.rumboalla.KryptoPrefs:kryptoprefs-gson:0.4.3'
|
||||
|
21
app/proguard-rules.pro
vendored
21
app/proguard-rules.pro
vendored
@ -1,14 +1,19 @@
|
||||
-keepattributes Signature
|
||||
|
||||
# Gson
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
-keepclassmembers,allowobfuscation class * { @com.google.gson.annotations.SerializedName <fields>; }
|
||||
-keep class com.google.gson.reflect.TypeToken { *; }
|
||||
-keep class * extends com.google.gson.reflect.TypeToken
|
||||
|
||||
# OkHttp
|
||||
-keep,allowobfuscation,allowshrinking class okhttp3.RequestBody
|
||||
-keep,allowobfuscation,allowshrinking class okhttp3.ResponseBody
|
||||
|
||||
#Retrofit
|
||||
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
|
||||
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
|
||||
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
||||
-if interface * { @retrofit2.http.* public *** *(...); }
|
||||
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
|
||||
|
||||
# Models
|
||||
-keep class com.apkupdater.data.** { *; }
|
||||
|
||||
# OkHttp
|
||||
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
||||
|
||||
# Jsoup
|
||||
-keepnames class org.jsoup.nodes.Entities
|
@ -3,4 +3,5 @@ android.useAndroidX=true
|
||||
kotlin.code.style=official
|
||||
android.nonTransitiveRClass=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonFinalResIds=false
|
||||
android.nonFinalResIds=false
|
||||
android.suppressUnsupportedCompileSdk=34
|
||||
|
Reference in New Issue
Block a user