diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index b7c9d00e7..898f399d2 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -16,6 +16,12 @@ plugins {
     id("realm-android")
 }
 
+if (!gradle.startParameter.taskRequests.toString().contains("Debug")) {
+    apply(plugin = "com.google.gms.google-services")
+    // Firebase Crashlytics
+    apply(plugin = "com.google.firebase.crashlytics")
+}
+
 shortcutHelper.setFilePath("./shortcuts.xml")
 
 
@@ -28,24 +34,6 @@ fun runCommand(command: String): String {
     return String(byteOut.toByteArray()).trim()
 }
 
-// Git is needed in your system PATH for these commands to work.
-// If it's not installed, you can return a random value as a workaround
-fun getCommitCount(): String {
-    return runCommand("git rev-list --count HEAD")
-    // return "1"
-}
-
-fun getGitSha(): String {
-    return runCommand("git rev-parse --short HEAD")
-    // return "1"
-}
-
-fun getBuildTime(): String {
-    val df = SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'")
-    df.timeZone = TimeZone.getTimeZone("UTC")
-    return df.format(Date())
-}
-
 
 android {
     compileSdkVersion(AndroidConfig.compileSdk)
@@ -334,20 +322,6 @@ dependencies {
     // SY -->
 }
 
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath(kotlin("gradle-plugin", version = BuildPluginsVersion.KOTLIN))
-    }
-}
-
-repositories {
-    mavenCentral()
-    jcenter()
-}
-
 tasks {
     // See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
     withType<KotlinCompile> {
@@ -373,8 +347,36 @@ tasks {
     }
 }
 
-if (!gradle.startParameter.taskRequests.toString().contains("Debug")) {
-    apply(plugin = "com.google.gms.google-services")
-    // Firebase Crashlytics
-    apply(plugin = "com.google.firebase.crashlytics")
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath(kotlin("gradle-plugin", version = BuildPluginsVersion.KOTLIN))
+    }
+}
+
+repositories {
+    mavenCentral()
+    jcenter()
+}
+
+
+// Git is needed in your system PATH for these commands to work.
+// If it's not installed, you can return a random value as a workaround
+fun getCommitCount(): String {
+    return runCommand("git rev-list --count HEAD")
+    // return "1"
+}
+
+fun getGitSha(): String {
+    return runCommand("git rev-parse --short HEAD")
+    // return "1"
+}
+
+fun getBuildTime(): String {
+    val df = SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'")
+    df.timeZone = TimeZone.getTimeZone("UTC")
+    return df.format(Date())
 }