Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit aa6a7ac

Browse files
author
Max
authored
Updated Android/ios parts for DemoApp with RN0.47.1 (#946)
1 parent 2333ef8 commit aa6a7ac

File tree

16 files changed

+111
-298
lines changed

16 files changed

+111
-298
lines changed

Examples/CodePushDemoApp/.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+
}

Examples/CodePushDemoApp/.flowconfig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ emoji=true
2626

2727
module.system=haste
2828

29-
experimental.strict_type_args=true
30-
3129
munge_underscores=true
3230

3331
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'
@@ -36,12 +34,12 @@ suppress_type=$FlowIssue
3634
suppress_type=$FlowFixMe
3735
suppress_type=$FixMe
3836

39-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
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]+
4139
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4240
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4341

4442
unsafe.enable_getters_and_setters=true
4543

4644
[version]
47-
^0.40.0
45+
^0.49.1

Examples/CodePushDemoApp/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: []

Examples/CodePushDemoApp/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

Examples/CodePushDemoApp/android/app/src/main/java/com/codepushdemoapp/MainApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public boolean getUseDeveloperSupport() {
3030
protected List<ReactPackage> getPackages() {
3131
return Arrays.<ReactPackage>asList(
3232
new MainReactPackage(),
33-
new CodePush("deployment-key-here", getApplicationContext(), BuildConfig.DEBUG)
33+
new CodePush(getResources().getString(R.string.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG)
3434
);
3535
}
3636
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<resources>
2-
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey"></string>
2+
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">deployment-key-here</string>
33
<string name="app_name">CodePushDemoApp</string>
44
</resources>

Examples/CodePushDemoApp/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ let codePushOptions = { checkFrequency: CodePush.CheckFrequency.MANUAL };
159159

160160
CodePushDemoApp = CodePush(codePushOptions)(CodePushDemoApp);
161161

162-
AppRegistry.registerComponent("CodePushDemoApp", () => CodePushDemoApp);
162+
AppRegistry.registerComponent("CodePushDemoApp", () => CodePushDemoApp);

Examples/CodePushDemoApp/demo.jse

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

0 commit comments

Comments
 (0)