1+ import java.util.Properties
2+ import java.io.FileInputStream
3+
14plugins {
25 id(" com.android.application" )
36 id(" kotlin-android" )
47 // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
58 id(" dev.flutter.flutter-gradle-plugin" )
69}
710
11+ val keystoreProperties = Properties ()
12+ val keystorePropertiesFile = rootProject.file(" key.properties" )
13+ if (keystorePropertiesFile.exists()) {
14+ keystoreProperties.load(FileInputStream (keystorePropertiesFile))
15+ }
16+
817android {
9- namespace = " com.example.algorithm_visualizer "
18+ namespace = " com.elhawary.algodive "
1019 compileSdk = flutter.compileSdkVersion
1120 ndkVersion = flutter.ndkVersion
1221
22+ signingConfigs {
23+ create(" release" ) {
24+ keyAlias = keystoreProperties[" keyAlias" ] as String
25+ keyPassword = keystoreProperties[" keyPassword" ] as String
26+ storeFile = keystoreProperties[" storeFile" ]?.let { file(it) }
27+ storePassword = keystoreProperties[" storePassword" ] as String
28+ }
29+ }
30+
1331 compileOptions {
1432 sourceCompatibility = JavaVersion .VERSION_11
1533 targetCompatibility = JavaVersion .VERSION_11
@@ -21,7 +39,7 @@ android {
2139
2240 defaultConfig {
2341 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24- applicationId = " com.example.algorithm_visualizer "
42+ applicationId = " com.elhawary.algodive "
2543 // You can update the following values to match your application needs.
2644 // For more information, see: https://flutter.dev/to/review-gradle-config.
2745 minSdk = flutter.minSdkVersion
@@ -34,7 +52,7 @@ android {
3452 release {
3553 // TODO: Add your own signing config for the release build.
3654 // Signing with the debug keys for now, so `flutter run --release` works.
37- signingConfig = signingConfigs.getByName(" debug " )
55+ signingConfig = signingConfigs.getByName(" release " )
3856 }
3957 }
4058}
0 commit comments