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

Allow adding tags to AndroidManifest.xml from project.xml. #1814

Open
wants to merge 9 commits into
base: 8.3.0-Dev
Choose a base branch
from

Conversation

player-03
Copy link
Contributor

For instance, if you need to use an obscure tag like <uses-permission-sdk-23 />, this change will let you enter it into <config:android /> rather than having to make a template.

<config:android>
    <manifest>
        <uses-permission-sdk-23 android:name="android.permission.ACCESS_WIFI_STATE" android:maxSdkVersion="30" />
    </manifest>
</config:android>

The nesting shown here is all required, and it tells Lime where to put this custom tag. In this case, it will go inside the <manifest /> tag. <application /> and <activity /> are also available, and work similarly.

Resolves #1812.

Also, there's no need for `Reflect.hasField()`. We know it has the field, because we're iterating over `Reflect.fields()`.
For instance, `<config:android><manifest><uses-permission android:name="xyz" /></manifest></config:android>` will copy the `uses-permission` tag directly into the manifest. This allows you to specify attributes like `android:maxSdkVersion` that aren't normally available.
@player-03
Copy link
Contributor Author

Oh yeah, and I streamlined ConfigData a bunch. Guess I could split that out into a separate PR.

@player-03 player-03 linked an issue Jul 9, 2024 that may be closed by this pull request
@MAJigsaw77
Copy link
Contributor

I believe the versionName and versionCode are no longer required to be used in the AndroidManifest.xml as they are already used in the gradle file itself.

@MAJigsaw77
Copy link
Contributor

I believe the versionName and versionCode are no longer required to be used in the AndroidManifest.xml as they are already used in the gradle file itself.

Even sdl doesn't use them anymore.

@player-03
Copy link
Contributor Author

The documentation doesn't mention them being deprecated, and some of their guides tell you to use build.gradle while others point you to the manifest. I figure we might as well keep them in both places for now, until Google gets their documentation sorted out.

@player-03 player-03 changed the base branch from 8.2.0-Dev to 8.3.0-Dev October 3, 2024 21:10
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.

Add support for maxSdkVersion attribute in permission element.
2 participants