File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -363,16 +363,27 @@ fn doInstallApk(apk: *Apk) std.mem.Allocator.Error!*Step.InstallFile {
363363 aapt2link .addArg ("-A" );
364364 aapt2link .addDirectoryArg (asset_dir_path .source );
365365
366- var asset_dir = std .fs .cwd ().openDir (asset_dir_path .source .cwd_relative , .{ .iterate = true }) catch | err | @panic (@errorName (err ));
366+ const cwd = if (builtin .zig_version .major == 0 and builtin .zig_version .minor <= 15 ) std .fs .cwd () else std .Io .Dir .cwd ();
367+
368+ var asset_dir = (
369+ if (builtin .zig_version .major == 0 and builtin .zig_version .minor <= 15 )
370+ cwd .openDir (asset_dir_path .source .cwd_relative , .{ .iterate = true })
371+ else
372+ cwd .openDir (b .graph .io , asset_dir_path .source .cwd_relative , .{ .iterate = true })
373+ ) catch | err | @panic (@errorName (err ));
374+
367375 defer asset_dir .close ();
368376
369377 var walker = try asset_dir .walk (b .allocator );
370378 defer walker .deinit ();
371379
372- while (walker .next () catch | err | @panic (@errorName (err ))) | entry | {
373- if (entry .kind == .file ) {
374- aapt2link .addFileInput (try asset_dir_path .source .join (b .allocator , entry .path ));
375- }
380+ while ((
381+ if (builtin .zig_version .major == 0 and builtin .zig_version .minor <= 15 )
382+ walker .next ()
383+ else
384+ walker .next (b .graph .io )
385+ ) catch | err | @panic (@errorName (err ))) | entry | {
386+ if (entry .kind == .file ) aapt2link .addFileInput (try asset_dir_path .source .join (b .allocator , entry .path ));
376387 }
377388 }
378389 }
You can’t perform that action at this time.
0 commit comments