Update Android project

This commit is contained in:
Anton Tananaev 2025-05-21 07:20:18 -07:00
parent 70a36d0502
commit 6dbe061c3b
2 changed files with 19 additions and 3 deletions

View file

@ -1,3 +1,6 @@
import java.util.Properties
import java.io.FileInputStream
plugins { plugins {
id("com.android.application") id("com.android.application")
// START: FlutterFire Configuration // START: FlutterFire Configuration
@ -12,6 +15,12 @@ plugins {
val backgroundGeolocation = project(":flutter_background_geolocation") val backgroundGeolocation = project(":flutter_background_geolocation")
apply { from("${backgroundGeolocation.projectDir}/background_geolocation.gradle") } apply { from("${backgroundGeolocation.projectDir}/background_geolocation.gradle") }
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("../../environment/key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android { android {
namespace = "org.traccar.client" namespace = "org.traccar.client"
compileSdk = flutter.compileSdkVersion compileSdk = flutter.compileSdkVersion
@ -36,11 +45,17 @@ android {
versionName = flutter.versionName versionName = flutter.versionName
} }
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
storePassword = keystoreProperties["storePassword"] as String
}
}
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. signingConfig = signingConfigs.getByName("release")
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
isShrinkResources = false isShrinkResources = false
} }
} }

View file

@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<application <application
tools:replace="android:label" tools:replace="android:label"
android:label="Traccar Client" android:label="Traccar Client"