Repository navigation
MOBILE-582: Fix R8 Rules #804
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
Open
enotniy
wants to merge
1
commit into
develop
Choose a base branch
from
feature/MOBILE-582
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+78
−6
Open
Changes from all commits
Commits
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 hidden or 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 hidden or 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,29 @@ | ||
| -keepattributes *Annotation* | ||
| -keepattributes Exceptions | ||
| -keepattributes InnerClasses | ||
| -keepattributes InnerClasses,EnclosingMethod | ||
| -keepattributes Signature | ||
| -keepattributes SourceFile,LineNumberTable | ||
| -keep class com.huawei.hianalytics.**{*;} | ||
| -keep class com.huawei.updatesdk.**{*;} | ||
| -keep class com.huawei.hms.**{*;} | ||
| -keep class com.huawei.hms.ads.** { *; } | ||
| -keep interface com.huawei.hms.ads.** { *; } | ||
| -keep class cloud.mindbox.mindbox_huawei.MindboxHuawei { *; } | ||
| -keep class cloud.mindbox.mindbox_huawei.MindboxHuawei { *; } | ||
|
|
||
| -dontwarn android.telephony.HwTelephonyManager | ||
| -dontwarn com.huawei.android.os.BuildEx$VERSION | ||
| -dontwarn com.huawei.hianalytics.process.HiAnalyticsConfig$Builder | ||
| -dontwarn com.huawei.hianalytics.process.HiAnalyticsConfig | ||
| -dontwarn com.huawei.hianalytics.process.HiAnalyticsInstance$Builder | ||
| -dontwarn com.huawei.hianalytics.process.HiAnalyticsInstance | ||
| -dontwarn com.huawei.hianalytics.process.HiAnalyticsManager | ||
| -dontwarn com.huawei.hianalytics.util.HiAnalyticTools | ||
| -dontwarn com.huawei.hms.availableupdate.UpdateAdapterMgr | ||
| -dontwarn com.huawei.libcore.io.ExternalStorageFile | ||
| -dontwarn com.huawei.libcore.io.ExternalStorageFileInputStream | ||
| -dontwarn com.huawei.libcore.io.ExternalStorageFileOutputStream | ||
| -dontwarn com.huawei.libcore.io.ExternalStorageRandomAccessFile | ||
| -dontwarn org.bouncycastle.crypto.BlockCipher | ||
| -dontwarn org.bouncycastle.crypto.engines.AESEngine | ||
| -dontwarn org.bouncycastle.crypto.prng.SP800SecureRandom | ||
| -dontwarn org.bouncycastle.crypto.prng.SP800SecureRandomBuilder |
This file contains hidden or 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,6 +1,15 @@ | ||
| # Keep model classes | ||
| -keepclassmembers class cloud.mindbox.mobile_sdk.models** { *; } | ||
| -keep class cloud.mindbox.mobile_sdk.MindboxConfiguration { *; } | ||
| -keep class cloud.mindbox.mobile_sdk.pushes.PushAction { *; } | ||
| -keepclassmembers class cloud.mindbox.mobile_sdk.inapp.data.dto.** { *; } | ||
| -keep class cloud.mindbox.mobile_sdk.inapp.domain.models** { *; } | ||
|
|
||
| -keepclasseswithmembers,allowobfuscation class cloud.mindbox.** { | ||
| @com.google.gson.annotations.SerializedName <fields>; | ||
| <init>(...); | ||
| } | ||
|
|
||
| -keepclassmembers class cloud.mindbox.** { | ||
| <init>(...); | ||
| <fields>; | ||
| } | ||
|
Comment on lines
+12
to
+15
|
||
This file contains hidden or 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
4 changes: 4 additions & 0 deletions
4
sdk/src/main/java/cloud/mindbox/mobile_sdk/pushes/handler/MessageHandlingState.kt
This file contains hidden or 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,16 @@ | ||
| package cloud.mindbox.mobile_sdk.pushes.handler | ||
|
|
||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| /** | ||
| * Current conditions under which the image is loaded | ||
| * | ||
| * @param attemptNumber The current number of attempts to correctly process the notification | ||
| * @param isMessageDisplayed The message has been shown | ||
| */ | ||
| public data class MessageHandlingState( | ||
| @SerializedName("attemptNumber") | ||
| val attemptNumber: Int, | ||
| @SerializedName("isMessageDisplayed") | ||
| val isMessageDisplayed: Boolean, | ||
| ) |
36 changes: 36 additions & 0 deletions
36
sdk/src/test/java/cloud/mindbox/mobile_sdk/converters/MindboxRoomConverterTest.kt
This file contains hidden or 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,36 @@ | ||
| package cloud.mindbox.mobile_sdk.converters | ||
|
|
||
| import cloud.mindbox.mobile_sdk.models.EventType | ||
| import org.junit.Assert.assertEquals | ||
| import org.junit.Test | ||
|
|
||
| // Events queued by earlier SDK versions sit in the database in this format and must still be readable. | ||
| class MindboxRoomConverterTest { | ||
|
|
||
| @Test | ||
| fun eventTypeToString_writesOrdinalAndJsonNames() { | ||
| val stored = MindboxRoomConverter.eventTypeToString(EventType.SyncOperation("Website.Operation")) | ||
|
|
||
| assertEquals("""6;{"operation":"Website.Operation","endpoint":"/v3/operations/sync"}""", stored) | ||
|
Comment on lines
+11
to
+14
|
||
| } | ||
|
|
||
| @Test | ||
| fun stringToEventType_readsStoredOperation() { | ||
| val eventType = MindboxRoomConverter.stringToEventType( | ||
| """5;{"operation":"Website.Operation","endpoint":"/v3/operations/async"}""" | ||
| ) | ||
|
|
||
| assertEquals(EventType.AsyncOperation::class, eventType::class) | ||
| assertEquals("Website.Operation", eventType.operation) | ||
| assertEquals("/v3/operations/async", eventType.endpoint) | ||
| } | ||
|
|
||
| @Test | ||
| fun stringToEventType_readsStoredDataObject() { | ||
| val eventType = MindboxRoomConverter.stringToEventType( | ||
| """0;{"operation":"MobilePush.ApplicationInstalled","endpoint":"/v3/operations/async"}""" | ||
| ) | ||
|
|
||
| assertEquals(EventType.AppInstalled, eventType) | ||
| } | ||
| } | ||
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.
А почему здесь сделал, а для firebase и rustore стартеров не стал?
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.
потому что там зависимости huawei нет