@revopush/react-native-code-push 2.5.0-rc.3 → 2.5.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -56,7 +56,7 @@ dependencies {
|
|
|
56
56
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
57
57
|
//noinspection GradleDynamicVersion
|
|
58
58
|
|
|
59
|
-
implementation "org.revopush:revopush-diff:0.0.
|
|
59
|
+
implementation "org.revopush:revopush-diff:0.0.5"
|
|
60
60
|
implementation "com.facebook.react:react-native:+"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/android/codepush.gradle
CHANGED
|
@@ -52,12 +52,6 @@ static def findNodeModulePath(baseDir, packageName) {
|
|
|
52
52
|
return null
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
android.buildTypes.each { buildType ->
|
|
56
|
-
// to prevent incorrect long value restoration from strings.xml we need to wrap it with double quotes
|
|
57
|
-
// https://github.com/microsoft/cordova-plugin-code-push/issues/264
|
|
58
|
-
buildType.resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
|
|
59
|
-
}
|
|
60
|
-
|
|
61
55
|
gradle.projectsEvaluated {
|
|
62
56
|
def debuggableVariants = config.debuggableVariants ? config.debuggableVariants.get() : ['debug']
|
|
63
57
|
|
|
@@ -82,7 +76,7 @@ gradle.projectsEvaluated {
|
|
|
82
76
|
def jsBundleFile;
|
|
83
77
|
|
|
84
78
|
// Additional node commandline arguments
|
|
85
|
-
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ? config.nodeExecutableAndArgs.get(): ["node"]
|
|
79
|
+
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ? config.nodeExecutableAndArgs.get() : ["node"]
|
|
86
80
|
def extraPackagerArgs = config.extraPackagerArgs ? config.extraPackagerArgs.get() : []
|
|
87
81
|
|
|
88
82
|
// Make this task run right after the bundle task
|
|
@@ -104,7 +98,7 @@ gradle.projectsEvaluated {
|
|
|
104
98
|
generateBundledResourcesHash = tasks.create(
|
|
105
99
|
name: "generateBundledResourcesHash${targetName}",
|
|
106
100
|
type: Exec) {
|
|
107
|
-
commandLine
|
|
101
|
+
commandLine(*nodeExecutableAndArgs, "${nodeModulesPath}/scripts/generateBundledResourcesHash.js", resourcesDir, jsBundleFile, jsBundleDir)
|
|
108
102
|
|
|
109
103
|
enabled !debuggableVariants.contains(variant.name) ?: targetName.toLowerCase().contains("release")
|
|
110
104
|
}
|
|
@@ -113,11 +107,11 @@ gradle.projectsEvaluated {
|
|
|
113
107
|
runBefore("merge${targetName}Assets", generateBundledResourcesHash)
|
|
114
108
|
} else {
|
|
115
109
|
def jsBundleDirConfigName = "jsBundleDir${targetName}"
|
|
116
|
-
jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ? elvisFile(config."$jsBundleDirConfigName").get():
|
|
110
|
+
jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ? elvisFile(config."$jsBundleDirConfigName").get() :
|
|
117
111
|
file("$buildDir/intermediates/assets/${targetPath}")
|
|
118
112
|
|
|
119
113
|
def resourcesDirConfigName = "resourcesDir${targetName}"
|
|
120
|
-
resourcesDir = elvisFile(config."${resourcesDirConfigName}") ? elvisFile(config."${resourcesDirConfigName}").get():
|
|
114
|
+
resourcesDir = elvisFile(config."${resourcesDirConfigName}") ? elvisFile(config."${resourcesDirConfigName}").get() :
|
|
121
115
|
file("$buildDir/intermediates/res/merged/${targetPath}")
|
|
122
116
|
|
|
123
117
|
// In case version of 'Android Plugin for Gradle'' is lower than 1.3.0
|
|
@@ -129,19 +123,19 @@ gradle.projectsEvaluated {
|
|
|
129
123
|
|
|
130
124
|
jsBundleFile = file("$jsBundleDir/$bundleAssetName")
|
|
131
125
|
|
|
132
|
-
def resourcesMapTempFileName = "CodePushResourcesMap-" + java.util.UUID.randomUUID().toString().substring(0,8) + ".json"
|
|
126
|
+
def resourcesMapTempFileName = "CodePushResourcesMap-" + java.util.UUID.randomUUID().toString().substring(0, 8) + ".json"
|
|
133
127
|
|
|
134
128
|
generateBundledResourcesHash = tasks.create(
|
|
135
129
|
name: "generateBundledResourcesHash${targetName}",
|
|
136
130
|
type: Exec) {
|
|
137
|
-
commandLine
|
|
131
|
+
commandLine(*nodeExecutableAndArgs, "${nodeModulesPath}/scripts/generateBundledResourcesHash.js", resourcesDir, jsBundleFile, jsBundleDir, resourcesMapTempFileName)
|
|
138
132
|
}
|
|
139
133
|
|
|
140
134
|
// Make this task run right before the bundle task
|
|
141
135
|
def recordFilesBeforeBundleCommand = tasks.create(
|
|
142
136
|
name: "recordFilesBeforeBundleCommand${targetName}",
|
|
143
137
|
type: Exec) {
|
|
144
|
-
commandLine
|
|
138
|
+
commandLine(*nodeExecutableAndArgs, "${nodeModulesPath}/scripts/recordFilesBeforeBundleCommand.js", resourcesDir, resourcesMapTempFileName)
|
|
145
139
|
}
|
|
146
140
|
|
|
147
141
|
recordFilesBeforeBundleCommand.dependsOn("merge${targetName}Resources")
|
|
@@ -160,3 +154,16 @@ gradle.projectsEvaluated {
|
|
|
160
154
|
runBefore("process${targetName}Resources", generateBundledResourcesHash)
|
|
161
155
|
}
|
|
162
156
|
}
|
|
157
|
+
|
|
158
|
+
project.extensions.findByName("androidComponents")?.finalizeDsl { extension ->
|
|
159
|
+
// disable PNG crunching for release builds to align APK resources with what Metro builds
|
|
160
|
+
extension.buildTypes.named("release") {
|
|
161
|
+
crunchPngs = false
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
extension.buildTypes.all { buildType ->
|
|
165
|
+
// to prevent incorrect long value restoration from strings.xml we need to wrap it with double quotes
|
|
166
|
+
// https://github.com/microsoft/cordova-plugin-code-push/issues/264
|
|
167
|
+
buildType.resValue('string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()))
|
|
168
|
+
}
|
|
169
|
+
}
|
package/package.json
CHANGED
|
Binary file
|