Skip to content

Commit c895ded

Browse files
committed
Example: update deps
1 parent a616022 commit c895ded

File tree

17 files changed

+1698
-7336
lines changed

17 files changed

+1698
-7336
lines changed

Example/.flowconfig

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
; For RN Apps installed via npm, "Libraries" folder is inside
1313
; "node_modules/react-native" but in the source repo it is in the root
1414
.*/Libraries/react-native/React.js
15-
.*/Libraries/react-native/ReactNative.js
15+
16+
; Ignore polyfills
17+
.*/Libraries/polyfills/.*
1618

1719
[include]
1820

1921
[libs]
2022
node_modules/react-native/Libraries/react-native/react-native-interface.js
21-
node_modules/react-native/flow
22-
flow/
23+
node_modules/react-native/flow/
2324

2425
[options]
2526
emoji=true
@@ -32,14 +33,16 @@ module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|we
3233

3334
suppress_type=$FlowIssue
3435
suppress_type=$FlowFixMe
36+
suppress_type=$FlowFixMeProps
37+
suppress_type=$FlowFixMeState
3538
suppress_type=$FixMe
3639

37-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
40+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
3942
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4043
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4144

4245
unsafe.enable_getters_and_setters=true
4346

4447
[version]
45-
^0.49.1
48+
^0.56.0

Example/.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ buck-out/
4646
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4747
# screenshots whenever they are needed.
4848
# For more information about the recommended setup visit:
49-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
49+
# https://docs.fastlane.tools/best-practices/source-control/
5050

51-
fastlane/report.xml
52-
fastlane/Preview.html
53-
fastlane/screenshots
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots

Example/index.android.js renamed to Example/App.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { AppRegistry, StyleSheet, View, TextInput, ToastAndroid, DeviceEventEmit
99
import { Recognizer, Synthesizer, SpeechConstant } from "react-native-speech-iflytek";
1010
import Button from "react-native-button";
1111

12-
export default class Example extends Component {
12+
export default class App extends Component {
1313
constructor(props) {
1414
super(props);
1515

@@ -125,5 +125,3 @@ const styles = StyleSheet.create({
125125
borderRadius: 2
126126
}
127127
});
128-
129-
AppRegistry.registerComponent("Example", () => Example);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import 'react-native';
22
import React from 'react';
3-
import Index from '../index.ios.js';
3+
import App from '../App';
44

55
// Note: test renderer must be required after react-native.
66
import renderer from 'react-test-renderer';
77

88
it('renders correctly', () => {
99
const tree = renderer.create(
10-
<Index />
10+
<App />
1111
);
1212
});

Example/__tests__/index.android.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

Example/android/app/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ import com.android.build.OutputFile
7272
* ]
7373
*/
7474

75+
project.ext.react = [
76+
entryFile: "index.js"
77+
]
78+
7579
apply from: "../../node_modules/react-native/react.gradle"
7680

7781
/**
@@ -91,12 +95,12 @@ def enableProguardInReleaseBuilds = false
9195

9296
android {
9397
compileSdkVersion 25
94-
buildToolsVersion '25.0.3'
98+
buildToolsVersion "25.0.3"
9599

96100
defaultConfig {
97101
applicationId "com.example"
98102
minSdkVersion 16
99-
targetSdkVersion 22
103+
targetSdkVersion 25
100104
versionCode 1
101105
versionName "1.0"
102106
ndk {

Example/android/app/src/main/java/com/example/MainApplication.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ protected List<ReactPackage> getPackages() {
2727
new SpeechPackage()
2828
);
2929
}
30+
31+
@Override
32+
protected String getJSMainModuleName() {
33+
return "index";
34+
}
3035
};
3136

3237
@Override

Example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.3'
8+
classpath 'com.android.tools.build:gradle:2.2.3'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sat Aug 05 21:31:48 CST 2017
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-3.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

Example/index.ios.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)