diff --git a/android/app/build.gradle b/android/app/build.gradle index 8389deb..2d42e85 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -45,29 +45,43 @@ android { applicationId = "com.Intaleq.intaleq" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = 23 + minSdkVersion = 24 targetSdk = 36 - versionCode = 58 - versionName = '1.1.58' + versionCode = 59 + versionName = '1.1.59' multiDexEnabled = true ndk { abiFilters "armeabi-v7a", "arm64-v8a" } + // استدعاء المفتاح من ملف key.properties + manifestPlaceholders += [mapsApiKey: keystoreProperties['mapsApiKey'] ?: ""] + } - signingConfigs { + signingConfigs { release { - // Check if properties are defined before using them - storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword = keystoreProperties['storePassword'] - keyAlias = keystoreProperties['keyAlias'] - keyPassword = keystoreProperties['keyPassword'] + // Defensively check if properties exist to avoid NullPointerException in BundleTool + if (keystoreProperties.isEmpty()) { + println "BUILD_LOG: ERROR - No properties found in key.properties. Release build will fail." + } else { + storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword = keystoreProperties['storePassword'] + keyAlias = keystoreProperties['keyAlias'] + keyPassword = keystoreProperties['keyPassword'] + + // Final check to ensure no crucial signing variable is null + if (!storeFile || !storePassword || !keyAlias || !keyPassword) { + println "BUILD_LOG: ERROR - One or more signing properties are NULL. Check key.properties." + } + } } } buildTypes { release { + // Only assign signingConfig if the release config is valid signingConfig signingConfigs.release + minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' @@ -86,4 +100,4 @@ dependencies { implementation 'com.stripe:paymentsheet:21.4.2' implementation 'com.scottyab:rootbeer-lib:0.1.0' implementation 'com.google.android.gms:play-services-safetynet:18.1.0' -} \ No newline at end of file +} diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e7b1cbd..282b6c6 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,7 @@ - + + + @@ -9,24 +12,21 @@ - - - - + android:networkSecurityConfig="@xml/network_security_config"> + + + - + + + + + + + - + + + + + + - - + + - + + android:value="${mapsApiKey}" /> + + - - - - + + + + + - - + + + \ No newline at end of file diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index b099bf5..f09a915 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -3,7 +3,7 @@ high_importance_channel - AIzaSyCsg7bqeKJ4r2swhxVRBINIyOy7Jmb1Ph4 + k Security Warning AIzaSyB04YNW3LbvmQ5lX1t2bOwEU18-KUoovzw diff --git a/android/build.gradle b/android/build.gradle index f4c4022..b8001a4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -17,7 +17,7 @@ // delete rootProject.buildDir // } buildscript { - ext.kotlin_version = '1.9.23' + ext.kotlin_version = '2.1.0' repositories { google() mavenCentral()