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: [gradle-plugin] 3rd party lib dependency substitution #37445

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ internal object DependencyUtils {
.using(it.module("${groupString}:hermes-android:${versionString}"))
.because(
"The hermes-engine artifact was deprecated in favor of hermes-android due to https://github.com/facebook/react-native/issues/35210.")
if (groupString != DEFAULT_GROUP_STRING) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please update this test (or better create a new one):
configureDependencies_withVersionStringAndGroupString_appliesOnAllProjects

Specifically you should assert that com.facebook.react:react-android and com.facebook.react:hermes-android are not in the forced modules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will need a different test, as this change does not appear to have any effect on the forced modules.

it.substitute(it.module("com.facebook.react:react-android"))
.using(it.module("${groupString}:react-android:${versionString}"))
.because("The react-android dependency was modified to use the correct Maven group.")
it.substitute(it.module("com.facebook.react:hermes-android"))
.using(it.module("${groupString}:hermes-android:${versionString}"))
.because("The hermes-android dependency was modified to use the correct Maven group.")
}
}
configuration.resolutionStrategy.force(
"${groupString}:react-android:${versionString}",
Expand Down