@@ -16,7 +16,7 @@ if (keystorePropertiesFile.exists()) {
1616}
1717
1818android {
19- namespace = " vpnclient.click "
19+ namespace = " click. vpnclient.vpnclient "
2020 compileSdk = flutter.compileSdkVersion
2121
2222 compileOptions {
@@ -29,10 +29,7 @@ android {
2929 }
3030
3131 defaultConfig {
32- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
33- applicationId = " vpnclient.click"
34- // You can update the following values to match your application needs.
35- // For more information, see: https://flutter.dev/to/review-gradle-config.
32+ applicationId = " click.vpnclient.vpnclient"
3633 minSdk = flutter.minSdkVersion
3734 targetSdk = flutter.targetSdkVersion
3835 versionCode = flutter.versionCode
@@ -41,19 +38,24 @@ android {
4138
4239 signingConfigs {
4340 create(" release" ) {
44- keyAlias = keystoreProperties[" keyAlias" ] as String
45- keyPassword = keystoreProperties[" keyPassword" ] as String
46- storeFile = keystoreProperties[" storeFile" ]?.let { file(it) }
47- storePassword = keystoreProperties[" storePassword" ] as String
41+ if (keystorePropertiesFile.exists()) {
42+ keyAlias = keystoreProperties[" keyAlias" ] as String
43+ keyPassword = keystoreProperties[" keyPassword" ] as String
44+ storeFile = keystoreProperties[" storeFile" ]?.let { file(it) }
45+ storePassword = keystoreProperties[" storePassword" ] as String
46+ }
4847 }
4948 }
49+
5050 buildTypes {
5151 release {
52- // TODO: Add your own signing config for the release build.
53- // Signing with the debug keys for now, so `flutter run --release` works.
54- // signingConfig = signingConfigs.getByName("debug")
55- signingConfig = signingConfigs.getByName(" release" )
52+ if (keystorePropertiesFile.exists()) {
53+ signingConfig = signingConfigs.getByName(" release" )
54+ } else {
55+ println (" Warning: No release signing config defined, the release build will be unsigned." )
56+ }
5657
58+ isMinifyEnabled = true
5759 }
5860 }
5961}
0 commit comments