From 0dfbb152b394c48de959b579d050e88513fd7182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Sun, 9 Oct 2016 16:48:38 +0200 Subject: [PATCH] Probably now it works. --- app/proguard-rules.pro | 3 ++- googleutils/proguard-rules.pro | 18 +++++++++++++++++- .../googleutils/dto/GooglePlaceGeometry.java | 4 ++++ .../googleutils/dto/GooglePlacePhoto.java | 2 ++ .../googleutils/dto/GooglePlaceResponse.java | 2 ++ .../googleutils/dto/GooglePlaceResult.java | 10 ++++++++++ 6 files changed, 37 insertions(+), 2 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 3568e56..1c4435f 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -91,4 +91,5 @@ -keep class java.nio.file.** { *; } -keep class retrofit2.** { *; } --keep class okio.** { *; } \ No newline at end of file +-keep class okio.** { *; } +-keepclasseswithmembernames class pl.tpolgrabia.urbanexplorer.dto.** { *; } \ No newline at end of file diff --git a/googleutils/proguard-rules.pro b/googleutils/proguard-rules.pro index a9aaa24..85a3716 100644 --- a/googleutils/proguard-rules.pro +++ b/googleutils/proguard-rules.pro @@ -66,4 +66,20 @@ -keep class java.nio.file.** { *; } -keep class retrofit2.** { *; } --keep class okio.** { *; } \ No newline at end of file +-keep class okio.** { *; } + +-keepclasseswithmembernames class pl.tpolgrabia.urbanexplorer.dto.** { *; } + +## New rules for EventBus 3.0.x ## +# http://greenrobot.org/eventbus/documentation/proguard/ + +-keepattributes *Annotation* +-keepclassmembers class ** { + @org.greenrobot.eventbus.Subscribe ; +} +-keep enum org.greenrobot.eventbus.ThreadMode { *; } + +# Only required if you use AsyncExecutor +-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { + (java.lang.Throwable); +} \ No newline at end of file diff --git a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceGeometry.java b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceGeometry.java index 080d156..6d1016a 100644 --- a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceGeometry.java +++ b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceGeometry.java @@ -1,10 +1,14 @@ package pl.tpolgrabia.googleutils.dto; +import com.google.gson.annotations.SerializedName; + /** * Created by tpolgrabia on 28.09.16. */ public class GooglePlaceGeometry { + @SerializedName("location") private GooglePlaceLocation location; + @SerializedName("viewport") private GooglePlaceViewport viewport; public GooglePlaceLocation getLocation() { diff --git a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlacePhoto.java b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlacePhoto.java index 1d2e5cb..427a57d 100644 --- a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlacePhoto.java +++ b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlacePhoto.java @@ -8,11 +8,13 @@ import java.util.List; * Created by tpolgrabia on 28.09.16. */ public class GooglePlacePhoto { + @SerializedName("height") private Long height; @SerializedName("html_attributions") private List htmlAttributions; @SerializedName("photo_reference") private String photoReference; + @SerializedName("width") private Long width; public Long getHeight() { diff --git a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResponse.java b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResponse.java index 2fddf1e..0ebbf7f 100644 --- a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResponse.java +++ b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResponse.java @@ -12,7 +12,9 @@ public class GooglePlaceResponse { private List htmlAttributions; @SerializedName("next_page_token") private String nextPageToken; + @SerializedName("results") private List results; + @SerializedName("status") private String status; public List getHtmlAttributions() { diff --git a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResult.java b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResult.java index 1c42314..c6cc3fa 100644 --- a/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResult.java +++ b/googleutils/src/main/java/pl/tpolgrabia/googleutils/dto/GooglePlaceResult.java @@ -8,17 +8,27 @@ import java.util.List; * Created by tpolgrabia on 28.09.16. */ public class GooglePlaceResult { + @SerializedName("geometry") private GooglePlaceGeometry geometry; + @SerializedName("icon") private String icon; + @SerializedName("id") private String id; + @SerializedName("name") private String name; + @SerializedName("photos") private List photos; @SerializedName("place_id") private String placeId; + @SerializedName("rating") private Double rating; + @SerializedName("reference") private String reference; + @SerializedName("scope") private String scope; + @SerializedName("types") private List types; + @SerializedName("vicinity") private String vicinity; public GooglePlaceGeometry getGeometry() {