Aggiunte definizioni di @SerializedName per evitare minify di Proguard
This commit is contained in:
parent
00067ca1c9
commit
eead844ac1
@ -51,9 +51,12 @@ android {
|
||||
buildTypes {
|
||||
debug {
|
||||
ext.enableCrashlytics = false
|
||||
// minifyEnabled true // Abilita la minimizzazione del codice
|
||||
// shrinkResources true // Rimuove risorse non utilizzate
|
||||
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
release {
|
||||
minifyEnabled true // Abilita la minimizzazione del codice
|
||||
// minifyEnabled true // Abilita la minimizzazione del codice
|
||||
shrinkResources true // Rimuove risorse non utilizzate
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
17
app/proguard-rules.pro
vendored
17
app/proguard-rules.pro
vendored
@ -23,3 +23,20 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
|
||||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||
-keep class * extends com.google.gson.TypeAdapter
|
||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
-keep class * implements com.google.gson.JsonSerializer
|
||||
-keep class * implements com.google.gson.JsonDeserializer
|
||||
# Prevent R8 from leaving Data object members always null
|
||||
-keepclasseswithmembers class * {
|
||||
<init>(...);
|
||||
@com.google.gson.annotations.SerializedName <fields>;
|
||||
}
|
||||
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
||||
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
||||
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
||||
|
||||
-keep class it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
||||
-keep class * extends it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse { *; }
|
||||
@ -1,11 +1,17 @@
|
||||
package it.integry.integrywmsnative.gest.login.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class AuthTokenClaimsDTO {
|
||||
|
||||
@SerializedName("deviceId")
|
||||
private long deviceId;
|
||||
|
||||
@SerializedName("userDTO")
|
||||
private User userDTO;
|
||||
|
||||
@SerializedName("profilesData")
|
||||
private HashMap<String, AuthTokenProfileDetails> profilesData;
|
||||
|
||||
public long getDeviceId() {
|
||||
@ -36,11 +42,22 @@ public class AuthTokenClaimsDTO {
|
||||
}
|
||||
|
||||
public class User {
|
||||
@SerializedName("username")
|
||||
private String username;
|
||||
|
||||
@SerializedName("email")
|
||||
private Object email;
|
||||
|
||||
@SerializedName("fullname")
|
||||
private String fullname;
|
||||
|
||||
@SerializedName("keyGroup")
|
||||
private int keyGroup;
|
||||
|
||||
@SerializedName("attivo")
|
||||
private boolean attivo;
|
||||
|
||||
@SerializedName("type")
|
||||
private String type;
|
||||
|
||||
public String getUsername() {
|
||||
@ -99,6 +116,7 @@ public class AuthTokenClaimsDTO {
|
||||
}
|
||||
|
||||
public static class AuthTokenProfileDetails {
|
||||
@SerializedName("defaultDepo")
|
||||
private AuthTokenDepoDetails defaultDepo;
|
||||
|
||||
public AuthTokenDepoDetails getDefaultDepo() {
|
||||
@ -112,8 +130,13 @@ public class AuthTokenClaimsDTO {
|
||||
}
|
||||
|
||||
public static class AuthTokenDepoDetails {
|
||||
@SerializedName("codMdep")
|
||||
private String codMdep;
|
||||
|
||||
@SerializedName("descrizione")
|
||||
private String descrizione;
|
||||
|
||||
@SerializedName("codJfas")
|
||||
private String codJfas;
|
||||
|
||||
public String getCodMdep() {
|
||||
|
||||
@ -1,12 +1,20 @@
|
||||
package it.integry.integrywmsnative.gest.login.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class AuthenticationJwtResponseDTO {
|
||||
|
||||
@SerializedName("accessToken")
|
||||
private String accessToken;
|
||||
|
||||
@SerializedName("refreshToken")
|
||||
private String refreshToken;
|
||||
|
||||
@SerializedName("expiryDate")
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
@SerializedName("expireIn")
|
||||
private long expireIn;
|
||||
|
||||
|
||||
|
||||
@ -1,11 +1,22 @@
|
||||
package it.integry.integrywmsnative.gest.login.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LoginAziendaDTO {
|
||||
|
||||
@SerializedName("profileDb")
|
||||
private String profileDb;
|
||||
|
||||
@SerializedName("endpointRestApi")
|
||||
private String endpointRestApi;
|
||||
|
||||
@SerializedName("phpApi")
|
||||
private String phpApi;
|
||||
|
||||
@SerializedName("repoPhoto")
|
||||
private String repoPhoto;
|
||||
|
||||
@SerializedName("endpointPvm")
|
||||
private String endpointPvm;
|
||||
|
||||
public String getProfileDb() {
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
package it.integry.integrywmsnative.gest.login.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class LoginRequestDTO {
|
||||
|
||||
@SerializedName("username")
|
||||
private String username;
|
||||
|
||||
@SerializedName("password")
|
||||
private String password;
|
||||
|
||||
@SerializedName("deviceId")
|
||||
private String deviceId;
|
||||
|
||||
public String getUsername() {
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
package it.integry.integrywmsnative.gest.login.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
|
||||
public class LoginResponseDTO {
|
||||
|
||||
@SerializedName("fullName")
|
||||
private String fullName;
|
||||
private List<String> availableProfiles;
|
||||
|
||||
@SerializedName("availableProfiles")
|
||||
private List<String> availableProfiles;
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package it.integry.integrywmsnative.gest.login.dto;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class RefreshRequestDTO {
|
||||
@SerializedName("refreshToken")
|
||||
private String refreshToken;
|
||||
|
||||
public String getRefreshToken() {
|
||||
|
||||
@ -2,14 +2,23 @@ package it.integry.integrywmsnative.view.dialogs.tracciamento_imballi;
|
||||
|
||||
import androidx.databinding.ObservableBoolean;
|
||||
import androidx.databinding.ObservableField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class TracciamentoImballoDTO {
|
||||
|
||||
@SerializedName("codTcol")
|
||||
private final ObservableField<String> codTcol = new ObservableField<>();
|
||||
|
||||
@SerializedName("descrizione")
|
||||
private final ObservableField<String> descrizione = new ObservableField<>();
|
||||
|
||||
@SerializedName("codMart")
|
||||
private final ObservableField<String> codMart = new ObservableField<>();
|
||||
|
||||
@SerializedName("qta")
|
||||
private final ObservableField<Integer> qta = new ObservableField<>();
|
||||
|
||||
@SerializedName("editable")
|
||||
private final ObservableBoolean editable = new ObservableBoolean(true);
|
||||
|
||||
public ObservableField<String> getCodTcol() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user