Commit 9cd0fb1f authored by Yogev Ben David's avatar Yogev Ben David Committed by GitHub

Merge pull request #346 from wix/RN0.59.5

Uprgade example project react-native@0.59.5
parents 32ca65df 4bc2ca47
...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion '28.0.3' buildToolsVersion '28.0.0'
defaultConfig { defaultConfig {
minSdkVersion 19 minSdkVersion 19
...@@ -18,13 +18,12 @@ android { ...@@ -18,13 +18,12 @@ android {
} }
} }
dependencies { dependencies {
// Google's GCM. implementation "com.google.firebase:firebase-messaging:17.3.0"
// compile 'com.google.android.gms:play-services-gcm:15.0.1' implementation 'com.facebook.react:react-native:+'
compile "com.google.firebase:firebase-messaging:17.3.0"
compile 'com.facebook.react:react-native:+'
testCompile 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.+' testImplementation 'org.mockito:mockito-core:2.+'
testCompile 'org.robolectric:robolectric:3.1.4' testImplementation 'org.robolectric:robolectric:3.1.4'
} }
This diff is collapsed.
const exec = require('shell-utils').exec;
module.exports = { module.exports = {
elementByLabel: (label) => { elementByLabel: (label) => {
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
buildscript { buildscript {
ext { ext {
buildToolsVersion = "28.0.3" buildToolsVersion = "28.0.0"
minSdkVersion = 16 minSdkVersion = 16
compileSdkVersion = 28 compileSdkVersion = 28
targetSdkVersion = 28 targetSdkVersion = 26
supportLibVersion = "28.0.0" supportLibVersion = "28.0.0"
} }
repositories { repositories {
...@@ -16,6 +16,7 @@ buildscript { ...@@ -16,6 +16,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.3.1' classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.0.0'
} }
} }
...@@ -28,8 +29,9 @@ allprojects { ...@@ -28,8 +29,9 @@ allprojects {
maven { maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm // 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" }
} }
} }
......
/build /build
google-services.json
\ No newline at end of file
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 { android {
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion "28.0.3" buildToolsVersion "28.0.0"
defaultConfig { defaultConfig {
applicationId "com.wix.reactnativenotifications.app" applicationId "com.wix.reactnativenotifications.app"
...@@ -31,16 +41,21 @@ configurations.all { ...@@ -31,16 +41,21 @@ configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details -> resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested def requested = details.requested
if (requested.group == 'com.android.support') { if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) { details.useVersion "28.0.0"
details.useVersion "26.1.0"
} }
} }
}
configurations.all {
resolutionStrategy {
force 'org.webkit:android-jsc:r236355'
} }
} }
dependencies { dependencies {
// compile fileTree(dir: 'libs', include: ['*.jar']) // 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:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:design:28.0.0'
implementation 'com.facebook.react:react-native:+' implementation 'com.facebook.react:react-native:+'
...@@ -48,3 +63,5 @@ dependencies { ...@@ -48,3 +63,5 @@ dependencies {
testImplementation'junit:junit:4.12' testImplementation'junit:junit:4.12'
} }
apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
android:name=".MainApplication" android:name=".MainApplication"
android:allowBackup="false" android:allowBackup="false"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<meta-data <meta-data
......
include ':myapplication' include ':myapplication'
include ':react-native-notifications' include ':react-native-notifications'
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android') project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../../android')
\ No newline at end of file
...@@ -122,7 +122,7 @@ class NotificationsExampleApp extends Component { ...@@ -122,7 +122,7 @@ class NotificationsExampleApp extends Component {
title: 'Local Notification Title', title: 'Local Notification Title',
sound: 'chime.aiff', sound: 'chime.aiff',
category: 'SOME_CATEGORY', category: 'SOME_CATEGORY',
userInfo: { } userInfo: { link: 'localNotificationLink' },
}); });
} }
......
require('./example/index');
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment