build(release): Android signing, iOS privacy manifest, store assets (Phase 7)
- Android: release keystore signing wired via gitignored key.properties (falls back to debug when absent). Verified: signed AAB built (signer CN=Block Seasons). - iOS: app PrivacyInfo.xcprivacy (ATT tracking flag, device-id/usage data types, UserDefaults+FileTimestamp required-reason APIs) registered in the Runner target. - Store: app-ads.txt (pub-5605900229781491), EN/KO listing copy, owner submission guide (privacy labels, app-ads hosting, upload/submit steps). Secrets (keystore, key.properties) are gitignored — owner backs them up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
// START: FlutterFire Configuration
|
||||
@@ -8,6 +11,15 @@ plugins {
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
// Release signing is read from android/key.properties (gitignored). When that
|
||||
// file is absent (CI, a fresh clone, another machine) the release build falls
|
||||
// back to debug signing so `flutter build`/`flutter run --release` still works.
|
||||
val keystoreProperties = Properties()
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.airkjw.block_seasons"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
@@ -34,11 +46,24 @@ android {
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
signingConfig = if (keystorePropertiesFile.exists()) {
|
||||
signingConfigs.getByName("release")
|
||||
} else {
|
||||
signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user