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(android): add namespace to build.gradle for android gradle plugin 8 compatibility #4229

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions detox/android/detox/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def _rnNativeArtifact = rnInfo.isRN71OrHigher
: 'com.facebook.react:react-native:+'

android {
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
if (agpVersion >= 7) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

One more question, @mikehardy. You state in the title about Gradle Plugin 8+, but here you check >= 7, could you explain, please?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mikehardy would you be kind to answer, please? I don't have the intention to keep this PR pending for long, and your prompt answer will help me merge it sooner. Thanks! 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I didn't see this until just now - this wasn't just a breaking change, it was a non-backwards-compatible breaking change (that is, it will only work on AGP8+), but people may still use it on AGP7! So this was the only way the community came up with for it to work on old and new at the same time. Pain in the butt! 😆

namespace "com.wix.detox"
}
compileSdkVersion _compileSdkVersion
buildToolsVersion _buildToolsVersion

Expand Down