Skip to content

Commit

Permalink
Paywalls: Fix proguard rules kotlinx serialization (#1356)
Browse files Browse the repository at this point in the history
### Description
After adding kotlin serialization in the paywalls branch, looks like the
integration tests started failing to compile with the error:
```
R8: Missing class java.lang.ClassValue (referenced from: void kotlinx.serialization.internal.ClassValueCache$initClassValue$1.<init>(kotlinx.serialization.internal.ClassValueCache) and 3 other contexts)
```
In order to fix this issue, we are adding a `dontwarn` instruction to
the proguard rules of the library temporarily so it can compile.

After investigating why this is needed, I noticed
https://github.com/Kotlin/kotlinx.serialization/blob/ba38b7099e502c16efd30386d18174e3a7aefb3a/rules/common.pro#L32
and Kotlin/kotlinx.serialization#2119. But I
believe this shouldn't be needed from those comments... However, I
believe it should be safe to add it temporarily.
  • Loading branch information
tonidero committed Oct 31, 2023
1 parent 12934f7 commit 664bc26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions purchases/consumer-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
-dontwarn com.google.errorprone.annotations.Immutable
-dontwarn com.amazon.**
# Adding temporarily to fix issue after adding kotlin serialization
-dontwarn java.lang.ClassValue

0 comments on commit 664bc26

Please sign in to comment.