Skip to content
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

ndk-build: Add manifest attributes android:extractNativeLibs, android:usesCleartextTraffic and android:alwaysRetainTaskState #15

Merged

Conversation

James2022-rgb
Copy link
Contributor

@James2022-rgb James2022-rgb commented Jan 7, 2023

This PR adds support for manifest attributes:
Application element:

  • android:extractNativeLibs
  • android:usesCleartextTraffic

Activity element:

  • android:alwaysRetainTaskState

@James2022-rgb
Copy link
Contributor Author

Can this PR be merged ?

@MarijnS95 MarijnS95 changed the title Add support for manifest attributes: android:extractNativeLibs, `an… ndk-build: Add manifest attributes android:extractNativeLibs, android:usesCleartextTraffic and android:alwaysRetainTaskState Jun 28, 2023
@MarijnS95 MarijnS95 merged commit 8ce097b into rust-mobile:main Jun 28, 2023
20 checks passed
Comment on lines +154 to +155
# See https://developer.android.com/guide/topics/manifest/application-element#extractNativeLibs
extract_native_libs = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In hindsight we should have also used this property to steer whether libs are compiled in the APK

if self.config.disable_aapt_compression {
aapt.arg("-0").arg("");
}

Per the documentation linked for this property, libraries are stored uncompressed when they are not extracted by the installer. Right now I think one can create an invalid APK when setting extract_native_libs = false and building a non-debug (release) profile, which sets disable_aapt_compression = false:

disable_aapt_compression: is_debug_profile,

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 this pull request may close these issues.

None yet

2 participants