From 94ac3a283ffe594bdccd80c71503edbaa78f3fee Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Mon, 5 Dec 2022 22:14:30 +0300 Subject: [PATCH] Added flavors --- .vscode/launch.json | 26 ++++++++++++++++++++++++++ android/app/build.gradle | 18 ++++++++++-------- 2 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..5077d9e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "dev", + "request": "launch", + "type": "dart", + "args": [ + "--flavor", + "dev", + ], + }, + { + "name": "prod", + "request": "launch", + "type": "dart", + "args": [ + "--flavor", + "prod", + ], + }, + ], +} \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index d12a49a..c9ca0aa 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -43,20 +43,22 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.vodemn.lightmeter" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. + flavorDimensions "app" + productFlavors { + dev { + applicationId "com.vodemn.lightmeter.dev" + dimension "app" + signingConfig signingConfigs.debug + } + prod { + applicationId "com.vodemn.lightmeter" + dimension "app" signingConfig signingConfigs.debug } }