From c06c806a712c4e78efa599d2bd9d1c284c6edb00 Mon Sep 17 00:00:00 2001 From: yogevbd Date: Sat, 27 Jul 2019 22:28:01 +0300 Subject: [PATCH] Uprgade react-native@0.59.5 --- android/build.gradle | 15 +- android/reactnativenotification.iml | 154 ------------------ example/android/build.gradle | 8 +- example/android/myapplication/.gitignore | 1 + example/android/myapplication/build.gradle | 27 ++- .../src/main/AndroidManifest.xml | 1 + example/android/settings.gradle | 2 +- example/index.ios.js | 2 +- index.js => index.android.js | 0 index.ios.js | 1 + package.json | 3 +- 11 files changed, 41 insertions(+), 173 deletions(-) delete mode 100644 android/reactnativenotification.iml rename index.js => index.android.js (100%) create mode 100644 index.ios.js diff --git a/android/build.gradle b/android/build.gradle index 2fdb45b..0e3def5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion 27 - buildToolsVersion '28.0.3' + buildToolsVersion '28.0.0' defaultConfig { minSdkVersion 19 @@ -18,13 +18,12 @@ android { } } + dependencies { - // Google's GCM. -// compile 'com.google.android.gms:play-services-gcm:15.0.1' - compile "com.google.firebase:firebase-messaging:17.3.0" - compile 'com.facebook.react:react-native:+' + implementation "com.google.firebase:firebase-messaging:17.3.0" + implementation 'com.facebook.react:react-native:+' - testCompile 'junit:junit:4.12' - testCompile 'org.mockito:mockito-core:2.+' - testCompile 'org.robolectric:robolectric:3.1.4' + testImplementation 'junit:junit:4.12' + testImplementation 'org.mockito:mockito-core:2.+' + testImplementation 'org.robolectric:robolectric:3.1.4' } diff --git a/android/reactnativenotification.iml b/android/reactnativenotification.iml deleted file mode 100644 index c77c19b..0000000 --- a/android/reactnativenotification.iml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example/android/build.gradle b/example/android/build.gradle index 4ae317e..3048e51 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -2,10 +2,10 @@ buildscript { ext { - buildToolsVersion = "28.0.3" + buildToolsVersion = "28.0.0" minSdkVersion = 16 compileSdkVersion = 28 - targetSdkVersion = 28 + targetSdkVersion = 26 supportLibVersion = "28.0.0" } repositories { @@ -16,6 +16,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.3.1' + classpath 'com.google.gms:google-services:4.0.0' } } @@ -28,8 +29,9 @@ allprojects { maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url "$rootDir/../node_modules/react-native/android" + url "$rootDir/../../node_modules/react-native/android" } + maven { url "$rootDir/../../node_modules/jsc-android/dist" } } } diff --git a/example/android/myapplication/.gitignore b/example/android/myapplication/.gitignore index 796b96d..65d12b9 100644 --- a/example/android/myapplication/.gitignore +++ b/example/android/myapplication/.gitignore @@ -1 +1,2 @@ /build +google-services.json \ No newline at end of file diff --git a/example/android/myapplication/build.gradle b/example/android/myapplication/build.gradle index 755d36b..01a97b4 100644 --- a/example/android/myapplication/build.gradle +++ b/example/android/myapplication/build.gradle @@ -1,8 +1,18 @@ -apply plugin: 'com.android.application' +apply plugin: "com.android.application" + +project.ext.react = [ + root : "../../../", + entryFile: "index.js", + bundleAssetName: "index.android.bundle", + bundleInAlpha: true, + bundleInBeta: true +] + +apply from: "../../../node_modules/react-native/react.gradle" android { compileSdkVersion 28 - buildToolsVersion "28.0.3" + buildToolsVersion "28.0.0" defaultConfig { applicationId "com.wix.reactnativenotifications.app" @@ -31,16 +41,21 @@ configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == 'com.android.support') { - if (!requested.name.startsWith("multidex")) { - details.useVersion "26.1.0" - } + details.useVersion "28.0.0" } } } +configurations.all { + resolutionStrategy { + force 'org.webkit:android-jsc:r236355' + } +} + dependencies { // compile fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.google.firebase:firebase-core:16.0.0' implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.facebook.react:react-native:+' @@ -48,3 +63,5 @@ dependencies { testImplementation'junit:junit:4.12' } + +apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/example/android/myapplication/src/main/AndroidManifest.xml b/example/android/myapplication/src/main/AndroidManifest.xml index 3df23d4..5b14d1a 100644 --- a/example/android/myapplication/src/main/AndroidManifest.xml +++ b/example/android/myapplication/src/main/AndroidManifest.xml @@ -9,6 +9,7 @@ android:name=".MainApplication" android:allowBackup="false" android:icon="@mipmap/ic_launcher" + android:usesCleartextTraffic="true" android:label="@string/app_name" android:theme="@style/AppTheme">