From 18a00716f8fc9919a7452aceb94bc9458ecc370a Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 23 Jan 2019 19:48:16 +0000 Subject: [PATCH] Remove build time from app. It was never needed, slows down development builds, and is annoying for reproducible builds --- app/build.gradle | 1 - app/src/main/java/com/etesync/syncadapter/HttpClient.kt | 3 +-- app/src/main/java/com/etesync/syncadapter/ui/AboutActivity.kt | 2 +- .../main/java/com/etesync/syncadapter/ui/DebugInfoActivity.kt | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index deecb1cc..59486657 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -24,7 +24,6 @@ android { versionCode 51 versionName "1.0.1" - buildConfigField "long", "buildTime", System.currentTimeMillis() + "L" buildConfigField "boolean", "customCerts", "true" } diff --git a/app/src/main/java/com/etesync/syncadapter/HttpClient.kt b/app/src/main/java/com/etesync/syncadapter/HttpClient.kt index ee110acc..e563a713 100644 --- a/app/src/main/java/com/etesync/syncadapter/HttpClient.kt +++ b/app/src/main/java/com/etesync/syncadapter/HttpClient.kt @@ -33,8 +33,7 @@ object HttpClient { private val userAgent: String init { - val date = SimpleDateFormat("yyyy/MM/dd", Locale.US).format(Date(BuildConfig.buildTime)) - userAgent = "${App.appName}/${BuildConfig.VERSION_NAME} (${date}; okhttp3) Android/${Build.VERSION.RELEASE}" + userAgent = "${App.appName}/${BuildConfig.VERSION_NAME} (okhttp3) Android/${Build.VERSION.RELEASE}" } fun create(context: Context?, logger: Logger, host: String?, token: String): OkHttpClient { diff --git a/app/src/main/java/com/etesync/syncadapter/ui/AboutActivity.kt b/app/src/main/java/com/etesync/syncadapter/ui/AboutActivity.kt index 924c922d..27568791 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/AboutActivity.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/AboutActivity.kt @@ -159,7 +159,7 @@ class AboutActivity : BaseActivity() { private val components = arrayOf(ComponentInfo( App.appName, BuildConfig.VERSION_NAME, Constants.webUri.toString(), - DateFormatUtils.format(BuildConfig.buildTime, "yyyy") + " Tom Hacohen", + "Tom Hacohen", R.string.about_license_info_no_warranty, "gpl-3.0-standalone.html" ), ComponentInfo( "DAVdroid", "(forked from)", "https://syncadapter.bitfire.at", diff --git a/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.kt b/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.kt index 0cb9f211..c30db9f9 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/DebugInfoActivity.kt @@ -141,7 +141,7 @@ class DebugInfoActivity : BaseActivity(), LoaderManager.LoaderCallbacks var installedFrom = pm.getInstallerPackageName(BuildConfig.APPLICATION_ID) if (TextUtils.isEmpty(installedFrom)) installedFrom = "APK (directly)" - report.append("\nSOFTWARE INFORMATION\n" + "EteSync version: ").append(BuildConfig.VERSION_NAME).append(" (").append(BuildConfig.VERSION_CODE).append(") ").append(Date(BuildConfig.buildTime)).append("\n") + report.append("\nSOFTWARE INFORMATION\n" + "EteSync version: ").append(BuildConfig.VERSION_NAME).append(" (").append(BuildConfig.VERSION_CODE).append(") ").append("\n") .append("Installed from: ").append(installedFrom).append("\n") } catch (ex: Exception) { App.log.log(Level.SEVERE, "Couldn't get software information", ex)