diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 2b8a50fc..9a55c2de 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 13b29042..ba8c4194 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,16 +3,18 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' +apply plugin: 'com.google.devtools.ksp' + android { - compileSdk 33 + compileSdk 33 //si 34 problemas con AAPT2 // buildToolsVersion "29.0.3" defaultConfig { applicationId "es.verdnatura" minSdkVersion 24 //21 - targetSdkVersion 33 + //targetSdkVersion 33 versionCode 254 versionName = "24.4Beta" //23.48Beta son la misma testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -29,7 +31,7 @@ android { } - flavorDimensions "version" + flavorDimensions( "version") productFlavors { create("beta") { applicationIdSuffix = ".sfusion" @@ -56,72 +58,51 @@ android { } - dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.9' - implementation 'com.google.firebase:firebase-analytics-ktx:20.1.2' - implementation 'com.google.android.gms:play-services-location:19.0.1' - kapt "androidx.room:room-compiler:2.5.1" - implementation 'androidx.room:room-ktx:2.5.1' + implementation 'com.google.firebase:firebase-crashlytics-ktx:18.6.1' + implementation 'com.google.firebase:firebase-analytics-ktx:21.5.0' + implementation 'com.google.android.gms:play-services-location:21.1.0' + kapt "androidx.room:room-compiler:2.5.1" // Problema de string dinámico + implementation 'androidx.room:room-ktx:2.5.1'//Problema de string dinámico debugImplementation fileTree(dir: 'libs/debug', include: ['*.jar']) releaseImplementation fileTree(dir: 'libs/release', include: ['*.jar']) //canvas implementation 'com.simplify:ink:1.0.0' - //navigation - implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5' - implementation 'androidx.navigation:navigation-ui-ktx:2.3.5' - implementation("androidx.drawerlayout:drawerlayout:1.1.1") - // Kotlin and Android implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.10.1' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.core:core-ktx:1.11.+' + implementation 'androidx.constraintlayout:constraintlayout:2.0'//si >2.0 revisar pantalla Ajustes implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation 'com.google.android.material:material:1.0.0' - implementation 'com.squareup.retrofit2:retrofit:2.0.2' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + implementation 'com.google.android.material:material:1.6.0'//hasta la 1.6 + implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.squareup.retrofit2:converter-gson:2.0.2' implementation 'com.squareup.retrofit2:converter-scalars:2.3.0' implementation "com.airbnb.android:lottie:$lottieVersion" - implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' - - //preferences - implementation 'androidx.preference:preference-ktx:1.1.1' + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' //Fragments - implementation("androidx.fragment:fragment-ktx:1.3.6") - + implementation("androidx.fragment:fragment-ktx:1.5.2") // Problema de inferir event // Architecture components implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle" - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle"//versión más nueva compileSdk 34 y no infiere el event implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle" - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - + implementation "androidx.legacy:legacy-support-v4:1.0.0" //Koin new resolve - //kotlin implementation in mavencentral--> jcenter deprecated - implementation "io.insert-koin:koin-core:$koin" implementation "io.insert-koin:koin-android:$koin" implementation "io.insert-koin:koin-androidx-scope:$koin" implementation "io.insert-koin:koin-androidx-viewmodel:$koin" - // Koin for DI - //implementation "org.koin:koin-core:$koin" - //implementation "org.koin:koin-android:$koin" - //implementation "org.koin:koin-androidx-scope:$koin" - //implementation "org.koin:koin-androidx-viewmodel:$koin" - - // Image libraries implementation "io.coil-kt:coil:$coil" implementation "com.github.bumptech.glide:glide:$glide" @@ -129,8 +110,7 @@ dependencies { kapt "com.github.bumptech.glide:compiler:$glide" // Add the Firebase Crashlytics SDK. - implementation 'com.google.firebase:firebase-analytics:17.5.0' - //implementation 'com.google.firebase:firebase-crashlytics:17.2.1' + implementation 'com.google.firebase:firebase-analytics:21.5.0' //search implementation 'com.github.mirrajabi:search-dialog:1.1' diff --git a/app/src/main/java/es/verdnatura/db/database.kt b/app/src/main/java/es/verdnatura/db/database.kt index 13155498..5de0a7be 100644 --- a/app/src/main/java/es/verdnatura/db/database.kt +++ b/app/src/main/java/es/verdnatura/db/database.kt @@ -17,7 +17,9 @@ import java.util.Date // Clase que representa la base de datos @Database( entities = [ExpeditionInfoLoadUnload::class, ExpeditionInfoPending::class, SignedTickets::class, RouteInfo::class, ClientTicketSalix::class, RouteLoaded::class], - version = 1 + version = 1, + exportSchema = false + ) @TypeConverters(MapTypeConverter::class) abstract class DeliveryDatabase : RoomDatabase() { diff --git a/app/src/main/java/es/verdnatura/presentation/common/NetworkUtils.kt b/app/src/main/java/es/verdnatura/presentation/common/NetworkUtilsApp.kt similarity index 91% rename from app/src/main/java/es/verdnatura/presentation/common/NetworkUtils.kt rename to app/src/main/java/es/verdnatura/presentation/common/NetworkUtilsApp.kt index 0e1fe1d2..bc41583d 100644 --- a/app/src/main/java/es/verdnatura/presentation/common/NetworkUtils.kt +++ b/app/src/main/java/es/verdnatura/presentation/common/NetworkUtilsApp.kt @@ -1,3 +1,5 @@ +package es.verdnatura.presentation.common + import android.content.Context import android.net.ConnectivityManager import android.net.Network @@ -7,7 +9,7 @@ import es.verdnatura.MobileApplication import es.verdnatura.R import es.verdnatura.presentation.view.feature.main.activity.MainActivity -class NetworkUtils(context: Context, applicationContext: MobileApplication) { +class NetworkUtilsApp(context: Context, applicationContext: MobileApplication) { private val connectivityManager: ConnectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt index 7f7a022f..fe619938 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt @@ -1,6 +1,5 @@ package es.verdnatura.presentation.view.feature.main.activity -import NetworkUtils import PhotosFragment import android.content.Intent import android.media.MediaPlayer @@ -13,7 +12,7 @@ import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.lifecycle.MutableLiveData -import com.google.android.material.bottomnavigation.LabelVisibilityMode.LABEL_VISIBILITY_UNLABELED +import com.google.android.material.navigation.NavigationBarView import es.verdnatura.MobileApplication import es.verdnatura.R import es.verdnatura.databinding.ActivityMainBinding @@ -118,7 +117,7 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL private var scheduledFuture: ScheduledFuture<*>? = null private var scheduledExecutor: ScheduledExecutorService? = null private val _renewTokenResponse = MutableLiveData() - private lateinit var networkUtils: NetworkUtils + private lateinit var networkUtils: NetworkUtilsApp private var myTimeUserInteraction = (System.currentTimeMillis() / 1000 / 3600) private var comeFromDelivery: Boolean? = null override fun getLayoutId(): Int = R.layout.activity_main @@ -176,7 +175,7 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL } private fun setRegisterNetwork() { - networkUtils = NetworkUtils(this, application as MobileApplication) + networkUtils = NetworkUtilsApp(this, application as MobileApplication) } @RequiresApi(Build.VERSION_CODES.O) @@ -251,7 +250,7 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL @DelicateCoroutinesApi fun setBottomMenuFragment() { val bottomMenu = binding.mainBottomNavigation - bottomMenu.labelVisibilityMode = LABEL_VISIBILITY_UNLABELED + bottomMenu.labelVisibilityMode = NavigationBarView.LABEL_VISIBILITY_UNLABELED bottomMenu.itemIconTintList = null GlobalScope.launch(Dispatchers.Main) { val bottomMenuItems: ArrayList = ArrayList() diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 135913de..c0ca1e4a 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -51,16 +51,6 @@ app:lottie_speed="2" /> - diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 0328c790..5b47c62c 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -1,5 +1,6 @@ + Gestor Almacén Fecha Cliente @@ -570,7 +571,7 @@ Descargando Expedición ya marcada Error al escanear expedición - %d/%d + %d/%d No ha escaneado una matrícula. Escanee matrícula Consignatario Resumen reparto @@ -695,6 +696,7 @@ Confirmada reserva Está siendo revisado por %1$s Ha sido revisado por %1$s + PREVIA:%1$s diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 2a437e04..72ce8caf 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -570,7 +570,7 @@ Descargando Expedición ya marcada Error al escanear expedición - %d/%d + %d/%d No ha escaneado una matrícula. Escanee matrícula Consignataire Résumé du chargement @@ -695,6 +695,7 @@ Confirmada reserva Está siendo revisado por %1$s Ha sido revisado por %1$s + PREVIA:%1$s diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 5f8cdb3a..f5507be4 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -570,7 +570,7 @@ Descargando Expedición ya marcada Error al escanear expedición - %d/%d + %d/%d No ha escaneado una matrícula. Escanee matrícula Consignatario Resumen reparto @@ -695,6 +695,7 @@ Confirmada reserva Está siendo revisado por %1$s Ha sido revisado por %1$s + PREVIA:%1$s diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index abda7836..a6b4e0be 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,5 @@ + Camera needs permission Warehouse Manager Date Client @@ -694,5 +695,6 @@ Confirmada reserva Ticket on checking by %1$s ticket checked by %1$s + PREVIA:%1$s diff --git a/build.gradle b/build.gradle index ab5a4a43..bcf0099d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.8.0'//1.4.20//1.5.31 + ext.kotlin_version = '1.8.22'//1.4.20//1.5.31 ext { // UI components @@ -28,7 +28,9 @@ buildscript { // in the individual module build.gradle files } } - +plugins { + id 'com.google.devtools.ksp' version '1.8.21-1.0.11' apply false +} allprojects { repositories { google()