Skip to content

Commit bb06fce

Browse files
committed
Fixed #62
1 parent a67f9b2 commit bb06fce

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/androidbuild/apk.zig

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,21 @@ fn doInstallApk(apk: *Apk) std.mem.Allocator.Error!*Step.InstallFile {
359359
// Add assets
360360
for (apk.assets.items) |asset| {
361361
switch (asset) {
362-
.directory => |asset_dir| {
362+
.directory => |asset_dir_path| {
363363
aapt2link.addArg("-A");
364-
aapt2link.addDirectoryArg(asset_dir.source);
364+
aapt2link.addDirectoryArg(asset_dir_path.source);
365+
366+
var asset_dir = try std.fs.cwd().openDir(asset_dir_path.source, .{ .iterate = true });
367+
defer asset_dir.close();
368+
369+
var walker = try asset_dir.walk(b.allocator);
370+
defer walker.deinit();
371+
372+
while (try walker.next()) |entry| {
373+
if (entry.kind == .file) {
374+
aapt2link.addFileInput(std.fs.path.join(b.allocator, &.{ asset_dir_path, entry.path }));
375+
}
376+
}
365377
}
366378
}
367379
}

0 commit comments

Comments
 (0)