initial commit: push everything
This commit is contained in:
122
android/app/build.gradle
Normal file
122
android/app/build.gradle
Normal file
@@ -0,0 +1,122 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
id "com.google.gms.google-services"
|
||||
}
|
||||
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file("local.properties")
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader("UTF-8") { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty("flutter.versionCode") ?: "1"
|
||||
def flutterVersionName = localProperties.getProperty("flutter.versionName") ?: "1.0"
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
def googleMapsApiKey = localProperties.getProperty("GOOGLE_MAPS_API_KEY") ?: ""
|
||||
|
||||
android {
|
||||
namespace = "com.nearle.partner"
|
||||
compileSdk = 36
|
||||
|
||||
// Correct NDK version
|
||||
ndkVersion "27.0.12077973"
|
||||
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
useLegacyPackaging = true
|
||||
}
|
||||
// ❌ removed doNotStrip (this was breaking your AAB build)
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.nearle.partner"
|
||||
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
targetSdkVersion 36
|
||||
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
||||
manifestPlaceholders = [
|
||||
GOOGLE_MAPS_API_KEY: googleMapsApiKey,
|
||||
applicationName: "android.app.Application"
|
||||
]
|
||||
|
||||
// Build only ARM64
|
||||
ndk {
|
||||
abiFilters "arm64-v8a"
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties["keyAlias"]
|
||||
keyPassword keystoreProperties["keyPassword"]
|
||||
storeFile keystoreProperties["storeFile"] ? file(keystoreProperties["storeFile"]) : null
|
||||
storePassword keystoreProperties["storePassword"]
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
debuggable true
|
||||
}
|
||||
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
|
||||
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
|
||||
// ❌ removed ndk { debugSymbolLevel } (this caused strip crash)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "androidx.core:core:1.10.0"
|
||||
implementation "com.google.android.gms:play-services-location:21.0.1"
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.5"
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
tasks.register("copyNotificationSounds", Copy) {
|
||||
def audioDir = file("$projectDir/../../assets/audio")
|
||||
from(audioDir)
|
||||
include("*.mp3")
|
||||
into("$projectDir/src/main/res/raw")
|
||||
|
||||
rename { String fileName ->
|
||||
fileName.replaceAll(/[^A-Za-z0-9_.]/, "_").toLowerCase()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("preBuild").configure {
|
||||
dependsOn("copyNotificationSounds")
|
||||
}
|
||||
Reference in New Issue
Block a user