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

Commit 4ac9fdb

Browse files
Abbondanzothewulf7
andauthored
[Android] Fix issue where CODE_PUSH_APK_BUILD_TIME resource was not generating w/ AGP 4.2+ (#2337)
* Move resource value setter outside of evaluation closure * Explicitly name build type in closure Co-authored-by: Evgenii Utkin <[email protected]>
1 parent c0d3394 commit 4ac9fdb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

android/codepush.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ void runBefore(String dependentTaskName, Task task) {
1717
}
1818
}
1919

20-
gradle.projectsEvaluated {
21-
android.buildTypes.each {
22-
// to prevent incorrect long value restoration from strings.xml we need to wrap it with double quotes
23-
// https://github.com/microsoft/cordova-plugin-code-push/issues/264
24-
it.resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
25-
}
26-
20+
android.buildTypes.each { buildType ->
21+
// to prevent incorrect long value restoration from strings.xml we need to wrap it with double quotes
22+
// https://github.com/microsoft/cordova-plugin-code-push/issues/264
23+
buildType.resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
24+
}
25+
26+
gradle.projectsEvaluated {
2727
android.applicationVariants.all { variant ->
2828
def nodeModulesPath;
2929
if (config.root) {

0 commit comments

Comments
 (0)