Skip to content

Commit 749136d

Browse files
authored
Merge pull request #1298 from StoDevX/rn-upgrade
upgrade react-native to 0.45
2 parents 4131f95 + 94bf397 commit 749136d

File tree

25 files changed

+158
-80
lines changed

25 files changed

+158
-80
lines changed

.flowconfig

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
.*/node_modules/.*/__tests?__/.*
2525
.*/node_modules/.*/examples/.*
2626
.*/node_modules/react-native-mock/.*
27+
; try removing this line in react-native 0.46
28+
.*/node_modules/react-native/local-cli/server/util/attachHMRServer.js
29+
; remove this after rn-linear-gradient updates
30+
.*/node_modules/react-native-linear-gradient/.*
2731

2832
[include]
2933

@@ -53,8 +57,12 @@ suppress_type=$FlowIssue
5357
suppress_type=$FlowFixMe
5458
suppress_type=$FixMe
5559

56-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
57-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
60+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-5]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
61+
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]+
5862
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
63+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
5964

6065
unsafe.enable_getters_and_setters=true
66+
67+
[version]
68+
^0.45.0

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ coverage
5252
# fastlane specific
5353
fastlane/report.xml
5454

55-
# deliver's temporary files
56-
Preview.html
57-
5855
# snapshot's generated screenshots
56+
fastlane/Preview.html
5957
fastlane/screenshots
6058

6159
# scan's temporary files

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.allaboutolaf',
47+
name = "build_config",
48+
package = "com.allaboutolaf",
5049
)
5150

