From ab0e3c516c5f60408d9c9803af02450f188280cb Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Wed, 29 May 2024 06:27:29 +0100 Subject: [PATCH] Used dated version codes for sample (#2243) * Used dated version codes * Update build.gradle.kts --- sample/build.gradle.kts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index b03c778a80..5ce364639f 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -14,6 +14,10 @@ * limitations under the License. */ +import java.time.LocalDate +import java.time.format.DateTimeFormatter.ofPattern +import java.util.Locale + plugins { id("com.android.application") kotlin("android") @@ -29,8 +33,10 @@ android { minSdk = 26 targetSdk = 34 - versionCode = 1 - versionName = "1.0" + val date = LocalDate.now() + + versionCode = date.format(ofPattern("yyyyMMdd", Locale.ROOT)).toInt() + versionName = date.toString() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }