Skip to content

Commit 0d94c52

Browse files
committed
Update Android build configuration and manifest
1 parent 53960a2 commit 0d94c52

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

android/app/build.gradle.kts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
import java.util.Properties
2+
import java.io.FileInputStream
3+
14
plugins {
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+
817
android {
918
namespace = "com.tecdrop.weekday_counters"
1019
compileSdk = flutter.compileSdkVersion
@@ -21,7 +30,6 @@ android {
2130
}
2231

2332
defaultConfig {
24-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
2533
applicationId = "com.tecdrop.weekday_counters"
2634
// You can update the following values to match your application needs.
2735
// For more information, see: https://flutter.dev/to/review-gradle-config.
@@ -31,11 +39,18 @@ android {
3139
versionName = flutter.versionName
3240
}
3341

42+
signingConfigs {
43+
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
48+
}
49+
}
50+
3451
buildTypes {
3552
release {
36-
// TODO: Add your own signing config for the release build.
37-
// Signing with the debug keys for now, so `flutter run --release` works.
38-
signingConfig = signingConfigs.getByName("debug")
53+
signingConfig = signingConfigs.getByName("release")
3954
}
4055
}
4156
}

android/app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22
<application
3-
android:label="weekday_counters"
3+
android:label="Weekday Counters"
44
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity
@@ -41,5 +41,11 @@
4141
<action android:name="android.intent.action.PROCESS_TEXT"/>
4242
<data android:mimeType="text/plain"/>
4343
</intent>
44+
45+
<!-- App opens https URLs -->
46+
<intent>
47+
<action android:name="android.intent.action.VIEW" />
48+
<data android:scheme="https" />
49+
</intent>
4450
</queries>
4551
</manifest>

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1717
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1818
# In Windows, build-name is used as the major, minor, and patch parts
1919
# of the product and file versions while build-number is used as the build suffix.
20-
version: 1.2.0+3
20+
version: 1.3.0+4
2121

2222
environment:
2323
sdk: ^3.7.2

0 commit comments

Comments
 (0)