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

Replace Groovy XML library used for parsing AndroidManifest.xml #379

Merged
merged 2 commits into from
Apr 6, 2021

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Apr 1, 2021

Goal

Gradle 7 updated the language it uses to Groovy 3. Part of the changes in Groovy 3 involved a reorganisation of packages which affected the classes used for XML parsing, which results in NoSuchMethodError being thrown when running the plugin on Gradle 7.

To avoid this behaviour the plugin has been updated to use a Java XML parser instead.

Resolves #369

Changeset

Refactored AndroidManifestParser to use an XML parser supplied via Java instead.

Testing

Updated test matrix to run E2E tests against Gradle 7.0-rc-1, and added to unit test coverage.

@fractalwrench fractalwrench changed the title refactor: use Java APIs for parsing XML Replace Groovy XML library used for parsing AndroidManifest.xml Apr 1, 2021
@fractalwrench fractalwrench marked this pull request as ready for review April 1, 2021 11:56
Copy link
Member

@imjoehaines imjoehaines left a comment

Choose a reason for hiding this comment

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

Changes look good, but the Gradle version bump looks like it's broken Travis

@fractalwrench
Copy link
Contributor Author

fractalwrench commented Apr 6, 2021

It looks like there is a bug in the RN CLI gradle script which affects Gradle 7, and causes the test fixtures to immediately throw an exception: react-native-community/cli#1396

I will update our E2E tests to skip the react-native tests until this is resolved as there isn't a workaround.

@fractalwrench fractalwrench merged commit 443b28f into next Apr 6, 2021
@fractalwrench fractalwrench deleted the PLAT-6294/gradle-7-compat branch April 6, 2021 16:07
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