You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes
- Decouple Android SDK from APK to allow for future improvements like
running `sdkmanager` from the Zig build system
- Update examples to support `zig build run -Dandroid` which will run
`adb install` + `adb shell start` logic for you
Fixes#36
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ jobs:
17
17
strategy:
18
18
matrix:
19
19
include:
20
-
- os: "ubuntu-22.04"
20
+
- os: "ubuntu-latest"
21
21
- os: "windows-latest"
22
22
- os: "macos-14"# arm64 as per table: https://github.com/actions/runner-images/blob/8a1eeaf6ac70c66f675a04078d1a7222edd42008/README.md#available-images
23
23
@@ -45,7 +45,7 @@ jobs:
45
45
# note(jae): 2024-09-15
46
46
# Uses download mirror first as preferred by Zig Foundation
pubconstAPILevel=@compileError("use android.ApiLevel instead of android.APILevel");
16
+
/// Deprecated: Use Sdk instead
17
+
pubconstTools=@compileError("Use android.Sdk instead of android.Tools");
18
+
/// Deprecated: Use Apk.Options instead.
19
+
pubconstToolsOptions=@compileError("Use android.Sdk.Options instead of android.Apk.Options with the Sdk.createApk method");
20
+
/// Deprecated: Use Sdk.CreateKey instead.
21
+
pubconstCreateKey=@compileError("Use android.Sdk.CreateKey instead of android.CreateKey. Change 'android_tools.createKeyStore(android.CreateKey.example())' to 'android_sdk.createKeyStore(.example)'");
22
+
/// Deprecated: Use Apk not APK
23
+
pubconstAPK=@compileError("Use android.Apk instead of android.APK");
18
24
19
25
/// NOTE: As well as providing the "android" module this declaration is required so this can be imported by other build.zig files
Copy file name to clipboardExpand all lines: examples/minimal/README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
As of 2024-09-19, this is a thrown together, very quick copy-paste of the minimal example from the original [ZigAndroidTemplate](https://github.com/ikskuh/ZigAndroidTemplate/blob/master/examples/minimal/main.zig) repository.
4
4
5
+
### Build and run natively on your operating system or install/run on Android device
6
+
7
+
```sh
8
+
zig build run # Native
9
+
zig build run -Dandroid # Android
10
+
```
11
+
5
12
### Build, install to test one target against a local emulator and run
Copy file name to clipboardExpand all lines: examples/sdl2/README.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
This is a copy-paste of [Andrew Kelly's SDL Zig Demo](https://github.com/andrewrk/sdl-zig-demo) but running on Android. The build is setup so you can also target your native operating system as well.
4
4
5
+
### Build and run natively on your operating system or install/run on Android device
6
+
7
+
```sh
8
+
zig build run # Native
9
+
zig build run -Dandroid # Android
10
+
```
11
+
5
12
### Build, install to test one target against a local emulator and run
6
13
7
14
```sh
@@ -17,12 +24,6 @@ zig build -Dandroid=true
17
24
adb install ./zig-out/bin/sdl-zig-demo.apk
18
25
```
19
26
20
-
### Build and run natively on your operating system
21
-
22
-
```sh
23
-
zig build run
24
-
```
25
-
26
27
### Uninstall your application
27
28
28
29
If installing your application fails with something like:
0 commit comments