|
| 1 | +# android-games-sdk |
| 2 | + |
| 3 | +This is an imported copy of the native "prefab" source for `GameActivity` and |
| 4 | +`GameTextInput`, from our fork of Google's |
| 5 | +[android-games-sdk](https://github.com/rust-mobile/android-games-sdk). |
| 6 | + |
| 7 | +We use an external fork to track our integration patches on top of the Android |
| 8 | +Game Development Kit (AGDK) in a way that it is easier to update to new upstream |
| 9 | +versions. It also makes it easier to try and upstream changes when we fix bugs. |
| 10 | + |
| 11 | +## Updating to new agdk version checklist |
| 12 | + |
| 13 | +This is a basic checklist for things that need to be done when updating to a new |
| 14 | +agdk version: |
| 15 | + |
| 16 | +- [ ] Create a new integration branch based on our last integrated branch and |
| 17 | + rebase that on the latest *release* branch from Google: |
| 18 | + |
| 19 | + ```bash |
| 20 | + git clone git@github.com:rust-mobile/android-games-sdk.git |
| 21 | + cd android-games-sdk |
| 22 | + git remote add google https://android.googlesource.com/platform/frameworks/opt/gamesdk |
| 23 | + git fetch google |
| 24 | + git checkout -b android-activity-5.0.0 origin/android-activity-4.0.0 |
| 25 | + git rebase --onto google/android-games-sdk-game-activity-release <base> |
| 26 | + # (where <base> is the upstream commit ID below our stack of integration patches) |
| 27 | + ``` |
| 28 | + |
| 29 | +- [ ] Set the `ANDROID_GAMES_SDK` environment variable so you can build |
| 30 | + android-activity against your external games-sdk branch while updating. |
| 31 | +- [ ] Re-generate the `GameActivity` FFI bindings with `./generate-bindings.sh` |
| 32 | + (this can be done with `ANDROID_GAMES_SDK` set in your environment and also |
| 33 | + repeated after importing) |
| 34 | +- [ ] Update [build.rs](../build.rs) with any new includes and src files |
| 35 | +- [ ] Update the `src/game-activity` backend as needed |
| 36 | +- [ ] Push a new `android-games-sdk` branch like `android-activity-5.0.0` that |
| 37 | + can be referenced when importing a copy into `android-activity` |
| 38 | +- [ ] Review and run `./import-games-sdk.sh` when ready to copy external AGDK |
| 39 | + code into this repo |
| 40 | +- [ ] Clearly reference the branch name and commit hash from the |
| 41 | + `android-games-sdk` repo in the `android-activity` commit that imports new |
| 42 | + games-sdk source. |
| 43 | +- [ ] Update CHANGELOG.md as required |
0 commit comments