How to get build time of APK?
fetch build time from gradle
1 min readJun 29, 2017
Add buildConfigField with timestamp updated at build time.
android {
defaultConfig {
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
}
}
Then read it at runtime.
Date buildDate = new Date(BuildConfig.TIMESTAMP);