diff --git a/build.gradle.kts b/build.gradle.kts index be020ac..b574c50 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,13 @@ fun String.execute(currentWorkingDir: File = file("./")): String { return out.standardOutput.asText.get().trim() } +val localProperties = Properties() +localProperties.load(file("local.properties").inputStream()) +val officialBuild by extra(localProperties.getProperty("officialBuild", "false") == "true") + fun getUncommittedSuffix(): String { + if (officialBuild) return "" + val result = "git status -s".execute() if (result.isEmpty()) { return "" @@ -43,10 +49,6 @@ val minBackupVerCode by extra(65) val androidSourceCompatibility = JavaVersion.VERSION_21 val androidTargetCompatibility = JavaVersion.VERSION_21 -val localProperties = Properties() -localProperties.load(file("local.properties").inputStream()) -val officialBuild by extra(localProperties.getProperty("officialBuild", "false") == "true") - tasks.register("clean", Delete::class) { delete(rootProject.layout.buildDirectory) }