Skip to content
This repository was archived by the owner on Jun 24, 2019. It is now read-only.

Commit d6f23a3

Browse files
author
Di Wang
committed
update react-native to v0.45
1 parent 5c3706a commit d6f23a3

38 files changed

+5524
-860
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["react-native"]
3-
}
2+
"presets": ["react-native"]
3+
}

.flowconfig

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
[ignore]
2-
3-
# We fork some components by platform.
2+
; We fork some components by platform
43
.*/*[.]android.js
54

6-
# Ignore templates with `@flow` in header
7-
.*/local-cli/generator.*
8-
9-
# Ignore malformed json
10-
.*/node_modules/y18n/test/.*\.json
11-
12-
# Ignore the website subdir
13-
<PROJECT_ROOT>/website/.*
14-
15-
# Ignore BUCK generated dirs
5+
; Ignore "BUCK" generated dirs
166
<PROJECT_ROOT>/\.buckd/
177

18-
# Ignore unexpected extra @providesModule
19-
.*/node_modules/commoner/test/source/widget/share.js
8+
; Ignore unexpected extra "@providesModule"
9+
.*/node_modules/.*/node_modules/fbjs/.*
2010

21-
# Ignore duplicate module providers
22-
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
11+
; Ignore duplicate module providers
12+
; For RN Apps installed via npm, "Libraries" folder is inside
13+
; "node_modules/react-native" but in the source repo it is in the root
2314
.*/Libraries/react-native/React.js
2415
.*/Libraries/react-native/ReactNative.js
25-
.*/node_modules/jest-runtime/build/__tests__/.*
2616

2717
[include]
2818

@@ -32,27 +22,26 @@ node_modules/react-native/flow
3222
flow/
3323

3424
[options]
35-
module.system=haste
25+
emoji=true
3626

37-
esproposal.class_static_fields=enable
38-
esproposal.class_instance_fields=enable
27+
module.system=haste
3928

4029
experimental.strict_type_args=true
4130

4231
munge_underscores=true
4332

44-
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
4533
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
4634

4735
suppress_type=$FlowIssue
4836
suppress_type=$FlowFixMe
4937
suppress_type=$FixMe
5038

51-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
39+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-5]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-5]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
5341
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
42+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
5443

5544
unsafe.enable_getters_and_setters=true
5645

5746
[version]
58-
^0.33.0
47+
^0.45.0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,32 @@ DerivedData
2222
*.xcuserstate
2323
project.xcworkspace
2424

25-
# Android/IJ
25+
# Android/IntelliJ
2626
#
27-
*.iml
27+
build/
2828
.idea
2929
.gradle
3030
local.properties
31+
*.iml
3132

3233
# node.js
3334
#
3435
node_modules/
3536
npm-debug.log
37+
yarn-error.log
3638

3739
# BUCK
3840
buck-out/
3941
\.buckd/
40-
android/app/libs
41-
android/keystores/debug.keystore
42+
*.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
50+
51+
fastlane/report.xml
52+
fastlane/Preview.html
53+
fastlane/screenshots

android/app/BUCK

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import re
2-
31
# To learn about Buck see [Docs](https://buckbuild.com/).
42
# To run your application with Buck:
53
# - install Buck
@@ -11,56 +9,57 @@ import re
119
#
1210

1311
lib_deps = []
12+
1413
for jarfile in glob(['libs/*.jar']):
15-
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
14+
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
1615
lib_deps.append(':' + name)
1716
prebuilt_jar(
1817
name = name,
1918
binary_jar = jarfile,
2019
)
2120

2221
for aarfile in glob(['libs/*.aar']):
23-
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
22+
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
2423
lib_deps.append(':' + name)
2524
android_prebuilt_aar(
2625
name = name,
2726
aar = aarfile,
2827
)
2928

3029
android_library(
31-
name = 'all-libs',
32-
exported_deps = lib_deps
30+
name = "all-libs",
31+
exported_deps = lib_deps,
3332
)
3433

3534
android_library(
36-
name = 'app-code',
37-
srcs = glob([
38-
'src/main/java/**/*.java',
39-
]),
40-
deps = [
41-
':all-libs',
42-
':build_config',
43-
':res',
44-
],
35+
name = "app-code",
36+
srcs = glob([
37+
"src/main/java/**/*.java",
38+
]),
39+
deps = [
40+
":all-libs",
41+
":build_config",
42+
":res",
43+
],
4544
)
4645

4746
android_build_config(
48-
name = 'build_config',
49-
package = 'com.juejinclient',
47+
name = "build_config",
48+
package = "com.juejinclient",
5049
)
5150

5251
android_resource(
53-
name = 'res',
54-
res = 'src/main/res',
55-
package = 'com.juejinclient',
52+
name = "res",
53+
package = "com.juejinclient",
54+
res = "src/main/res",
5655
)
5756

5857
android_binary(
59-
name = 'app',
60-
package_type = 'debug',
61-
manifest = 'src/main/AndroidManifest.xml',
62-
keystore = '//android/keystores:debug',
63-
deps = [
64-
':app-code',
65-
],
58+
name = "app",
59+
keystore = "//android/keystores:debug",
60+
manifest = "src/main/AndroidManifest.xml",
61+
package_type = "debug",
62+
deps = [
63+
":app-code",
64+
],
6665
)

android/app/build.gradle

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ import com.android.build.OutputFile
3333
* // bundleInPaidRelease: true,
3434
* // bundleInBeta: true,
3535
*
36+
* // whether to disable dev mode in custom build variants (by default only disabled in release)
37+
* // for example: to disable dev mode in the staging build type (if configured)
38+
* devDisabledInStaging: true,
39+
* // The configuration property can be in the following formats
40+
* // 'devDisabledIn${productFlavor}${buildType}'
41+
* // 'devDisabledIn${buildType}'
42+
*
3643
* // the root of your project, i.e. where "package.json" lives
3744
* root: "../../",
3845
*
@@ -58,7 +65,7 @@ import com.android.build.OutputFile
5865
* inputExcludes: ["android/**", "ios/**"],
5966
*
6067
* // override which node gets called and with what additional arguments
61-
* nodeExecutableAndArgs: ["node"]
68+
* nodeExecutableAndArgs: ["node"],
6269
*
6370
* // supply additional arguments to the packager
6471
* extraPackagerArgs: []
@@ -84,7 +91,7 @@ def enableProguardInReleaseBuilds = false
8491

8592
android {
8693
compileSdkVersion 23
87-
buildToolsVersion "23.0.1"
94+
buildToolsVersion '25.0.0'
8895

8996
defaultConfig {
9097
applicationId "com.juejinclient"
@@ -136,6 +143,6 @@ dependencies {
136143
// Run this once to be able to run the application with BUCK
137144
// puts all compile dependencies into folder libs for BUCK to use
138145
task copyDownloadableDepsToLibs(type: Copy) {
139-
from configurations.compile
140-
into 'libs'
146+
from configurations.compile
147+
into 'libs'
141148
}

android/app/proguard-rules.pro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050

5151
-dontwarn com.facebook.react.**
5252

53+
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54+
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55+
-dontwarn android.text.StaticLayout
56+
5357
# okhttp
5458

5559
-keepattributes Signature

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
android:allowBackup="true"
1616
android:label="@string/app_name"
1717
android:icon="@mipmap/ic_launcher"
18-
android:theme="@style/AppTheme"
19-
android:largeHeap="true">
18+
android:theme="@style/AppTheme">
2019
<activity
2120
android:name=".MainActivity"
2221
android:label="@string/app_name"
23-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
22+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
23+
android:windowSoftInputMode="adjustResize">
2424
<intent-filter>
2525
<action android:name="android.intent.action.MAIN" />
2626
<category android:name="android.intent.category.LAUNCHER" />

0 commit comments

Comments
 (0)