From b504ece109f6c0510d743cfe58a09a77b2673c3d Mon Sep 17 00:00:00 2001 From: zechs Date: Tue, 21 Jun 2022 12:53:52 +0530 Subject: [PATCH 1/3] Added proguard rules for `google.api.client` & Android `Log` --- app/build.gradle | 7 ++++++- app/proguard-rules.pro | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9d722e9..e43be42 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,22 +46,27 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt' ), 'proguard-rules.pro' + signingConfig signingConfigs.release } debug { signingConfig signingConfigs.debug } } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { jvmTarget = '1.8' } + buildFeatures { viewBinding true } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb43..e471aa1 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,18 @@ # 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 + +# To remove Log messages +-assumenosideeffects class android.util.Log { + public static *** d(...); + public static *** v(...); +} + +# keep data-classes from google.api +-keep class * extends com.google.api.client.json.GenericJson { + *; +} +-keep class com.google.api.services.drive.** { + *; +} \ No newline at end of file From 4a6423a200015fdfe859b1a74029b9baebc6cf44 Mon Sep 17 00:00:00 2001 From: zechs Date: Tue, 21 Jun 2022 12:55:05 +0530 Subject: [PATCH 2/3] enabled split apks for different `abi` - `x86`, `x86_64`, `armeabi-v7a`, `arm64-v8a` --- app/build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index e43be42..d226565 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,6 +58,15 @@ android { } } + splits { + abi { + enable true + reset() + include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' + universalApk true + } + } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 From 6e1f666b998b7cc00b0060625bd724b1b8c70e5d Mon Sep 17 00:00:00 2001 From: zechs Date: Tue, 21 Jun 2022 12:56:05 +0530 Subject: [PATCH 3/3] selective exoplayer modules --- app/build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index d226565..2fb6208 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -85,7 +85,10 @@ dependencies { implementation fileTree(dir: "libs", include: ["extension-*.aar"]) // Exoplayer - implementation "com.google.android.exoplayer:exoplayer:2.18.0" + def exoplayer_version = "2.18.0" + implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version" + implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version" + implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayer_version" // Datastore implementation "androidx.datastore:datastore-preferences:1.0.0"