Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Proguard adjustments #1174

Merged
merged 1 commit into from
Sep 17, 2019
Merged

Proguard adjustments #1174

merged 1 commit into from
Sep 17, 2019

Conversation

langsmith
Copy link
Contributor

I'm still trying get CircleCI to release the demo app to the Play Store. The current blocker seems to be the amount/type of Proguard messages, which then make the release process run out of memory. This pr adjusts the rules to cut down on the number of Proguard messages that are coming in.

@@ -121,13 +121,17 @@
-keep class android.arch.lifecycle.** { *; }
-keep class com.mapbox.android.core.location.** { *; }
-keep class com.mapbox.mapboxsdk.** { *; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary because we're using the @Keep annotation in the Maps SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -121,13 +121,17 @@
-keep class android.arch.lifecycle.** { *; }
-keep class com.mapbox.android.core.location.** { *; }
-keep class com.mapbox.mapboxsdk.** { *; }
-keep class com.mapbox.android.gestures.** { *; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary, there's no reflection/native code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand, all of those notes state that the class names are obfuscated and code would be inaccessible from another project. This, however, shouldn't cause any issue for the demo app and since the demo app is not consumed by any other project. The -dontnote entry for all of those notes should be enough.

@@ -121,13 +121,17 @@
-keep class android.arch.lifecycle.** { *; }
-keep class com.mapbox.android.core.location.** { *; }
-keep class com.mapbox.mapboxsdk.** { *; }
-keep class com.mapbox.android.gestures.** { *; }
-keep class com.mapbox.mapboxsdk.plugins.** { *; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary, there's no reflection/native code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2019-08-27 at 11 06 53 AM
Screen Shot 2019-08-27 at 11 06 58 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@@ -121,13 +121,17 @@
-keep class android.arch.lifecycle.** { *; }
-keep class com.mapbox.android.core.location.** { *; }
-keep class com.mapbox.mapboxsdk.** { *; }
-keep class com.mapbox.android.gestures.** { *; }
-keep class com.mapbox.mapboxsdk.plugins.** { *; }
-dontnote com.mapbox.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the notes?

@langsmith
Copy link
Contributor Author

Changes here look ok, @LukasPaczos ?

-keep class android.arch.lifecycle.** { *; }
-keep class com.mapbox.android.core.location.** { *; }
-keep class com.mapbox.mapboxsdk.** { *; }
-dontnote class com.mapbox.android.telemetry.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason to keep this and below classes before? Is it not needed anymore? What are the notes produced in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the notes produced in this case?

See the screenshots above.

What was the reason to keep this and below classes before? Is it not needed anymore?

Was keeping them to cut down on Proguard messages, but the ones in the screenshots above were new. Based on #1174 (comment), sounded like switching things to dontnote was the remedy.

If you had to address the lines seen in say, https://user-images.githubusercontent.com/4394910/63796375-cd93d280-c8ba-11e9-9617-11c7b9c45fe4.png, what would you do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with dontnote for gestures, plugins and maps. However, there's nothing about telemetry, location or lifecycle in those screenshots.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I see. Well I suspect they were there from past Proguard issues. You good with keeping -keep next to them and only doing dontnote for gestures, plugins, and maps?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can keep them unchanged and tackle in a separate PR if they are actually obsolete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, adjusted them and re-based. Take a look when you get a chance 🙇

@langsmith langsmith force-pushed the ls-proguard-adjustments branch from 11cff97 to 09b7f6b Compare September 17, 2019 14:45
@langsmith langsmith merged commit 3040849 into master Sep 17, 2019
@langsmith langsmith deleted the ls-proguard-adjustments branch September 17, 2019 14:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants