Skip to content

Commit 9bc82a6

Browse files
committed
🎉 upgrade react-native to 0.59.1
1 parent 8ba5eec commit 9bc82a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+3320
-3781
lines changed

.babelrc

-54
This file was deleted.

.editorconfig

-15
This file was deleted.

.eslintignore

-8
This file was deleted.

.eslintrc

-59
This file was deleted.

.flowconfig

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
[libs]
2525
node_modules/react-native/Libraries/react-native/react-native-interface.js
2626
node_modules/react-native/flow/
27-
node_modules/react-native/flow-github/
2827

2928
[options]
3029
emoji=true
@@ -67,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
6766
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6867

6968
[version]
70-
^0.78.0
69+
^0.92.0

README.md

-17
This file was deleted.
File renamed without changes.

mock/ant/chart.js __mock__/ant/chart.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import moment from "moment";
22

3-
// mock data
3+
// __mock__ data
44
const visitData = [];
55
const beginDay = new Date().getTime();
66

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

mock/ant/rule.js __mock__/ant/rule.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { parse } from "url";
22

3-
// mock tableListDataSource
3+
// __mock__ tableListDataSource
44
let tableListDataSource = [];
55
for (let i = 0; i < 46; i += 1) {
66
tableListDataSource.push({

mock/ant/user.js __mock__/ant/user.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 代码中会兼容本地 service mock 以及部署站点的静态数据
1+
// 代码中会兼容本地 service __mock__ 以及部署站点的静态数据
22
export default {
33
// 支持值为 Object 和 Array
44
"GET /api/currentUser": {
File renamed without changes.
File renamed without changes.
File renamed without changes.

mock/index.js __mock__/index.js

File renamed without changes.
File renamed without changes.

__tests__/App-test.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../App';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

android/app/build.gradle

+14-13
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import com.android.build.OutputFile
7373
*/
7474

7575
project.ext.react = [
76-
entryFile: "style.js"
76+
entryFile: "index.js"
7777
]
7878

7979
apply from: "../../node_modules/react-native/react.gradle"
@@ -95,12 +95,12 @@ def enableProguardInReleaseBuilds = false
9595

9696
android {
9797
compileSdkVersion rootProject.ext.compileSdkVersion
98-
buildToolsVersion rootProject.ext.buildToolsVersion
9998

100-
compileOptions {
101-
sourceCompatibility 1.8
102-
targetCompatibility 1.8
99+
compileOptions {
100+
sourceCompatibility JavaVersion.VERSION_1_8
101+
targetCompatibility JavaVersion.VERSION_1_8
103102
}
103+
104104
defaultConfig {
105105
applicationId "com.murray"
106106
minSdkVersion rootProject.ext.minSdkVersion
@@ -113,7 +113,7 @@ android {
113113
reset()
114114
enable enableSeparateBuildPerCPUArchitecture
115115
universalApk false // If true, also generate a universal APK
116-
include "armeabi-v7a", "x86", "arm64-v8a"
116+
include "armeabi-v7a", "x86", "arm64-v8a", "x86-64"
117117
}
118118
}
119119
buildTypes {
@@ -127,7 +127,7 @@ android {
127127
variant.outputs.each { output ->
128128
// For each separate APK per architecture, set a unique version code as described here:
129129
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
130-
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
130+
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86-64": 4]
131131
def abi = output.getFilter(OutputFile.ABI)
132132
if (abi != null) { // null for the universal-debug, universal-release variants
133133
output.versionCodeOverride =
@@ -138,12 +138,11 @@ android {
138138
}
139139

140140
dependencies {
141-
compile project(':react-native-video')
142-
compile project(':react-native-vector-icons')
143-
compile project(':react-native-sound')
144-
compile project(':react-native-gesture-handler')
145-
compile project(':react-native-fs')
146-
compile project(':react-native-audio')
141+
implementation project(':@react-native-community_async-storage')
142+
implementation project(':react-native-gesture-handler')
143+
implementation project(':react-native-vector-icons')
144+
implementation project(':react-native-sound')
145+
implementation project(':react-native-fs')
147146
implementation fileTree(dir: "libs", include: ["*.jar"])
148147
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
149148
implementation "com.facebook.react:react-native:+" // From node_modules
@@ -155,3 +154,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
155154
from configurations.compile
156155
into 'libs'
157156
}
157+
158+
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6+
7+
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:networkSecurityConfig="@xml/react_native_config" />
8+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<network-security-config>
3+
<domain-config cleartextTrafficPermitted="true">
4+
<domain includeSubdomains="false">localhost</domain>
5+
<domain includeSubdomains="false">10.0.2.2</domain>
6+
<domain includeSubdomains="false">10.0.3.2</domain>
7+
</domain-config>
8+
</network-security-config>

android/app/src/main/AndroidManifest.xml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
package="com.murray">
33

44
<uses-permission android:name="android.permission.INTERNET" />
5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
65

76
<application
87
android:name=".MainApplication"
68.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
924 Bytes
Binary file not shown.
File renamed without changes.

android/app/src/main/java/com/murray/MainApplication.java

+5-7
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6-
import com.brentvatne.react.ReactVideoPackage;
6+
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
7+
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
78
import com.oblador.vectoricons.VectorIconsPackage;
89
import com.zmxv.RNSound.RNSoundPackage;
9-
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
1010
import com.rnfs.RNFSPackage;
11-
import com.rnim.rn.audio.ReactNativeAudioPackage;
1211
import com.facebook.react.ReactNativeHost;
1312
import com.facebook.react.ReactPackage;
1413
import com.facebook.react.shell.MainReactPackage;
@@ -29,12 +28,11 @@ public boolean getUseDeveloperSupport() {
2928
protected List<ReactPackage> getPackages() {
3029
return Arrays.<ReactPackage>asList(
3130
new MainReactPackage(),
32-
new ReactVideoPackage(),
31+
new AsyncStoragePackage(),
32+
new RNGestureHandlerPackage(),
3333
new VectorIconsPackage(),
3434
new RNSoundPackage(),
35-
new RNGestureHandlerPackage(),
36-
new RNFSPackage(),
37-
new ReactNativeAudioPackage()
35+
new RNFSPackage()
3836
);
3937
}
4038

android/build.gradle

+3-9
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "28.0.2"
5+
buildToolsVersion = "28.0.3"
66
minSdkVersion = 16
77
compileSdkVersion = 28
8-
targetSdkVersion = 27
8+
targetSdkVersion = 28
99
supportLibVersion = "28.0.0"
1010
}
1111
repositories {
1212
google()
1313
jcenter()
1414
}
1515
dependencies {
16-
classpath 'com.android.tools.build:gradle:3.3.2'
16+
classpath 'com.android.tools.build:gradle:3.3.1'
1717

1818
// NOTE: Do not place your application dependencies here; they belong
1919
// in the individual module build.gradle files
@@ -31,9 +31,3 @@ allprojects {
3131
}
3232
}
3333
}
34-
35-
36-
task wrapper(type: Wrapper) {
37-
gradleVersion = '4.7'
38-
distributionUrl = distributionUrl.replace("bin", "all")
39-
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Thu Mar 07 16:17:42 CST 2019
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

android/settings.gradle

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
rootProject.name = 'murray'
2-
include ':react-native-video'
3-
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')
2+
include ':@react-native-community_async-storage'
3+
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
4+
include ':react-native-gesture-handler'
5+
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
46
include ':react-native-vector-icons'
57
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
68
include ':react-native-sound'
79
project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')
8-
include ':react-native-gesture-handler'
9-
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
1010
include ':react-native-fs'
1111
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
12-
include ':react-native-audio'
13-
project(':react-native-audio').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-audio/android')
1412

1513
include ':app'

0 commit comments

Comments
 (0)