-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize and fix android dependencies #299
Merged
martinbonnin
merged 20 commits into
paug:main
from
cbeyls:chore/optimize_android_dependencies
Apr 27, 2024
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d0daff1
upgrade libraries and remove unused ones
cbeyls a74275a
- remove AppCompat and Material Components.
cbeyls 94fe595
- remove Firebase in-app messaging which depends on Glide an AppCompat
cbeyls 7ba8a1a
remove unused Coil image loader
cbeyls eeca7f8
remove transitive dependencies to AppCompat for Precompose, Moko and …
cbeyls cff1bc7
add missing core library desugaring for the Android app (to properly …
cbeyls 8941b06
replace default Proguard rules with more optimized ones (enabling R8 …
cbeyls 8535380
disable Kotlin assertions for release builds and remove unnecessary p…
cbeyls 42a098c
disable Android DI debug logging from release builds
cbeyls 4e1d205
remove AppCompat version
cbeyls 5d2e9b1
remove unused compose-material library (only compose-material3 is used)
cbeyls 918f084
remove unused Kotlin Serialization plugin
cbeyls 14293d9
align all compose versions together to ensure the best compatibility …
cbeyls 6ff9939
remove unused navigation-compose library from the Android app
cbeyls 88b55c8
fix Compose dependencies of the Wear app
cbeyls f41773c
fix Apollo version and downgrade to 4.0.0-beta.2 which doesn't depend…
cbeyls b80f549
disable support vector drawables for Wear because minSDK is >24
cbeyls 5ac1bb5
add missing Proguard defaults for Wear
cbeyls ddf6efc
exclude unused packaged files an jni libs, and update compiler argume…
cbeyls d2e6c8b
switch to horologist 0.5.25 which is the version designed for Wear Co…
cbeyls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to use proguard-android-optimized here to benefit from default rules with all possible optimizations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rules are better but still way too conservative in my opinion, and they haven't been updated for ages. I can give you a detailed explanation later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am aware that they are outdated. My thought was it might be still safer for a small project.
I totally agree that adding rules based on your project is better.