Play rejected the upload: the listing expects com.doormile.miler and the build
carried com.doormile.partner. This is a new app rather than an update — a
package rename gives Play a different app, so nothing carries over from the old
listing and versionCode restarts against an empty history.
applicationId moves; `namespace` and the Kotlin `package com.doormile.partner`
declarations deliberately do not. Those are the code's own package and are
allowed to differ from the application id — renaming them would mean moving
source directories to change a string nothing outside the build reads.
Four things did have to follow the id, because each of them names the app to
something outside it:
* the SHIFT_END_ALARM broadcast action, or two builds installed side by side
would answer each other's shift alarms;
* the update checker's androidId in main.dart and UpdateScreen.dart, which
looks the app up ON PLAY — left stale it would poll a different listing and
report a rider up to date when he is not;
* the Play URL the update screen sends him to, which would have opened the
store page for an app he does not have;
* the map tile and routing user-agents, which identify this app to OSM and
OSRM.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqVJPB9B4QuieZnBAAKgYQ
125 lines
3.3 KiB
Groovy
125 lines
3.3 KiB
Groovy
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))
|
|
}
|
|
|
|
// No maps key is read here. The Google Maps SDK is gone: tiles come from
|
|
// OpenStreetMap and routes from OSRM, both keyless, drawn by flutter_map inside
|
|
// the Flutter view. The key this block used to inject was revoked, which is why
|
|
// the map rendered as a blank grey grid.
|
|
|
|
android {
|
|
namespace = "com.doormile.miler"
|
|
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.doormile.miler"
|
|
|
|
minSdkVersion flutter.minSdkVersion
|
|
targetSdkVersion 36
|
|
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
|
|
manifestPlaceholders = [
|
|
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")
|
|
}
|