Move from NativeActivity to GameActivity #30
Labels
No labels
area/ai
area/build
area/character
area/combat
area/data
area/docs
area/game
area/net
area/ui
area/world
size
l
size
m
size
s
type
bug
type
design
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
icub3d/terra-redux-org#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deferred deliberately in
ADR 0002.
The APK currently hosts the game in
NativeActivity, which needs no Java and thereforeno Gradle —
android/build.shassembles it from the SDK build-tools alone. That was theright call for finding out whether the game runs at all, and it keeps what is in the APK
legible.
NativeActivityis the legacy path. Android actively develops GameActivity instead, andGameActivity handles text input and lifecycle properly where
NativeActivitydoes not.Cost
GameActivity needs the
androidx.gamesAAR, and an AAR needs Gradle, and Gradle bringsthe Android Gradle Plugin's entire dependency tree. That is the thing worth weighing:
a large, churning build dependency in exchange for correctness the game does not need
until it accepts text.
Cargo.tomlalready carries the feature switch —android-native-activitybecomesandroid-game-activity— so the Rust side of this is one line. The build system is thewhole job.
Trigger
Worth doing when the game first needs text input (naming a character, a save slot, a PvP
lobby), or sooner if a lifecycle bug turns out to be
NativeActivity's fault — see #25.