-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade of React-Native and Dependencies for Gradle 8 and Kotlin 1.8.…
…0 Compatibility (#174) * Upgraded React-Native to 0.73.4 in the example. * Upgraded React-Native to 0.73.4 & dependencies in the Android. * Updated config.yml * Fixed compile issue * Lint fix * Lint fix * Removed yarn.lock * Tried fixing missing imports * Tried fixing CI * Tried fixing CI * Tried fixing CI * Tried fixing CI * Updated dependencies
- Loading branch information
1 parent
c2d0a56
commit fcbbb16
Showing
25 changed files
with
41,570 additions
and
9,090 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.