Skip to content

Refactor and decouple Android Sdk tools from Android Apk #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
silbinarywolf opened this issue May 11, 2025 · 0 comments · May be fixed by #38
Open

Refactor and decouple Android Sdk tools from Android Apk #36

silbinarywolf opened this issue May 11, 2025 · 0 comments · May be fixed by #38

Comments

@silbinarywolf
Copy link
Owner

silbinarywolf commented May 11, 2025

Description

const android_tools = android.Tools.create(b, .{
    .api_level = .android15,
    .build_tools_version = "35.0.1",
    .ndk_version = "29.0.13113456",
});
const apk = android.APK.create(b, android_tools);

I propose that we split out api_level and ndk_version into something like:

const android_sdk: android.Sdk = android.Sdk.create(b, .{}); // <- Second parameter will likely be an empty struct but we'll add options later if need be.
const apk = android_sdk.createApk(b, .{
    // .api_level = .android15, // <- Maybe even possibly deprecate and just use the `Target.Query.android_api_level`
    .build_tools_version = "35.0.1",
    .ndk_version = "29.0.13113456",
});

From there, it would be nice to add additional machinery like being able to invoke commands like sdkmanager via the newly created android.Sdk through Zig to avoid needing to think about setting up environment variables like $ANDROID_HOME and $JDK_PATH.

@silbinarywolf silbinarywolf linked a pull request May 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant