feat: Update Android package and application ID, and introduce product flavors for different build environments.

This commit is contained in:
Achintha Isuru
2025-12-03 01:42:36 -05:00
parent 323968c79c
commit 3993cffc1a
2 changed files with 23 additions and 10 deletions

View File

@@ -6,7 +6,7 @@ plugins {
}
android {
namespace = "com.example.krow_staff"
namespace = "com.krowwithus.krow_staff"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
@@ -15,13 +15,12 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() }
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.krow_staff"
// TODO: Specify your own unique Application ID
// (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.krowwithus.krow_staff"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
@@ -30,6 +29,22 @@ android {
versionName = flutter.versionName
}
flavorDimensions += "env"
productFlavors {
create("dev") {
dimension = "env"
applicationIdSuffix = ".dev"
versionNameSuffix = "-dev"
}
create("stage") {
dimension = "env"
applicationIdSuffix = ".stage"
versionNameSuffix = "-stage"
}
create("prod") { dimension = "env" }
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
@@ -39,6 +54,4 @@ android {
}
}
flutter {
source = "../.."
}
flutter { source = "../.." }

View File

@@ -1,4 +1,4 @@
package com.example.krow_staff
package com.krowwithus.krow_staff
import io.flutter.embedding.android.FlutterActivity