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: backwards compatibility with older AGPs #164

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 1 addition & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ def safeExtGet(prop, fallback) {
}

android {
// Compatibility for AGP v. <4.2/Gradle 8
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()

Choose a reason for hiding this comment

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

You are removing the declaration of agpVersion which is used at line 50😲

Choose a reason for hiding this comment

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

@Looskie Also on rn versions < 0.70 pod install & android build seems to fail with below error (package version - 6.5.0). I'm not sure where issues for this package are tracked as I don't see any Issues section for this repo.

Following this comment react-native-community/cli#1984 (comment), adding package name property seems to fix the issue

Screenshot 2024-02-28 at 4 39 40 PM

if (agpVersion >= 7) {
namespace 'com.intercom.reactnative'
}
namespace 'com.intercom.reactnative'

compileSdkVersion safeExtGet('IntercomReactNative_compileSdkVersion', 34)
defaultConfig {
Expand Down