5251
android_resource(
53-
name = 'res',
54-
res = 'src/main/res',
55-
package = 'com.allaboutolaf',
52+
name = "res",
53+
package = "com.allaboutolaf",
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: 8 additions & 1 deletion
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: []

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/keystores/BUCK

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
keystore(
2-
name = 'debug',
3-
store = 'debug.keystore',
4-
properties = 'debug.keystore.properties',
5-
visibility = [
6-
'PUBLIC',
7-
],
2+
name = "debug",
3+
properties = "debug.keystore.properties",
4+
store = "debug.keystore",
5+
visibility = [
6+
"PUBLIC",
7+
],
88
)

flow-typed/aao/fetch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
declare function rawFetch(): any;
2-
declare function fetchJson(): any;
1+
declare function rawFetch(...any[]): any;
2+
declare function fetchJson(...any[]): any;

flow-typed/npm/moment_v2.x.x.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ type moment$CalendarFormats = {
5353
sameElse?: string,
5454
};
5555

56+
type MomentLike = moment$Moment|string|number|Date|Array<number>;
57+
5658
declare class moment$LocaleData {
5759
months(moment: moment$Moment): string;
5860
monthsShort(moment: moment$Moment): string;
@@ -195,12 +197,12 @@ declare class moment$Moment {
195197
toJSON(): string;
196198
toISOString(): string;
197199
toObject(): moment$MomentObject;
198-
isBefore(date?: moment$Moment|string|number|Date|Array<number>): bool;
199-
isSame(date?: moment$Moment|string|number|Date|Array<number>): bool;
200-
isAfter(date?: moment$Moment|string|number|Date|Array<number>): bool;
201-
isSameOrBefore(date?: moment$Moment|string|number|Date|Array<number>): bool;
202-
isSameOrAfter(date?: moment$Moment|string|number|Date|Array<number>): bool;
203-
isBetween(date: moment$Moment|string|number|Date|Array<number>): bool;
200+
isBefore(date?: MomentLike, timeChunk?: string): bool;
201+
isSame(date?: MomentLike, timeChunk?: string): bool;
202+
isAfter(date?: MomentLike, timeChunk?: string): bool;
203+
isSameOrBefore(date?: MomentLike, timeChunk?: string): bool;
204+
isSameOrAfter(date?: MomentLike, timeChunk?: string): bool;
205+
isBetween(start: MomentLike, end: MomentLike, timeChunk?: null|string, inclusivity?: '()'|'[]'|'[)'|'(]'): bool;
204206
isDST(): bool;
205207
isDSTShifted(): bool;
206208
isLeapYear(): bool;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// flow-typed signature: 3d55cda33e6de86f43a0fd0a1dba6255
2+
// flow-typed version: <<STUB>>/react-native-linear-gradient_v2.1.0/flow_v0.45.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* 'react-native-linear-gradient'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
import {View} from 'react-native'
17+
type LinearGradientProps = {
18+
start?: Array<number> | {x: number, y: number};
19+
end?: Array<number> | {x: number, y: number};
20+
colors: Array<string>;
21+
locations?: Array<number>;
22+
} & typeof(View);
23+
24+
declare module 'react-native-linear-gradient' {
25+
declare module.exports: Class<React$Component<void, LinearGradientProps, any>>;
26+
}

ios/AllAboutOlaf.xcodeproj/project.pbxproj

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,20 @@
243243
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
244244
remoteInfo = "React-tvOS";
245245
};
246+
00CDE54F1F1F041900FEA89E /* PBXContainerItemProxy */ = {
247+
isa = PBXContainerItemProxy;
248+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
249+
proxyType = 2;
250+
remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
251+
remoteInfo = "third-party";
252+
};
253+
00CDE5511F1F041900FEA89E /* PBXContainerItemProxy */ = {
254+
isa = PBXContainerItemProxy;
255+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
256+
proxyType = 2;
257+
remoteGlobalIDString = 139D7E881E25C6D100323FB7;
258+
remoteInfo = "double-conversion";
259+
};
246260
00CF91E91E770EF900DD9CBC /* PBXContainerItemProxy */ = {
247261
isa = PBXContainerItemProxy;
248262
containerPortal = C1122D5F37D247E09037EE31 /* BVLinearGradient.xcodeproj */;
@@ -663,6 +677,8 @@
663677
0035C1091E4F59AE00768B84 /* libcxxreact.a */,
664678
0035C10B1E4F59AE00768B84 /* libjschelpers.a */,
665679
0035C10D1E4F59AE00768B84 /* libjschelpers.a */,
680+
00CDE5501F1F041900FEA89E /* libthird-party.a */,
681+
00CDE5521F1F041900FEA89E /* libdouble-conversion.a */,
666682
);
667683
name = Products;
668684
sourceTree = "<group>";
@@ -671,7 +687,7 @@
671687
isa = PBXGroup;
672688
children = (
673689
3A0CEA781DEA20340036E739 /* libRCTAnimation.a */,
674-
3A0CEA7A1DEA20340036E739 /* libRCTAnimation-tvOS.a */,
690+
3A0CEA7A1DEA20340036E739 /* libRCTAnimation.a */,
675691
);
676692
name = Products;
677693
sourceTree = "<group>";
@@ -1181,6 +1197,20 @@
11811197
remoteRef = 00CAD17F1DCA4B29009CDF8F /* PBXContainerItemProxy */;
11821198
sourceTree = BUILT_PRODUCTS_DIR;
11831199
};
1200+
00CDE5501F1F041900FEA89E /* libthird-party.a */ = {
1201+
isa = PBXReferenceProxy;
1202+
fileType = archive.ar;
1203+
path = "libthird-party.a";
1204+
remoteRef = 00CDE54F1F1F041900FEA89E /* PBXContainerItemProxy */;
1205+
sourceTree = BUILT_PRODUCTS_DIR;
1206+
};
1207+
00CDE5521F1F041900FEA89E /* libdouble-conversion.a */ = {
1208+
isa = PBXReferenceProxy;
1209+
fileType = archive.ar;
1210+
path = "libdouble-conversion.a";
1211+
remoteRef = 00CDE5511F1F041900FEA89E /* PBXContainerItemProxy */;
1212+
sourceTree = BUILT_PRODUCTS_DIR;
1213+
};
11841214
00CF91EA1E770EF900DD9CBC /* libBVLinearGradient.a */ = {
11851215
isa = PBXReferenceProxy;
11861216
fileType = archive.ar;
@@ -1237,10 +1267,10 @@
12371267
remoteRef = 3A0CEA771DEA20340036E739 /* PBXContainerItemProxy */;
12381268
sourceTree = BUILT_PRODUCTS_DIR;
12391269
};
1240-
3A0CEA7A1DEA20340036E739 /* libRCTAnimation-tvOS.a */ = {
1270+
3A0CEA7A1DEA20340036E739 /* libRCTAnimation.a */ = {
12411271
isa = PBXReferenceProxy;
12421272
fileType = archive.ar;
1243-
path = "libRCTAnimation-tvOS.a";
1273+
path = libRCTAnimation.a;
12441274
remoteRef = 3A0CEA791DEA20340036E739 /* PBXContainerItemProxy */;
12451275
sourceTree = BUILT_PRODUCTS_DIR;
12461276
};

0 commit comments

Comments
 (0)