React Native 0.61 #808

Merged
akinwale merged 2 commits from react-native-0.61 into master 2019-12-28 15:42:27 +01:00
24 changed files with 4981 additions and 22 deletions
Showing only changes of commit c59d76ad5d - Show all commits

View file

@ -406,6 +406,8 @@ main.py that loads it.''')
render('settings.gradle', 'settings.gradle')
render('gradle.properties', 'gradle.properties')
## google-services.json for firebase
render('google-services.json', 'google-services.json')

View file

@ -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-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip

View file

@ -6,7 +6,7 @@ buildscript {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
}
}
@ -21,6 +21,10 @@ allprojects {
// All of React Native (JS, Android binaries) is installed from npm
url "$rootDir/react/node_modules/react-native/android"
}
maven {
// Android JSC is installed from npm
url("$rootDir/react/node_modules/jsc-android/dist")
}
flatDir {
dirs 'libs'
}
@ -29,6 +33,14 @@ allprojects {
apply plugin: 'com.android.application'
project.ext.react = [
enableHermes: true,
entryFile: "index.js"
]
def enableHermes = project.ext.react.get("enableHermes", false);
def jscFlavor = 'org.webkit:android-jsc:+'
android {
compileSdkVersion {{ android_api }}
buildToolsVersion '{{ build_tools_version }}'
@ -122,6 +134,15 @@ dependencies {
compile '{{ depend }}'
{%- endfor %}
{%- endif %}
if (enableHermes) {
def hermesPath = "$rootDir/react/node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
apply plugin: 'com.google.gms.google-services'

View file

@ -6,7 +6,7 @@ buildscript {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
}
}
@ -21,6 +21,10 @@ allprojects {
// All of React Native (JS, Android binaries) is installed from npm
url "$rootDir/react/node_modules/react-native/android"
}
maven {
// Android JSC is installed from npm
url("$rootDir/react/node_modules/jsc-android/dist")
}
flatDir {
dirs 'libs'
}
@ -29,6 +33,14 @@ allprojects {
apply plugin: 'com.android.application'
project.ext.react = [
enableHermes: true,
entryFile: "index.js"
]
def enableHermes = project.ext.react.get("enableHermes", false);
def jscFlavor = 'org.webkit:android-jsc:+'
android {
compileSdkVersion {{ android_api }}
buildToolsVersion '{{ build_tools_version }}'
@ -122,6 +134,15 @@ dependencies {
compile '{{ depend }}'
{%- endfor %}
{%- endif %}
if (enableHermes) {
def hermesPath = "$rootDir/react/node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
apply plugin: 'com.google.gms.google-services'

View file

@ -0,0 +1,2 @@
android.useAndroidX=true
android.enableJetifier=true

View file

@ -8,8 +8,8 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;

View file

@ -10,8 +10,8 @@ import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
import android.util.Log;
import com.google.firebase.analytics.FirebaseAnalytics;

View file

@ -14,8 +14,8 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Binder;
import android.os.IBinder;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
import android.util.Log;
import java.io.BufferedReader;

View file

@ -1,6 +1,6 @@
package io.lbry.browser;
import android.support.v4.content.FileProvider;
import androidx.core.content.FileProvider;
public class LocalFileProvider extends FileProvider {

View file

@ -20,9 +20,9 @@ import android.net.Uri;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.provider.Settings;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;
import android.telephony.SmsMessage;
import android.telephony.TelephonyManager;
import android.widget.Toast;
@ -43,6 +43,7 @@ import com.facebook.react.modules.core.PermissionAwareActivity;
import com.facebook.react.modules.core.PermissionListener;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.react.ReactRootView;
import com.facebook.soloader.SoLoader;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
import com.rnfs.RNFSPackage;
@ -138,6 +139,8 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
super.onCreate(savedInstanceState);
currentActivity = this;
SoLoader.init(this, false);
// Register the stop service receiver (so that we close the activity if the user requests the service to stop)
registerStopReceiver();
@ -158,6 +161,7 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
mReactRootView = new RNGestureHandlerEnabledRootView(this);
mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setCurrentActivity(this)
.setBundleAssetName("index.android.bundle")
.setJSMainModulePath("index")
.addPackage(new MainReactPackage())
@ -171,7 +175,7 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
.addPackage(new RNGestureHandlerPackage())
.addPackage(new SnackbarPackage())
.addPackage(new LbryReactPackage())
.setUseDeveloperSupport(true)
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
mReactRootView.startReactApplication(mReactInstanceManager, "LBRYApp", null);

View file

@ -10,9 +10,9 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
@ -66,7 +66,7 @@ public class BackgroundMediaModule extends ReactContextBaseJavaModule {
.setGroup(LbrynetService.GROUP_SERVICE)
.setOngoing(!paused)
.setSmallIcon(paused ? android.R.drawable.ic_media_pause : android.R.drawable.ic_media_play)
.setStyle(new android.support.v4.media.app.NotificationCompat.MediaStyle()
.setStyle(new androidx.media.app.NotificationCompat.MediaStyle()
.setShowActionsInCompactView(0))
.addAction(paused ? android.R.drawable.ic_media_play : android.R.drawable.ic_media_pause,
paused ? "Play" : "Pause",

View file

@ -12,10 +12,10 @@ import android.Manifest;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.support.v4.content.FileProvider;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;
import android.telephony.TelephonyManager;
import android.view.View;
import android.view.WindowManager;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","VG","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CK","CR","HR","CU","CW","CY","CZ","CD","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","CI","JM","JP","JE","JO","KZ","KE","KI","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","KP","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","CG","RO","RU","RW","RE","BL","KN","LC","MF","PM","VC","WS","SM","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","KR","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","ST","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","VI","UY","UZ","VU","VA","VE","VN","WF","EH","YE","ZM","ZW","AX"]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
{
"FIXED_LINE": 0,
"MOBILE": 1,
"FIXED_LINE_OR_MOBILE": 2,
"TOLL_FREE": 3,
"PREMIUM_RATE": 4,
"SHARED_COST": 5,
"VOIP": 6,
"PERSONAL_NUMBER": 7,
"PAGER": 8,
"UAN": 9,
"VOICEMAIL": 10,
"UNKNOWN": -1
}

View file

@ -0,0 +1,281 @@
{
"activity": 61696,
"airplay": 61697,
"alert-circle": 61698,
"alert-octagon": 61699,
"alert-triangle": 61700,
"align-center": 61701,
"align-justify": 61702,
"align-left": 61703,
"align-right": 61704,
"anchor": 61705,
"aperture": 61706,
"archive": 61707,
"arrow-down": 61708,
"arrow-down-circle": 61709,
"arrow-down-left": 61710,
"arrow-down-right": 61711,
"arrow-left": 61712,
"arrow-left-circle": 61713,
"arrow-right": 61714,
"arrow-right-circle": 61715,
"arrow-up": 61716,
"arrow-up-circle": 61717,
"arrow-up-left": 61718,
"arrow-up-right": 61719,
"at-sign": 61720,
"award": 61721,
"bar-chart": 61722,
"bar-chart-2": 61723,
"battery": 61724,
"battery-charging": 61725,
"bell": 61726,
"bell-off": 61727,
"bluetooth": 61728,
"bold": 61729,
"book": 61730,
"book-open": 61731,
"bookmark": 61732,
"box": 61733,
"briefcase": 61734,
"calendar": 61735,
"camera": 61736,
"camera-off": 61737,
"cast": 61738,
"check": 61739,
"check-circle": 61740,
"check-square": 61741,
"chevron-down": 61742,
"chevron-left": 61743,
"chevron-right": 61744,
"chevron-up": 61745,
"chevrons-down": 61746,
"chevrons-left": 61747,
"chevrons-right": 61748,
"chevrons-up": 61749,
"chrome": 61750,
"circle": 61751,
"clipboard": 61752,
"clock": 61753,
"cloud": 61754,
"cloud-drizzle": 61755,
"cloud-lightning": 61756,
"cloud-off": 61757,
"cloud-rain": 61758,
"cloud-snow": 61759,
"code": 61760,
"codepen": 61761,
"codesandbox": 61972,
"coffee": 61762,
"columns": 61973,
"command": 61763,
"compass": 61764,
"copy": 61765,
"corner-down-left": 61766,
"corner-down-right": 61767,
"corner-left-down": 61768,
"corner-left-up": 61769,
"corner-right-down": 61770,
"corner-right-up": 61771,
"corner-up-left": 61772,
"corner-up-right": 61773,
"cpu": 61774,
"credit-card": 61775,
"crop": 61776,
"crosshair": 61777,
"database": 61778,
"delete": 61779,
"disc": 61780,
"dollar-sign": 61781,
"download": 61782,
"download-cloud": 61783,
"droplet": 61784,
"edit": 61785,
"edit-2": 61786,
"edit-3": 61787,
"external-link": 61788,
"eye": 61789,
"eye-off": 61790,
"facebook": 61791,
"fast-forward": 61792,
"feather": 61793,
"figma": 61970,
"file": 61794,
"file-minus": 61795,
"file-plus": 61796,
"file-text": 61797,
"film": 61798,
"filter": 61799,
"flag": 61800,
"folder": 61801,
"folder-minus": 61802,
"folder-plus": 61803,
"frown": 61804,
"gift": 61805,
"git-branch": 61806,
"git-commit": 61807,
"git-merge": 61808,
"git-pull-request": 61809,
"github": 61810,
"gitlab": 61811,
"globe": 61812,
"grid": 61813,
"hard-drive": 61814,
"hash": 61815,
"headphones": 61816,
"heart": 61817,
"help-circle": 61818,
"hexagon": 61974,
"home": 61819,
"image": 61820,
"inbox": 61821,
"info": 61822,
"instagram": 61823,
"italic": 61824,
"key": 61967,
"layers": 61825,
"layout": 61826,
"life-buoy": 61827,
"link": 61828,
"link-2": 61829,
"linkedin": 61830,
"list": 61831,
"loader": 61832,
"lock": 61833,
"log-in": 61834,
"log-out": 61835,
"mail": 61836,
"map": 61837,
"map-pin": 61838,
"maximize": 61839,
"maximize-2": 61840,
"meh": 61841,
"menu": 61842,
"message-circle": 61843,
"message-square": 61844,
"mic": 61845,
"mic-off": 61846,
"minimize": 61847,
"minimize-2": 61848,
"minus": 61849,
"minus-circle": 61850,
"minus-square": 61851,
"monitor": 61852,
"moon": 61853,
"more-horizontal": 61854,
"more-vertical": 61855,
"mouse-pointer": 61968,
"move": 61856,
"music": 61857,
"navigation": 61858,
"navigation-2": 61859,
"octagon": 61860,
"package": 61861,
"paperclip": 61862,
"pause": 61863,
"pause-circle": 61864,
"pen-tool": 61969,
"percent": 61865,
"phone": 61866,
"phone-call": 61867,
"phone-forwarded": 61868,
"phone-incoming": 61869,
"phone-missed": 61870,
"phone-off": 61871,
"phone-outgoing": 61872,
"pie-chart": 61873,
"play": 61874,
"play-circle": 61875,
"plus": 61876,
"plus-circle": 61877,
"plus-square": 61878,
"pocket": 61879,
"power": 61880,
"printer": 61881,
"radio": 61882,
"refresh-ccw": 61883,
"refresh-cw": 61884,
"repeat": 61885,
"rewind": 61886,
"rotate-ccw": 61887,
"rotate-cw": 61888,
"rss": 61889,
"save": 61890,
"scissors": 61891,
"search": 61892,
"send": 61893,
"server": 61894,
"settings": 61895,
"share": 61896,
"share-2": 61897,
"shield": 61898,
"shield-off": 61899,
"shopping-bag": 61900,
"shopping-cart": 61901,
"shuffle": 61902,
"sidebar": 61903,
"skip-back": 61904,
"skip-forward": 61905,
"slack": 61906,
"slash": 61907,
"sliders": 61908,
"smartphone": 61909,
"smile": 61910,
"speaker": 61911,
"square": 61912,
"star": 61913,
"stop-circle": 61914,
"sun": 61915,
"sunrise": 61916,
"sunset": 61917,
"tablet": 61975,
"tag": 61919,
"target": 61920,
"terminal": 61921,
"thermometer": 61922,
"thumbs-down": 61923,
"thumbs-up": 61924,
"toggle-left": 61925,
"toggle-right": 61926,
"trash": 61927,
"trash-2": 61928,
"trello": 61929,
"trending-down": 61930,
"trending-up": 61931,
"triangle": 61932,
"truck": 61933,
"tv": 61934,
"twitter": 61935,
"type": 61936,
"umbrella": 61937,
"underline": 61938,
"unlock": 61939,
"upload": 61940,
"upload-cloud": 61941,
"user": 61942,
"user-check": 61943,
"user-minus": 61944,
"user-plus": 61945,
"user-x": 61946,
"users": 61947,
"video": 61948,
"video-off": 61949,
"voicemail": 61950,
"volume": 61951,
"volume-1": 61952,
"volume-2": 61953,
"volume-x": 61954,
"watch": 61955,
"wifi": 61956,
"wifi-off": 61957,
"wind": 61958,
"x": 61959,
"x-circle": 61960,
"x-octagon": 61971,
"x-square": 61961,
"youtube": 61962,
"zap": 61963,
"zap-off": 61964,
"zoom-in": 61965,
"zoom-out": 61966
}