Finish v1.30.14(332)
This commit is contained in:
commit
9e87130d6c
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 331
|
||||
def appVersionName = '1.30.13'
|
||||
def appVersionCode = 332
|
||||
def appVersionName = '1.30.14'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@ -41,6 +41,7 @@ android {
|
||||
versionName appVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
signingConfig signingConfigs.release
|
||||
multiDexEnabled true
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
@ -66,7 +67,7 @@ android {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
//coreLibraryDesugaringEnabled true
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
@ -115,7 +116,7 @@ dependencies {
|
||||
implementation 'com.google.android.gms:play-services-basement:18.1.0'
|
||||
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.6.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
@ -188,7 +189,7 @@ dependencies {
|
||||
// RxJava is also required.
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.2'
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package it.integry.integrywmsnative.core.rest;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
|
||||
@ -62,11 +60,14 @@ public class RESTBuilder {
|
||||
String endpoint = "http://" + host + ":" + port + "/" + (addEmsApi ? "ems-api/" : "");
|
||||
|
||||
|
||||
GsonBuilder builder = new GsonBuilder().setDateFormat("dd/MM/yyyy HH:mm:ss").excludeFieldsWithModifiers(Modifier.TRANSIENT);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
builder.registerTypeAdapter(LocalDate.class, new LocalDateDeserializer()).registerTypeAdapter(LocalDate.class, new LocalDateSerializer()).registerTypeAdapter(LocalDateTime.class, new LocalDateTimeDeserializer()).registerTypeAdapter(LocalDateTime.class, new LocalDateTimeSerializer());
|
||||
}
|
||||
Gson gson = builder.create();
|
||||
Gson gson = new GsonBuilder()
|
||||
.setDateFormat("dd/MM/yyyy HH:mm:ss")
|
||||
.excludeFieldsWithModifiers(Modifier.TRANSIENT)
|
||||
.registerTypeAdapter(LocalDate.class, new LocalDateDeserializer())
|
||||
.registerTypeAdapter(LocalDate.class, new LocalDateSerializer())
|
||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeDeserializer())
|
||||
.registerTypeAdapter(LocalDateTime.class, new LocalDateTimeSerializer())
|
||||
.create();
|
||||
|
||||
Retrofit retrofit = new Retrofit.Builder().addConverterFactory(GsonConverterFactory.create(gson)).baseUrl(endpoint).client(client).build();
|
||||
|
||||
|
||||
@ -103,8 +103,7 @@ public class UtilityDate {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||
//sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
return sdf.format(dateToFormat);
|
||||
}
|
||||
else return null;
|
||||
} else return null;
|
||||
}
|
||||
|
||||
|
||||
@ -131,8 +130,6 @@ public class UtilityDate {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static String formatDate(LocalDate dateToFormat, String format) {
|
||||
if (dateToFormat != null) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
|
||||
@ -185,7 +182,6 @@ public class UtilityDate {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static LocalDate getNow() {
|
||||
return Instant.now()
|
||||
.atZone(currentZone)
|
||||
@ -197,6 +193,7 @@ public class UtilityDate {
|
||||
.atZone(currentZone)
|
||||
.toLocalDateTime();
|
||||
}
|
||||
|
||||
public static LocalDate timeToLocalDate(long time, @Nullable String timezone) {
|
||||
return Instant.ofEpochSecond(time)
|
||||
.atZone(timezone == null ? currentZone : ZoneId.of(timezone))
|
||||
@ -210,7 +207,6 @@ public class UtilityDate {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static long localDateTimeToTime(LocalDateTime localDateTime, @Nullable String timezone) {
|
||||
return localDateTime
|
||||
.atZone(timezone == null ? currentZone : ZoneId.of(timezone))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user