-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into unsubscribeFromEmails-ios-issue
- Loading branch information
Showing
25 changed files
with
41,576 additions
and
9,093 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
def packageJsonFile = file('../package.json') | ||
def packageJson = new groovy.json.JsonSlurper().parseText(packageJsonFile.text) | ||
def packageVersion = '"' + packageJson.version + '"' | ||
def packageJsonFile = file('../package.json') | ||
def packageJson = new groovy.json.JsonSlurper().parseText(packageJsonFile.text) | ||
def packageVersion = '"' + packageJson.version + '"' | ||
|
||
|
||
buildscript { | ||
if (project == rootProject) { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
ext { | ||
buildToolsVersion = "34.0.0" | ||
minSdkVersion = 21 | ||
compileSdkVersion = 34 | ||
targetSdkVersion = 34 | ||
ndkVersion = "25.1.8937393" | ||
kotlinVersion = "1.8.0" | ||
} | ||
if (project == rootProject) { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.5.3' | ||
} | ||
dependencies { | ||
classpath("com.android.tools.build:gradle") | ||
classpath("com.facebook.react:react-native-gradle-plugin") | ||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") | ||
} | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
def safeExtGet(prop, fallback) { | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
} | ||
|
||
android { | ||
// Compatibility for AGP v. <4.2/Gradle 8 | ||
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger() | ||
if (agpVersion >= 7) { | ||
namespace 'com.intercom.reactnative' | ||
} | ||
namespace 'com.intercom.reactnative' | ||
compileSdk rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
compileSdkVersion safeExtGet('IntercomReactNative_compileSdkVersion', 34) | ||
defaultConfig { | ||
minSdkVersion safeExtGet('IntercomReactNative_minSdkVersion', 21) | ||
targetSdkVersion safeExtGet('IntercomReactNative_targetSdkVersion', 34) | ||
versionCode 1 | ||
versionName "1.0" | ||
buildConfigField 'String', 'INTERCOM_VERSION_NAME', packageVersion | ||
} | ||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
buildConfigField 'String', 'INTERCOM_VERSION_NAME', packageVersion | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
lintOptions { | ||
disable 'GradleCompatible' | ||
} | ||
|
||
if (agpVersion < 8) { | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
lintOptions { | ||
disable 'GradleCompatible' | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
maven { | ||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | ||
url("$rootDir/../node_modules/react-native/android") | ||
} | ||
google() | ||
mavenCentral() | ||
mavenLocal() | ||
maven { | ||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | ||
url("$rootDir/../node_modules/react-native/android") | ||
} | ||
google() | ||
} | ||
|
||
dependencies { | ||
//noinspection GradleDynamicVersion | ||
implementation "com.facebook.react:react-native:+" // From node_modules | ||
implementation "com.google.firebase:firebase-messaging:${safeExtGet('firebaseMessagingVersion', '20.2.+')}" | ||
implementation 'io.intercom.android:intercom-sdk:15.9.+' | ||
//noinspection GradleDynamicVersion | ||
implementation "com.facebook.react:react-native:+" // From node_modules | ||
implementation "com.google.firebase:firebase-messaging:${safeExtGet('firebaseMessagingVersion', '20.2.+')}" | ||
implementation 'io.intercom.android:intercom-sdk:15.9.+' | ||
} |
Oops, something went wrong.