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

fix(cli): correct migration of package from AndroidManifest.xml to build.gradle #6607

Merged
merged 1 commit into from
May 22, 2023

Conversation

davidnussio
Copy link
Contributor

When AndroidManifest.xml contains other attributes after the package, the regex matches all attributes and writes all of them into build.gradle.

If AndroidManifest.xml contains:

app/build.gradle will contains xmlns:android property and 'Upgrading gradle wrapper files' fails
android {
namespace "com.example.app" xmlns:android="http://schemas.android.com/apk/res/android"

When AndroidManifest.xml contains other attributes after the package, the regex matches all attributes and writes all of them into build.gradle.

If AndroidManifest.xml contains:
<manifest package="com.example.app" xmlns:android="http://schemas.android.com/apk/res/android">

app/build.gradle will contains xmlns:android property and 'Upgrading gradle wrapper files' fails
 android {
    namespace "com.example.app" xmlns:android="http://schemas.android.com/apk/res/android"
Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

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

good catch, thanks!

@jcesarmobile jcesarmobile changed the title fix(cli): migrate android AndroidManifest.xml and gradle.build fix(cli): correct migration of package from AndroidManifest.xml to build.gradle May 22, 2023
@jcesarmobile jcesarmobile merged commit 1c26a3e into ionic-team:main May 22, 2023
7 checks passed
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