Files
tripz-llc/apps/driver/android/app/build.gradle
T
HamzaandClaude Opus 4.8 6234e66471 feat: Gemini AI (doc OCR + face match) + role-assignment endpoints
- GeminiService (integrations/gemini, @Global): extractDocument (OCR fields) + faceMatch; graceful if no GEMINI_API_KEY
- documents: face-match now real via Gemini; POST /admin/documents/:id/ocr extracts fields for CS auto-fill
- roles: PATCH /admin/users/:id/role (admin) + POST /platform/users/role (bootstrap via x-platform-secret)
- config: gemini + platform.secret; .env.example entries

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 20:01:26 +03:00

127 lines
4.0 KiB
Groovy
Executable File

plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystorePropertiesFile.withReader("UTF-8") { reader ->
keystoreProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') ?: '12'
def flutterVersionName = localProperties.getProperty('flutter.versionName') ?: '1.1.2'
android {
namespace "com.sefer_driver"
compileSdk = 36
ndkVersion "29.0.14033849"
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.22.1"
}
}
//
defaultConfig {
applicationId "com.sefer_driver"
minSdk 29
targetSdk 36
versionCode 152
versionName '2.0.152'
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
externalNativeBuild {
cmake {
arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
}
}
// استدعاء المفتاح من ملف key.properties
manifestPlaceholders += [mapsApiKey: keystoreProperties['mapsApiKey'] ?: ""]
}
signingConfigs {
release {
// 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'
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
coreLibraryDesugaringEnabled true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
sourceSets {
main {
java.srcDirs += 'src/main/kotlin'
jniLibs.srcDirs = ['src/main/jniLibs']
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// تمت الترقية لتطابق تطبيق الراكب
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
// تمت الترقية لتطابق تطبيق الراكب (لتجنب ملفات 4KB القديمة)
implementation "com.stripe:stripe-android:21.4.2"
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'
implementation "androidx.concurrent:concurrent-futures:1.2.0"
}