Skip to content

Commit

Permalink
Upgrade to ReactNative 0.71.8
Browse files Browse the repository at this point in the history
  • Loading branch information
adam1929 committed May 23, 2023
1 parent 9080383 commit 87ade37
Show file tree
Hide file tree
Showing 20 changed files with 3,390 additions and 3,038 deletions.
30 changes: 17 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

buildscript {
ext {
kotlinVersion = "1.7.20"
kotlin_version = "1.7.20"
}

Expand All @@ -22,29 +23,34 @@ buildscript {
if (project == rootProject) {
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.2.1"
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath("com.facebook.react:react-native-gradle-plugin")
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'kotlin-android'
apply plugin: "com.facebook.react"

def DEFAULT_COMPILE_SDK_VERSION = 31
def DEFAULT_BUILD_TOOLS_VERSION = '30.0.2'
def DEFAULT_COMPILE_SDK_VERSION = 33
def DEFAULT_BUILD_TOOLS_VERSION = '33.0.2'
def DEFAULT_MIN_SDK_VERSION = 23
def DEFAULT_TARGET_SDK_VERSION = 31
def DEFAULT_TARGET_SDK_VERSION = 33

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
Expand Down Expand Up @@ -75,10 +81,6 @@ android {
repositories {
// ref: https://www.baeldung.com/maven-local-repository
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// Android JSC is installed from npm
url "$rootDir/../node_modules/jsc-android/dist"
Expand All @@ -89,19 +91,21 @@ repositories {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules
implementation "com.facebook.react:react-android:0.71.8"
implementation 'com.exponea.sdk:sdk:3.6.1'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.danilopianini:gson-extras:0.2.2'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

testImplementation 'junit:junit:4.12'
testImplementation 'androidx.test:core:1.2.0'
testImplementation "org.robolectric:robolectric:4.2"
testImplementation 'androidx.test:core:1.4.0'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.2.40'
testImplementation "org.robolectric:robolectric:4.7.3"
testImplementation "io.mockk:mockk:1.9.3"
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.4'
}

afterEvaluate {
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ org.gradle.jvmargs=-Xmx4608m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.useAndroidX=true

android.enableJetifier=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
includeBuild('../node_modules/react-native-gradle-plugin')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import android.content.Context
import android.view.View
import android.view.ViewGroup.OnHierarchyChangeListener
import android.widget.Button
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener
import com.exponea.sdk.models.MessageItem
import com.exponea.sdk.services.DefaultAppInboxProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import io.mockk.every
import io.mockk.mockkObject
import io.mockk.unmockkAll
import io.mockk.verify
import java.util.Date
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
Expand Down
1 change: 1 addition & 0 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"

import com.android.build.OutputFile

Expand Down
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package="com.exponea.example">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

<application
android:name=".MainApplication"
Expand Down
15 changes: 6 additions & 9 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

buildscript {
ext {
buildToolsVersion = "30.0.2"
buildToolsVersion = "33.0.2"
minSdkVersion = 23
compileSdkVersion = 31
targetSdkVersion = 31
compileSdkVersion = 33
targetSdkVersion = 33
}
repositories {
google()
Expand All @@ -15,9 +15,10 @@ buildscript {
}
}
dependencies {
classpath('com.android.tools.build:gradle:7.0.4')
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
classpath("com.facebook.react:react-native-gradle-plugin")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -27,10 +28,6 @@ allprojects {
repositories {
mavenLocal()
mavenCentral()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
Expand Down
1 change: 1 addition & 0 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryErr
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
hermesEnabled=false
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Feb 10 12:17:57 CET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
1 change: 1 addition & 0 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
rootProject.name = 'example'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
Loading

0 comments on commit 87ade37

Please sign in to comment.