also looking at this
feat(android): getDeviceInfo in Zig, and the JNI calls it needed
#137
3 files
+741
-0
| @@ -413,6 +413,18 @@ pub fn build(b: *std.Build) void { | ||
| 413 | 413 | }); |
| 414 | 414 | const run_jni_tests = b.addRunArtifact(jni_tests); |
| 415 | 415 | |
| 416 | // The Android bridge modules. Rooted at the device module because it is | |
| 417 | // the only one so far; a second joins by being imported from here, the way | |
| 418 | // `ios.zig` gathers the iOS ones. | |
| 419 | const android_bridge_tests = b.addTest(.{ | |
| 420 | .root_module = b.createModule(.{ | |
| 421 | .root_source_file = b.path("src/bridge_android_device.zig"), | |
| 422 | .target = target, | |
| 423 | .optimize = optimize, | |
| 424 | }), | |
| 425 | }); | |
| 426 | const run_android_bridge_tests = b.addRunArtifact(android_bridge_tests); | |
| 427 | ||
| 416 | 428 | ios_conformance_tests.root_module.addAnonymousImport("CraftApp.swift", .{ |
| 417 | 429 | .root_source_file = b.path("../ios/templates/CraftApp.swift"), |
| 418 | 430 | }); |
| @@ -1526,6 +1538,7 @@ pub fn build(b: *std.Build) void { | ||
| 1526 | 1538 | } |
| 1527 | 1539 | test_step.dependOn(&run_ios_conformance_tests.step); |
| 1528 | 1540 | test_step.dependOn(&run_jni_tests.step); |
| 1541 | test_step.dependOn(&run_android_bridge_tests.step); | |
| 1529 | 1542 | test_step.dependOn(&run_menubar_tests.step); |
| 1530 | 1543 | test_step.dependOn(&run_components_tests.step); |
| 1531 | 1544 | test_step.dependOn(&run_gpu_tests.step); |
| @@ -2202,6 +2215,7 @@ pub fn build(b: *std.Build) void { | ||
| 2202 | 2215 | // second one: `jni_runtime.zig` is the only way anything here reaches Java, |
| 2203 | 2216 | // so a run that skipped it would not be an Android test run. |
| 2204 | 2217 | test_android_step.dependOn(&run_jni_tests.step); |
| 2218 | test_android_step.dependOn(&run_android_bridge_tests.step); | |
| 2205 | 2219 | |
| 2206 | 2220 | // Add Android tests to the main test step |
| 2207 | 2221 | test_step.dependOn(&run_android_tests.step); |