diff --git a/app/build.gradle b/app/build.gradle index 87c7b3faa..6006552f3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -346,9 +346,13 @@ android.applicationVariants.all { variant -> } def buildDate = Config.generateBuildDate() - buildConfigField 'String', 'BUILD_DATE', '"' + buildDate + '"' - - def variantName = variant.getName() + // Setting buildDate with every build changes the generated BuildConfig, which slows down the + // build. Only do this for non-debug builds, to speed-up builds produced during local development. + if (isDebug) { + buildConfigField 'String', 'BUILD_DATE', '"debug build"' + } else { + buildConfigField 'String', 'BUILD_DATE', '"' + buildDate + '"' + } // ------------------------------------------------------------------------------------------------- // Adjust: Read token from local file if it exists (Only release builds)