forked from avluis/Hentoid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proguard/moshi fixes done while releasing 1.9.1
- Loading branch information
1 parent
dc68e49
commit 42d89fe
Showing
6 changed files
with
65 additions
and
85 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# JSR 305 annotations are for embedding nullability information. | ||
-dontwarn javax.annotation.** | ||
|
||
-keepclasseswithmembers class * { | ||
@com.squareup.moshi.* <methods>; | ||
} | ||
|
||
-keep @com.squareup.moshi.JsonQualifier interface * | ||
|
||
# Enum field names are used by the integrated EnumJsonAdapter. | ||
# Annotate enums with @JsonClass(generateAdapter = false) to use them with Moshi. | ||
-keepclassmembers @com.squareup.moshi.JsonClass class * extends java.lang.Enum { | ||
<fields>; | ||
} | ||
|
||
# The name of @JsonClass types is used to look up the generated adapter. | ||
-keepnames @com.squareup.moshi.JsonClass class * | ||
|
||
# Retain generated target class's synthetic defaults constructor and keep DefaultConstructorMarker's | ||
# name. We will look this up reflectively to invoke the type's constructor. | ||
# | ||
# We can't _just_ keep the defaults constructor because Proguard/R8's spec doesn't allow wildcard | ||
# matching preceding parameters. | ||
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker | ||
-keepclassmembers @com.squareup.moshi.JsonClass @kotlin.Metadata class * { | ||
synthetic <init>(...); | ||
} | ||
|
||
# Retain generated JsonAdapters if annotated type is retained. | ||
-if @com.squareup.moshi.JsonClass class * | ||
-keep class <1>JsonAdapter { | ||
<init>(...); | ||
<fields>; | ||
} | ||
-if @com.squareup.moshi.JsonClass class **$* | ||
-keep class <1>_<2>JsonAdapter { | ||
<init>(...); | ||
<fields>; | ||
} | ||
-if @com.squareup.moshi.JsonClass class **$*$* | ||
-keep class <1>_<2>_<3>JsonAdapter { | ||
<init>(...); | ||
<fields>; | ||
} | ||
-if @com.squareup.moshi.JsonClass class **$*$*$* | ||
-keep class <1>_<2>_<3>_<4>JsonAdapter { | ||
<init>(...); | ||
<fields>; | ||
} | ||
-if @com.squareup.moshi.JsonClass class **$*$*$*$* | ||
-keep class <1>_<2>_<3>_<4>_<5>JsonAdapter { | ||
<init>(...); | ||
<fields>; | ||
} | ||
-if @com.squareup.moshi.JsonClass class **$*$*$*$*$* | ||
-keep class <1>_<2>_<3>_<4>_<5>_<6>JsonAdapter { | ||
<init>(...); | ||
<fields>; | ||
} |
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