Skip to content

Commit 2932f24

Browse files
committed
Update CodePush integration to use @srcpush/react-native-code-push and remove legacy references
1 parent 64a065a commit 2932f24

File tree

6 files changed

+69
-63
lines changed

6 files changed

+69
-63
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "disabled"
3+
}

Examples/CodePushDemoApp/App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
View,
1010
} from 'react-native';
1111

12-
import CodePush from "react-native-code-push";
12+
import CodePush from "@srcpush/react-native-code-push";
1313

1414
class App extends Component<{}> {
1515
constructor() {
@@ -18,7 +18,7 @@ class App extends Component<{}> {
1818
}
1919

2020
codePushStatusDidChange(syncStatus) {
21-
switch(syncStatus) {
21+
switch (syncStatus) {
2222
case CodePush.SyncStatus.CHECKING_FOR_UPDATE:
2323
this.setState({ syncMessage: "Checking for update." });
2424
break;
@@ -106,9 +106,9 @@ class App extends Component<{}> {
106106
<Text style={styles.syncButton}>Press for dialog-driven sync</Text>
107107
</TouchableOpacity>
108108
{progressView}
109-
<Image style={styles.image} resizeMode={"contain"} source={require("./images/laptop_phone_howitworks.png")}/>
109+
<Image style={styles.image} resizeMode={"contain"} source={require("./images/laptop_phone_howitworks.png")} />
110110
<TouchableOpacity onPress={this.toggleAllowRestart.bind(this)}>
111-
<Text style={styles.restartToggleButton}>Restart { this.state.restartAllowed ? "allowed" : "forbidden"}</Text>
111+
<Text style={styles.restartToggleButton}>Restart {this.state.restartAllowed ? "allowed" : "forbidden"}</Text>
112112
</TouchableOpacity>
113113
<TouchableOpacity onPress={this.getUpdateMetadata.bind(this)}>
114114
<Text style={styles.syncButton}>Press for Update Metadata</Text>

Examples/CodePushDemoApp/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ project.ext.react = [
8282
]
8383

8484
apply from: "../../node_modules/react-native/react.gradle"
85-
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
85+
apply from: "../../node_modules/@srcpush/react-native-code-push/android/codepush.gradle"
8686

8787
/**
8888
* Set this to true to create two separate APKs instead of one:

Examples/CodePushDemoApp/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ PODS:
352352

353353
DEPENDENCIES:
354354
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
355-
- CodePush (from `../node_modules/react-native-code-push`)
355+
- CodePush (from `../node_modules/@srcpush/react-native-code-push`)
356356
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
357357
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
358358
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
@@ -430,7 +430,7 @@ EXTERNAL SOURCES:
430430
boost:
431431
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
432432
CodePush:
433-
:path: "../node_modules/react-native-code-push"
433+
:path: "../node_modules/@srcpush/react-native-code-push"
434434
DoubleConversion:
435435
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
436436
FBLazyVector:

Examples/CodePushDemoApp/package-lock.json

Lines changed: 56 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/CodePushDemoApp/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"lint": "eslint ."
1111
},
1212
"dependencies": {
13+
"@srcpush/react-native-code-push": "^1.0.0",
1314
"react": "17.0.2",
14-
"react-native": "0.68.5",
15-
"react-native-code-push": "8.1.0"
15+
"react-native": "0.68.5"
1616
},
1717
"resolutions": {
1818
"strip-ansi": "^6.0.1",
@@ -31,4 +31,4 @@
3131
"jest": {
3232
"preset": "react-native"
3333
}
34-
}
34+
}

0 commit comments

Comments
 (0)