-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize and fix android dependencies (#299)
* upgrade libraries and remove unused ones * - remove AppCompat and Material Components. - set the Android theme colors to match the compose theme colors on app startup. * - remove Firebase in-app messaging which depends on Glide an AppCompat - remove Koin-Android dependency which is not needed when adding Koin-Androidx-Compose dependency. * remove unused Coil image loader * remove transitive dependencies to AppCompat for Precompose, Moko and Koin * add missing core library desugaring for the Android app (to properly support kotlinx.datetime on API < 26) * replace default Proguard rules with more optimized ones (enabling R8 optimizations) and remove unnecessary rules * disable Kotlin assertions for release builds and remove unnecessary packaged files * disable Android DI debug logging from release builds * remove AppCompat version * remove unused compose-material library (only compose-material3 is used) * remove unused Kotlin Serialization plugin * align all compose versions together to ensure the best compatibility with Compose Multiplatform 1.6.2 * remove unused navigation-compose library from the Android app * fix Compose dependencies of the Wear app * fix Apollo version and downgrade to 4.0.0-beta.2 which doesn't depend on Kotlin 2.0.0 (the project depends on Kotlin 1.9.23) * disable support vector drawables for Wear because minSDK is >24 * add missing Proguard defaults for Wear * exclude unused packaged files an jni libs, and update compiler arguments for Wear release builds * switch to horologist 0.5.25 which is the version designed for Wear Compose 1.3.x and Compose 1.6.4 currently used in the project
- Loading branch information
Showing
23 changed files
with
220 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Less conservative default ProGuard rules | ||
-allowaccessmodification | ||
|
||
-dontusemixedcaseclassnames | ||
-dontskipnonpubliclibraryclasses | ||
-verbose | ||
|
||
# Preserve some attributes that may be required for reflection. | ||
-keepattributes RuntimeVisible*Annotations, AnnotationDefault | ||
|
||
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native | ||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
|
||
-keepclassmembers,allowoptimization enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
-keepclassmembers class * implements android.os.Parcelable { | ||
public static final ** CREATOR; | ||
} | ||
|
||
# Preserve annotated Javascript interface methods. | ||
-keepclassmembers class * { | ||
@android.webkit.JavascriptInterface <methods>; | ||
} | ||
|
||
# The support libraries contains references to newer platform versions. | ||
# Don't warn about those in case this app is linking against an older | ||
# platform version. We know about them, and they are safe. | ||
-dontnote androidx.** | ||
-dontwarn androidx.** | ||
|
||
# This class is deprecated, but remains for backward compatibility. | ||
-dontwarn android.util.FloatMath | ||
|
||
# These classes are duplicated between android.jar and core-lambda-stubs.jar. | ||
-dontnote java.lang.invoke.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1 @@ | ||
# Glide | ||
-keep public class * implements com.bumptech.glide.module.GlideModule | ||
-keep public class * extends com.bumptech.glide.module.AppGlideModule | ||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** { | ||
**[] $VALUES; | ||
public *; | ||
} | ||
|
||
-dontwarn org.slf4j.** | ||
|
||
-keep class fr.androidmakers.store.model.** { *; } | ||
-keep class io.openfeedback.android.model.** { *; } | ||
|
||
-keepattributes Signature | ||
|
||
-dontwarn com.google.ar.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<style name="Theme.AndroidMakers" parent="Theme.AppCompat.DayNight.DarkActionBar"> | ||
<item name="colorPrimary">@color/colorPrimary</item> | ||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
<item name="colorAccent">@color/colorAccent</item> | ||
<style name="Theme.AndroidMakers" parent="android:Theme.Material.NoActionBar"> | ||
<item name="android:statusBarColor">@android:color/transparent</item> | ||
<item name="android:windowBackground">@color/backgroundDark</item> | ||
</style> | ||
|
||
<style name="Theme.AndroidMakers.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar"></style> | ||
</resources> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#4eb6e3</color> | ||
<color name="colorPrimaryDark">#16A6D9</color> | ||
<color name="colorAccent">#E85145</color> | ||
<color name="bottom">#ECEDEC</color> | ||
<color name="backgroundLight">#FFFBFCFE</color> | ||
<color name="backgroundDark">#FF191C1E</color> | ||
|
||
<color name="grey">#bbbbbb</color> | ||
<color name="light_grey">#F0F0F0</color> | ||
<color name="black">#000000</color> | ||
<color name="white">#FFFFFF</color> | ||
</resources> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<style name="Theme.AndroidMakers" parent="Theme.AppCompat.Light.DarkActionBar"> | ||
<item name="colorPrimary">@color/colorPrimary</item> | ||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
<item name="colorAccent">@color/colorAccent</item> | ||
<item name="android:windowBackground">@android:color/white</item> | ||
<style name="Theme.AndroidMakers" parent="android:Theme.Material.Light.NoActionBar"> | ||
<item name="android:statusBarColor">@android:color/transparent</item> | ||
<item name="android:windowBackground">@color/backgroundLight</item> | ||
</style> | ||
|
||
<style name="Theme.AndroidMakers.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar"> | ||
<item name="colorPrimaryDark">@color/colorPrimary</item> | ||
</style> | ||
</resources> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.