mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-12-16 10:02:34 +08:00
Read build time in local-cli for apk
This commit is contained in:
@@ -27,11 +27,9 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
buildConfigField("String", "PUSHY_BUILD_TIME", "\"${minutesSinceEpoch}\"")
|
||||
resValue("string", "pushy_build_time", "${minutesSinceEpoch}")
|
||||
}
|
||||
debug {
|
||||
buildConfigField("String", "PUSHY_BUILD_TIME", "\"0\"")
|
||||
resValue("string", "pushy_build_time", "0")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cn.reactnative.modules.update">
|
||||
|
||||
<application>
|
||||
<meta-data android:name="pushy_build_time" android:value="@string/pushy_build_time" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
@@ -60,7 +60,7 @@ public class UpdateContext {
|
||||
}
|
||||
|
||||
public String getBuildTime() {
|
||||
return BuildConfig.PUSHY_BUILD_TIME;
|
||||
return context.getString(R.string.pushy_build_time);
|
||||
}
|
||||
|
||||
public interface DownloadFileListener {
|
||||
|
||||
Reference in New Issue
Block a user