refs #5054. Crashlytics. versionApp: 23.4

This commit is contained in:
Sergio De la torre 2023-02-21 16:00:50 +01:00
parent 19eaf275cd
commit f1abfc2fe3
6 changed files with 81 additions and 27 deletions

3
.gitignore vendored
View File

@ -1,4 +1,7 @@
*.iml
*.apk
*.ap_
*.aab
.gradle
/local.properties
/.idea/caches

View File

@ -83,9 +83,20 @@
</select>
</component>
<component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Activado impresion labelCount">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Expandible recycler final">
<change afterPath="$PROJECT_DIR$/app/beta/app-beta.apk" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/beta/release/app-beta-release.apk" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/beta/release/output-metadata.json" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/general/release/output-metadata.json" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/general/release/vn-picking.apk" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/beta/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/beta/output-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/google-services.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/google-services.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/release/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/release/output-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -182,7 +193,7 @@
</option>
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="testBeta_5109_qr_Agrupar_sales" />
<entry key="$PROJECT_DIR$" value="testBeta" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@ -244,7 +255,7 @@
},
&quot;keyToStringList&quot;: {
&quot;ExportApk.BuildVariants&quot;: [
&quot;release&quot;
&quot;generalRelease&quot;
]
}
}</component>
@ -774,7 +785,7 @@
<entry key="branch">
<value>
<list>
<option value="testBeta_5109_qr" />
<option value="testBeta_crashlytics" />
</list>
</value>
</entry>

View File

@ -2,19 +2,19 @@ apply plugin: 'com.android.application'
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.firebase.crashlytics'
android {
compileSdkVersion 33
// buildToolsVersion "29.0.3"
// buildToolsVersion "29.0.3"
defaultConfig {
applicationId "es.verdnatura"
minSdkVersion 24 //21
targetSdkVersion 33
versionCode 161
//versionName = "23.3Beta" versionCode 160
//versionName = "23.4" versionCode 157
versionName = "23.4Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@ -27,17 +27,20 @@ android {
//package de la app general = "package_name": "es.verdnatura"
//package de la app beta = "package_name": "es.verdnatura.sfusion"
/*scaleFusion
getByName("debug") {
applicationIdSuffix = ".debug"
}*/
getByName("release") {
applicationIdSuffix = ".sfusion"
}
}
flavorDimensions "version"
productFlavors {
create("beta") {
applicationIdSuffix = ".sfusion"
}
create("general") {
//versionNameSuffix = "General"
}
}
buildFeatures {
viewBinding = true
}
@ -55,6 +58,8 @@ 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'
debugImplementation fileTree(dir: 'libs/debug', include: ['*.jar'])
releaseImplementation fileTree(dir: 'libs/release', include: ['*.jar'])

View File

@ -1,34 +1,62 @@
{
"project_info": {
"project_number": "519813071137",
"firebase_url": "https://gestoralmacen-bfa2a.firebaseio.com",
"project_id": "gestoralmacen-bfa2a",
"storage_bucket": "gestoralmacen-bfa2a.appspot.com"
"project_number": "975691769093",
"project_id": "picking-2b9a0",
"storage_bucket": "picking-2b9a0.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:519813071137:android:3de54686c580a6f79dfe60",
"mobilesdk_app_id": "1:975691769093:android:83eff0dadf5ca9d3e3c36c",
"android_client_info": {
"package_name": "es.verdnatura.sfusion"
"package_name": "es.verdnatura"
}
},
"oauth_client": [
{
"client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA74wQCwDCpCjWs49lCX5m2SsdqcYb_J8s"
"current_key": "AIzaSyC3skTw7I7BbOuSS4jOBa373zV5e8wCMDM"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:975691769093:android:83eff0dadf5ca9d3e3c36c",
"android_client_info": {
"package_name": "es.verdnatura.sfusion"
}
},
"oauth_client": [
{
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyC3skTw7I7BbOuSS4jOBa373zV5e8wCMDM"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "975691769093-j2u5241eac30n2saa1mvbguq670tsvd0.apps.googleusercontent.com",
"client_type": 3
}
]

View File

@ -12,6 +12,8 @@ import android.provider.Settings
import android.view.View
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.firebase.crashlytics.ktx.crashlytics
import com.google.firebase.ktx.Firebase
import es.verdnatura.R
import es.verdnatura.databinding.FragmentLoginBinding
import es.verdnatura.domain.notNull
@ -433,6 +435,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
binding.edittextUsername.text.toString(),
binding.edittextPassword.text.toString()
)
setupFirebase()
//Tarea 4351 quitar el if y poner e device_checkLogin a continuación del response de operator_add
viewModel.operator_add()
@ -444,6 +447,10 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
super.observeViewModel()
}
private fun setupFirebase() {
Firebase.crashlytics.setUserId(getData(USER))
}
private fun getInfoVersionNameApp(): String {
val manager: PackageManager = requireContext().packageManager
val info: PackageInfo = manager.getPackageInfo(requireContext().packageName, 0)

View File

@ -21,8 +21,8 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'//4.3.5
// classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'//2.5.2
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files