diff --git a/android/build.gradle b/android/build.gradle
index 2fdb45b1175a62a8df25a1d48d5d609484230472..0e3def547a8dcbe2902a8794bca141a93172b1a9 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 c77c19bda1ae6092c00391be4c9fdbc5313e414b..0000000000000000000000000000000000000000
--- a/android/reactnativenotification.iml
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- generateDebugSources
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 4ae317e4ef774d5254d9c43c28941dac12d832cc..3048e5154871cbcaf6295b0180f9cc2b3a077d9b 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 796b96d1c402326528b4ba3c12ee9d92d0e212e9..65d12b95469b46008614734d430ea36c91c3f1d9 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 755d36b3a2696ab6519dac94f1aca47a55ee516c..01a97b4f5bc0c488971eee7aa056faad00b2041d 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 3df23d464dc64562b5bc9578f41bfe28c284a706..5b14d1a61c145169b16b6d9521c08d63fe94547c 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">