ndk icon indicating copy to clipboard operation
ndk copied to clipboard

Conditionally generate manifest with cargo features

Open zmerp opened this issue 4 years ago • 0 comments

cargo-apk should be able to use features (and maybe targets) to conditionally build the AndroidManifest.xml, in a similar way to gradle build flavors. My use-case is having different runtime_libs for different types of android devices.

Example:

[package.metadata.android]
build_targets = ["aarch64-linux-android"]

[package.'cfg(feature = "oculus")'.metadata.android]
runtime_libs = "deps/openxr/oculus"

[package.'cfg(feature = "vive")'.metadata.android]
runtime_libs = "deps/openxr/vive"

zmerp avatar Jan 11 '22 16:01 zmerp