Finish v1.30.13(331)
This commit is contained in:
commit
0c46fb09c1
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 330
|
def appVersionCode = 331
|
||||||
def appVersionName = '1.30.12'
|
def appVersionName = '1.30.13'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package it.integry.integrywmsnative.core.rest;
|
package it.integry.integrywmsnative.core.rest;
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
||||||
@ -59,20 +61,14 @@ public class RESTBuilder {
|
|||||||
|
|
||||||
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
||||||
|
|
||||||
Gson gson = new GsonBuilder()
|
|
||||||
.setDateFormat("dd/MM/yyyy HH:mm:ss")
|
|
||||||
.registerTypeAdapter(LocalDate.class, new LocalDateDeserializer())
|
|
||||||
.registerTypeAdapter(LocalDate.class, new LocalDateSerializer())
|
|
||||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeDeserializer())
|
|
||||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeSerializer())
|
|
||||||
.excludeFieldsWithModifiers(Modifier.TRANSIENT)
|
|
||||||
.create();
|
|
||||||
|
|
||||||
Retrofit retrofit = new Retrofit.Builder()
|
GsonBuilder builder = new GsonBuilder().setDateFormat("dd/MM/yyyy HH:mm:ss").excludeFieldsWithModifiers(Modifier.TRANSIENT);
|
||||||
.addConverterFactory(GsonConverterFactory.create(gson))
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
.baseUrl(endpoint)
|
builder.registerTypeAdapter(LocalDate.class, new LocalDateDeserializer()).registerTypeAdapter(LocalDate.class, new LocalDateSerializer()).registerTypeAdapter(LocalDateTime.class, new LocalDateTimeDeserializer()).registerTypeAdapter(LocalDateTime.class, new LocalDateTimeSerializer());
|
||||||
.client(client)
|
}
|
||||||
.build();
|
Gson gson = builder.create();
|
||||||
|
|
||||||
|
Retrofit retrofit = new Retrofit.Builder().addConverterFactory(GsonConverterFactory.create(gson)).baseUrl(endpoint).client(client).build();
|
||||||
|
|
||||||
return retrofit.create(service);
|
return retrofit.create(service);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user