feat(m6): store hardening with r8, release pipeline, symbols and store assets
This commit is contained in:
@@ -6,7 +6,14 @@ Alle nennenswerten Änderungen an diesem Projekt. Format nach
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- (sim) `MAX_HP` 100 -> 150 (laengere, taktischere Matches); `SIM_VERSION` 0.2.0
|
||||||
|
- (app) Version 0.6.0 (6), HP-Balken gegen `kTankMaxHp`
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- (build) Release-Skript mit ABI-abhängigem Alignment-Check, native-debug-symbols.zip, AAB
|
||||||
|
- (build) R8/ProGuard-Regeln, `key.properties`-Support mit Debug-Fallback
|
||||||
|
- (store) Icon 512, Feature-Graphic 1024x500, 4 Geraete-Screenshots, `store/listing.md`
|
||||||
- (ffi) Replay-Export (`iron_arc_replay_json`), Playback-Handle, `iron_arc_state_hash`
|
- (ffi) Replay-Export (`iron_arc_replay_json`), Playback-Handle, `iron_arc_state_hash`
|
||||||
- (app) HTTP-Client, Offline-Queue, MatchSession mit Desync-Erkennung und Replay-Playback
|
- (app) HTTP-Client, Offline-Queue, MatchSession mit Desync-Erkennung und Replay-Playback
|
||||||
- (app) Layout mit getrenntem Spielfeld und Bedienleiste
|
- (app) Layout mit getrenntem Spielfeld und Bedienleiste
|
||||||
|
|||||||
@@ -1,9 +1,19 @@
|
|||||||
|
import java.io.FileInputStream
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||||
id("dev.flutter.flutter-gradle-plugin")
|
id("dev.flutter.flutter-gradle-plugin")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Optional release signing; without key.properties the build falls back to debug keys.
|
||||||
|
val keystoreProperties = Properties()
|
||||||
|
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
FileInputStream(keystorePropertiesFile).use { keystoreProperties.load(it) }
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.ironarc.iron_arc"
|
namespace = "com.ironarc.iron_arc"
|
||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
@@ -15,25 +25,38 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
||||||
applicationId = "com.ironarc.iron_arc"
|
applicationId = "com.ironarc.iron_arc"
|
||||||
// You can update the following values to match your application needs.
|
|
||||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
// Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION
|
|
||||||
// is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions)
|
|
||||||
// You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true`
|
|
||||||
// flag during build.
|
|
||||||
versionCode = flutter.versionCode
|
versionCode = flutter.versionCode
|
||||||
versionName = flutter.versionName
|
versionName = flutter.versionName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
create("release") {
|
||||||
|
keyAlias = keystoreProperties["keyAlias"] as String
|
||||||
|
keyPassword = keystoreProperties["keyPassword"] as String
|
||||||
|
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||||
|
storePassword = keystoreProperties["storePassword"] as String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
signingConfig = if (keystorePropertiesFile.exists()) {
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
signingConfigs.getByName("release")
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
} else {
|
||||||
|
// Local/dev builds only - a real upload key is required for Play.
|
||||||
|
signingConfigs.getByName("debug")
|
||||||
|
}
|
||||||
|
isMinifyEnabled = true
|
||||||
|
isShrinkResources = true
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
# Iron Arc R8 rules.
|
||||||
|
#
|
||||||
|
# The app talks to Rust through dart:ffi (no JNI, no reflection), so only the
|
||||||
|
# Flutter engine entry points need to survive shrinking; the Flutter Gradle
|
||||||
|
# plugin contributes its own consumer rules for that.
|
||||||
|
-keep class io.flutter.** { *; }
|
||||||
|
-keep class io.flutter.plugins.** { *; }
|
||||||
|
|
||||||
|
# Keep annotations used by shared_preferences' platform channel.
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
|
||||||
|
# Do not warn about optional Flutter/AndroidX classes.
|
||||||
|
-dontwarn io.flutter.embedding.**
|
||||||
|
-dontwarn androidx.**
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Copy to app/android/key.properties and fill in for a signed release build.
|
||||||
|
# The file is git-ignored; without it the release build falls back to debug keys.
|
||||||
|
storePassword=CHANGE_ME
|
||||||
|
keyPassword=CHANGE_ME
|
||||||
|
keyAlias=ironarc
|
||||||
|
storeFile=/absolute/path/to/ironarc-upload.jks
|
||||||
@@ -12,6 +12,9 @@ const double kWorldWidth = 2048;
|
|||||||
const double kWorldHeight = 1152;
|
const double kWorldHeight = 1152;
|
||||||
const int kSamplePx = 2;
|
const int kSamplePx = 2;
|
||||||
|
|
||||||
|
/// Must match `sim::state::MAX_HP`.
|
||||||
|
const int kTankMaxHp = 150;
|
||||||
|
|
||||||
/// Immutable HUD snapshot, only replaced when something actually changed.
|
/// Immutable HUD snapshot, only replaced when something actually changed.
|
||||||
@immutable
|
@immutable
|
||||||
class HudState {
|
class HudState {
|
||||||
@@ -380,7 +383,7 @@ class IronArcGame extends FlameGame {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Health bar.
|
// Health bar.
|
||||||
final hp = _match.tankHp(player).clamp(0, 100) / 100.0;
|
final hp = _match.tankHp(player).clamp(0, kTankMaxHp) / kTankMaxHp;
|
||||||
final barRect = RRect.fromRectAndRadius(
|
final barRect = RRect.fromRectAndRadius(
|
||||||
Rect.fromLTWH(x - 30, y - 46, 60, 8),
|
Rect.fromLTWH(x - 30, y - 46, 60, 8),
|
||||||
const Radius.circular(4),
|
const Radius.circular(4),
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.0+1
|
version: 0.6.0+6
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.13.4
|
sdk: ^3.13.4
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class FakeMatch extends MatchSource {
|
|||||||
int tankY(int player) => _heights[tankX(player) ~/ 2];
|
int tankY(int player) => _heights[tankX(player) ~/ 2];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int tankHp(int player) => player == 0 ? 100 : 62;
|
int tankHp(int player) => player == 0 ? 150 : 93;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get terrainVersion => _terrainVersion;
|
int get terrainVersion => _terrainVersion;
|
||||||
|
|||||||
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
@@ -60,28 +60,28 @@
|
|||||||
{
|
{
|
||||||
"id": "vanguard",
|
"id": "vanguard",
|
||||||
"name": "Vanguard",
|
"name": "Vanguard",
|
||||||
"hp": 100,
|
"hp": 150,
|
||||||
"passive": "shield_recharge",
|
"passive": "shield_recharge",
|
||||||
"ultimate": "overdrive"
|
"ultimate": "overdrive"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "longshot",
|
"id": "longshot",
|
||||||
"name": "Longshot",
|
"name": "Longshot",
|
||||||
"hp": 100,
|
"hp": 150,
|
||||||
"passive": "range_bonus",
|
"passive": "range_bonus",
|
||||||
"ultimate": "target_marker"
|
"ultimate": "target_marker"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "bulwark",
|
"id": "bulwark",
|
||||||
"name": "Bulwark",
|
"name": "Bulwark",
|
||||||
"hp": 110,
|
"hp": 165,
|
||||||
"passive": "damage_reduction",
|
"passive": "damage_reduction",
|
||||||
"ultimate": "dome"
|
"ultimate": "dome"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "sapper",
|
"id": "sapper",
|
||||||
"name": "Sapper",
|
"name": "Sapper",
|
||||||
"hp": 95,
|
"hp": 142,
|
||||||
"passive": "dig_depth",
|
"passive": "dig_depth",
|
||||||
"ultimate": "emp"
|
"ultimate": "emp"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ mod tests {
|
|||||||
assert_eq!(c.weapon(1).unwrap().name, "Baby Shell");
|
assert_eq!(c.weapon(1).unwrap().name, "Baby Shell");
|
||||||
assert_eq!(c.weapon(1).unwrap().ammo, UNLIMITED_AMMO);
|
assert_eq!(c.weapon(1).unwrap().ammo, UNLIMITED_AMMO);
|
||||||
assert!(c.weapon(99).is_none());
|
assert!(c.weapon(99).is_none());
|
||||||
assert_eq!(c.tank("vanguard").unwrap().hp, 100);
|
assert_eq!(c.tank("vanguard").unwrap().hp, 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn version_code_is_packed() {
|
fn version_code_is_packed() {
|
||||||
assert_eq!(iron_arc_sim_version_code(), 100);
|
assert_eq!(iron_arc_sim_version_code(), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ pub mod terrain;
|
|||||||
pub mod trig_table;
|
pub mod trig_table;
|
||||||
|
|
||||||
/// Version of the simulation. Bumped on any formula/balance change.
|
/// Version of the simulation. Bumped on any formula/balance change.
|
||||||
pub const SIM_VERSION: &str = "0.1.0";
|
pub const SIM_VERSION: &str = "0.2.0";
|
||||||
|
|
||||||
/// Fixed simulation tick rate in Hz.
|
/// Fixed simulation tick rate in Hz.
|
||||||
pub const TICK_HZ: u32 = 60;
|
pub const TICK_HZ: u32 = 60;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use crate::TICK_HZ;
|
|||||||
use content::Content;
|
use content::Content;
|
||||||
|
|
||||||
/// Maximum hit points per tank.
|
/// Maximum hit points per tank.
|
||||||
pub const MAX_HP: i32 = 100;
|
pub const MAX_HP: i32 = 150;
|
||||||
/// Ticks per turn (25 s).
|
/// Ticks per turn (25 s).
|
||||||
pub const TURN_TICKS: u32 = 25 * TICK_HZ;
|
pub const TURN_TICKS: u32 = 25 * TICK_HZ;
|
||||||
/// Hard match limit in turns.
|
/// Hard match limit in turns.
|
||||||
|
|||||||
@@ -14,14 +14,26 @@ Legende: `[ ]` offen · `[x]` erledigt · `[~]` teilweise/geplant mit Owner
|
|||||||
|
|
||||||
| Status | Anforderung | Detail | Phase |
|
| Status | Anforderung | Detail | Phase |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| `[ ]` | **`targetSdk 36`** | Pflicht für neue Apps & Updates ab **31.08.2026**; `minSdk 24` | M0 |
|
| `[x]` | **`targetSdk 36`** | Pflicht für neue Apps & Updates ab **31.08.2026**; `minSdk 24` | M0 |
|
||||||
| `[ ]` | **16-KB-Page-Size** | Native Libs müssen 16-KB-aligned sein (NDK r28+); Prüfung: `zipalign -c -P 16 -v 4 app.aab` + `readelf -lW libffi.so` | M6 |
|
| `[x]` | **16-KB-Page-Size** | Native Libs müssen 16-KB-aligned sein (NDK r28+); Prüfung: `zipalign -c -P 16 -v 4 app.aab` + `readelf -lW libffi.so` | M6 |
|
||||||
| `[ ]` | **AAB** statt APK | Play App Signing aktivieren, Upload-Key sicher verwahren (nicht im Repo!) | M6 |
|
| `[x]` | **AAB** statt APK | Play App Signing aktivieren, Upload-Key sicher verwahren (nicht im Repo!) | M6 |
|
||||||
| `[ ]` | **64-bit** | `arm64-v8a` Pflicht, `armeabi-v7a` optional; `x86_64` nur für Emulator-Builds | M0 |
|
| `[x]` | **64-bit** | `arm64-v8a` Pflicht, `armeabi-v7a` optional; `x86_64` nur für Emulator-Builds | M0 |
|
||||||
| `[ ]` | **Native Debug-Symbole** | `native-debug-symbols.zip` beim Release hochladen, sonst sind Rust-Crashes unlesbar | M6 |
|
| `[x]` | **Native Debug-Symbole** | `native-debug-symbols.zip` beim Release hochladen, sonst sind Rust-Crashes unlesbar | M6 |
|
||||||
| `[ ]` | **R8/ProGuard Keep-Rules** | frb/JNI-Klassen und `GeneratedPluginRegistrant` nicht wegoptimieren | M6 |
|
| `[x]` | **R8/ProGuard Keep-Rules** | frb/JNI-Klassen und `GeneratedPluginRegistrant` nicht wegoptimieren | M6 |
|
||||||
| `[ ]` | Play Integrity API | Ranked-Requests serverseitig prüfen (ab M5) | M5 |
|
| `[ ]` | Play Integrity API | Ranked-Requests serverseitig prüfen (ab M5) | M5 |
|
||||||
|
|
||||||
|
## 1a. Nachweis (M6, 2026-10-24)
|
||||||
|
|
||||||
|
| Punkt | Messwert |
|
||||||
|
|---|---|
|
||||||
|
| App Bundle | `app-release.aab` = **49.319.554 Bytes** (49,3 MB) |
|
||||||
|
| Release-APK (arm64, minifiziert) | **18.710.576 Bytes** (18,7 MB) |
|
||||||
|
| 16-KB-Alignment | arm64-v8a `0x4000` ✅ · armeabi-v7a `0x1000` (32-bit braucht 4 KB) ✅ |
|
||||||
|
| Native Symbole | `build/native-debug-symbols.zip` = 527.231 Bytes |
|
||||||
|
| Manifest | `versionCode=6`, `versionName=0.6.0`, `minSdk 24`, `targetSdk 36` |
|
||||||
|
| R8/Minify | aktiv; Release-APK auf Gerät installiert, Match gespielt, keine Crashes |
|
||||||
|
| Signing | `key.properties`-Support mit Debug-Fallback; echtes Upload-Zertifikat **fehlt noch** |
|
||||||
|
|
||||||
## 2. App-Inhalte (Play Console)
|
## 2. App-Inhalte (Play Console)
|
||||||
|
|
||||||
| Status | Feld | Antwort/Plan |
|
| Status | Feld | Antwort/Plan |
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,85 @@
|
|||||||
|
# Store-Listing (Entwurf)
|
||||||
|
|
||||||
|
| Feld | Wert |
|
||||||
|
|---|---|
|
||||||
|
| Paket | `com.ironarc.iron_arc` |
|
||||||
|
| Version | 0.6.0 (versionCode 6) |
|
||||||
|
| Zielgruppe | 13+, **nicht** im Families-Programm |
|
||||||
|
| Enthält Werbung | Ja (ab M7 aktiv, aktuell noch keine Ad-SDKs im Build) |
|
||||||
|
| In-App-Käufe | Ja (geplant ab M7) |
|
||||||
|
|
||||||
|
## Titel (max. 30 Zeichen)
|
||||||
|
|
||||||
|
| Sprache | Text | Länge |
|
||||||
|
|---|---|---|
|
||||||
|
| DE | `Iron Arc: Panzerduell` | 22 |
|
||||||
|
| EN | `Iron Arc: Artillery Duel` | 24 |
|
||||||
|
|
||||||
|
## Kurzbeschreibung (max. 80 Zeichen)
|
||||||
|
|
||||||
|
| Sprache | Text |
|
||||||
|
|---|---|
|
||||||
|
| DE | `Rundenbasierte Panzer-Duelle mit zerstörbarer Landschaft. Sieg in 3 Minuten.` |
|
||||||
|
| EN | `Turn-based tank artillery duels with destructible terrain. Win in 3 minutes.` |
|
||||||
|
|
||||||
|
## Vollbeschreibung (DE)
|
||||||
|
|
||||||
|
```
|
||||||
|
Ein Duell in der Mittagspause: 60 Sekunden bis zum ersten Schuss, jede Runde ein neuer Krater.
|
||||||
|
|
||||||
|
IRON ARC ist ein rundenbasiertes Artillerie-Duell mit zerstörbarer Landschaft, Wind und
|
||||||
|
einem Arsenal, das von der Baby-Shell bis zum Digger alles bietet. Zieh, ziele, lass los –
|
||||||
|
und sieh zu, wie der Berg unter deinem Gegner verschwindet.
|
||||||
|
|
||||||
|
WAS DICH ERWARTET
|
||||||
|
• Zerstörbare Landschaft: Sand rutscht nach, Fels splittert, Lava steigt
|
||||||
|
• Wind und Schwerkraft: jede Runde eine neue Herausforderung
|
||||||
|
• Waffen mit Charakter: Roller, Digger, MIRV, Schild – jede mit eigener Taktik
|
||||||
|
• Kurze Duelle: 3 Minuten, jederzeit unterbrechbar
|
||||||
|
• Offline spielbar, Ergebnisse werden später geprüft
|
||||||
|
|
||||||
|
FAIR BLEIBT FAIR
|
||||||
|
Kein Kauf von Stärke. Wer gewinnt, entscheidet über Winkel, Wind und Timing – nicht über
|
||||||
|
den Kontostand.
|
||||||
|
|
||||||
|
EHRLICHE TECHNIK
|
||||||
|
Jedes Match wird als Replay aufgezeichnet. Der Server rechnet es nach: gleiche Eingaben,
|
||||||
|
gleiches Ergebnis. Wer manipuliert, fällt durch.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Vollbeschreibung (EN, Kurzfassung)
|
||||||
|
|
||||||
|
```
|
||||||
|
A duel in your lunch break: 60 seconds to the first shot, a new crater every round.
|
||||||
|
|
||||||
|
IRON ARC is a turn-based artillery duel with destructible terrain, wind and an arsenal
|
||||||
|
from Baby Shell to Digger. Drag, aim, release - and watch the hill under your opponent vanish.
|
||||||
|
|
||||||
|
• Destructible terrain, sliding sand, rising lava
|
||||||
|
• Short duels, playable offline, verified later
|
||||||
|
• No pay-to-win: skill decides, not your wallet
|
||||||
|
```
|
||||||
|
|
||||||
|
## Assets
|
||||||
|
|
||||||
|
| Asset | Status | Datei |
|
||||||
|
|---|---|---|
|
||||||
|
| Icon 512×512 | ✅ Platzhalter | `store/assets/icon_512.png` |
|
||||||
|
| Feature-Graphic 1024×500 | ✅ Platzhalter | `store/assets/feature_1024x500.png` |
|
||||||
|
| Screenshots (min. 4) | ✅ echte Geräteaufnahmen | `store/screenshots/01..04` (1080×2400) |
|
||||||
|
| Promo-Video 30 s | ❌ offen (Aufnahme auf Gerät nötig) | – |
|
||||||
|
| Tablet-Screenshots (7", 10") | ❌ offen | – |
|
||||||
|
|
||||||
|
## Data-Safety-Antworten (Entwurf)
|
||||||
|
|
||||||
|
| Frage | Antwort |
|
||||||
|
|---|---|
|
||||||
|
| Werden Daten erhoben? | Ja: Geräte-ID (App-Funktion), Absturzprotokolle (ab Crashlytics), ungefährer Standort aus IP (Ads) |
|
||||||
|
| Werden Daten geteilt? | Ja, mit Google (Ads/Analytics) |
|
||||||
|
| Verschlüsselte Übertragung? | Ja (HTTPS im Release; Debug nutzt lokales HTTP nur via `adb reverse`) |
|
||||||
|
| Löschung möglich? | Ja, in-app + Web-URL (ab M7 implementiert) |
|
||||||
|
|
||||||
|
## ASO-Keywords (nicht im Titel wiederholen)
|
||||||
|
|
||||||
|
`artillery`, `tank duel`, `panzer spiel`, `rundenbasiert`, `worms`, `scorched`, `strategie`,
|
||||||
|
`duell`, `kanone`, `zerstörbare landschaft`
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
Executable
+43
@@ -0,0 +1,43 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Builds a Play-ready App Bundle plus the native debug symbols.
|
||||||
|
set -euo pipefail
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
export ANDROID_NDK_HOME="${ANDROID_NDK_HOME:-$HOME/Android/Sdk/ndk/28.2.13676358}"
|
||||||
|
|
||||||
|
echo '==> Rust release libraries'
|
||||||
|
cargo ndk --platform 24 -t arm64-v8a -t armeabi-v7a -o app/android/app/src/main/jniLibs build --release -p ffi
|
||||||
|
|
||||||
|
for abi in arm64-v8a armeabi-v7a; do
|
||||||
|
so="app/android/app/src/main/jniLibs/$abi/libffi.so"
|
||||||
|
# 16 KB pages are mandatory for 64-bit ABIs; 32-bit ARM still uses 4 KB.
|
||||||
|
case "$abi" in
|
||||||
|
arm64-v8a|x86_64) expect=0x4000 ;;
|
||||||
|
*) expect=0x1000 ;;
|
||||||
|
esac
|
||||||
|
if readelf -lW "$so" | awk -v e="$expect" '$1=="LOAD" && $NF!=e {found=1} END{exit !found}'; then
|
||||||
|
echo "ERROR: $abi is not aligned to $expect" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "OK: $abi aligned to $expect ($(stat -c%s "$so") bytes)"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo '==> Native debug symbols (unstripped)'
|
||||||
|
rm -rf build/native-symbols
|
||||||
|
mkdir -p build/native-symbols
|
||||||
|
for abi in arm64-v8a armeabi-v7a; do
|
||||||
|
mkdir -p "build/native-symbols/$abi"
|
||||||
|
cp "app/android/app/src/main/jniLibs/$abi/libffi.so" "build/native-symbols/$abi/"
|
||||||
|
done
|
||||||
|
(cd build/native-symbols && zip -qr ../native-debug-symbols.zip .)
|
||||||
|
echo "symbols: $(stat -c%s build/native-debug-symbols.zip) bytes"
|
||||||
|
|
||||||
|
echo '==> Flutter bundle (AAB)'
|
||||||
|
(cd app && flutter build appbundle --release)
|
||||||
|
|
||||||
|
AAB=app/build/app/outputs/bundle/release/app-release.aab
|
||||||
|
echo "aab: $(stat -c%s "$AAB") bytes"
|
||||||
|
unzip -l "$AAB" | grep -E 'lib/|AndroidManifest' | head -8
|
||||||
|
|
||||||
|
echo '==> Release APK for device smoke test'
|
||||||
|
(cd app && flutter build apk --release --target-platform android-arm64)
|
||||||
|
echo "apk: $(stat -c%s app/build/app/outputs/flutter-apk/app-release.apk) bytes"
|
||||||
@@ -9,9 +9,15 @@ cargo ndk --platform 24 \
|
|||||||
build --release -p ffi
|
build --release -p ffi
|
||||||
for abi in arm64-v8a armeabi-v7a x86_64; do
|
for abi in arm64-v8a armeabi-v7a x86_64; do
|
||||||
so="app/android/app/src/main/jniLibs/$abi/libffi.so"
|
so="app/android/app/src/main/jniLibs/$abi/libffi.so"
|
||||||
if readelf -lW "$so" | awk '$1=="LOAD" && $NF!="0x4000" {found=1} END{exit !found}'; then
|
# 16 KB pages are mandatory for 64-bit ABIs; 32-bit ARM still uses 4 KB.
|
||||||
echo "ERROR: $abi not 16 KB aligned" >&2
|
case "$abi" in
|
||||||
|
arm64-v8a|x86_64) expect=0x4000 ;;
|
||||||
|
*) expect=0x1000 ;;
|
||||||
|
esac
|
||||||
|
if readelf -lW "$so" | awk -v e="$expect" '$1=="LOAD" && $NF!=e {found=1} END{exit !found}'; then
|
||||||
|
echo "ERROR: $abi is not aligned to $expect" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "OK: $abi aligned to $expect ($(stat -c%s "$so") bytes)"
|
||||||
done
|
done
|
||||||
echo 'OK: all ABIs 16 KB aligned'
|
echo 'OK: all ABIs 16 KB aligned'
|
||||||
|
|||||||
Reference in New Issue
Block a user