Skip to content

Commit

Permalink
Fix proguard for gson. Fix multireddit's info cannot be updated in mi…
Browse files Browse the repository at this point in the history
…nifiedRelease. Version 4.0.7.
  • Loading branch information
Docile-Alligator committed Sep 1, 2020
1 parent ff49660 commit 7911f4f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "ml.docilealligator.infinityforreddit"
minSdkVersion 21
targetSdkVersion 29
versionCode 42
versionName "4.0.6"
versionCode 43
versionName "4.0.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
Expand Down
2 changes: 2 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@

# Application classes that will be serialized/deserialized over Gson
-keep class ml.docilealligator.infinityforreddit.CustomTheme.CustomTheme { <fields>; }
-keep class ml.docilealligator.infinityforreddit.MultiReddit.MultiRedditJSONModel { <fields>; }
-keep class ml.docilealligator.infinityforreddit.MultiReddit.SubredditInMultiReddit { <fields>; }

# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,4 @@ public String createJSONModel() {
Gson gson = new Gson();
return gson.toJson(this);
}

class SubredditInMultiReddit {
String name;

SubredditInMultiReddit() {}

SubredditInMultiReddit(String subredditName) {
name = subredditName;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package ml.docilealligator.infinityforreddit.MultiReddit;

public class SubredditInMultiReddit {
String name;

SubredditInMultiReddit() {}

SubredditInMultiReddit(String subredditName) {
name = subredditName;
}
}

0 comments on commit 7911f4f

Please sign in to comment.