Skip to content

Commit 297af88

Browse files
authored
fixed result (#164)
1 parent a7b3802 commit 297af88

15 files changed

+839
-631
lines changed

android/app/build.gradle

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
// android/app/build.gradle
2+
13
plugins {
24
id "com.android.application"
35
id "kotlin-android"
46
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
57
id "dev.flutter.flutter-gradle-plugin"
68
}
79

10+
// Load the Keystore Properties
811
def keystoreProperties = new Properties()
912
def keystorePropertiesFile = rootProject.file('key.properties')
1013
if (keystorePropertiesFile.exists()) {
@@ -45,20 +48,25 @@ android {
4548

4649
signingConfigs {
4750
release {
51+
// FIX: Use a conditional check (the Elvis operator ?: '')
52+
// to ensure 'file()' never gets a null or missing path string.
53+
// This is the source of the path='null' error.
4854
keyAlias = keystoreProperties['keyAlias']
4955
keyPassword = keystoreProperties['keyPassword']
50-
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
56+
storeFile = file(keystoreProperties['storeFile'] ?: '') // <--- CRITICAL FIX
5157
storePassword = keystoreProperties['storePassword']
5258
v1SigningEnabled = true
5359
v2SigningEnabled = true
5460
}
55-
}
61+
} // Line 56 is near here, depending on your exact formatting
5662

5763
buildTypes {
5864
release {
59-
// TODO: Add your own signing config for the release build.
60-
// Signing with the debug keys for now, so `flutter run --release` works.
61-
signingConfig = signingConfigs.release
65+
// Revert to unconditional assignment. If storeFile is missing,
66+
// Gradle will now error with "storeFile is missing required property",
67+
// which is clearer than the "path='null'" error.
68+
signingConfig signingConfigs.release
69+
6270
minifyEnabled = false
6371
shrinkResources = false
6472
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

android/settings.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.0.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.8.0" apply false
21+
id "com.android.application" version "8.6.0" apply false
22+
id "com.android.library" version "8.6.0" apply false
23+
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
2324
}
2425

2526
include ":app"

0 commit comments

Comments
 (0)