From 4b347cde1dea013c71605b68d70b80201c4d06fb Mon Sep 17 00:00:00 2001 From: mshdabiola Date: Thu, 13 Jun 2024 08:00:49 +0100 Subject: [PATCH] change version code file --- app/build.gradle.kts | 6 ++++-- .../kotlin/AndroidApplicationFirebaseConventionPlugin.kt | 6 +++--- gradle/libs.versions.toml | 3 +++ instuctions | 4 ++++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e6535c7..ad3ddd8 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -20,8 +20,10 @@ android { defaultConfig { applicationId = "com.mshdabiola.playnotepad" - versionCode = 1 - versionName = "0.0.1" // X.Y.Z; X = Major, Y = minor, Z = Patch level + versionCode = libs.versions.versionCode.get().toIntOrNull() + versionName = System.getenv("VERSION_NAME") ?: libs.versions.versionName.get() +// versionCode = 1 +// versionName = "0.0.1" // X.Y.Z; X = Major, Y = minor, Z = Patch level // Custom test runner to set up Hilt dependency graph testInstrumentationRunner = "com.mshdabiola.testing.TestRunner" diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt index 8c93279..4c8138c 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt @@ -26,9 +26,9 @@ class AndroidApplicationFirebaseConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { -// apply("com.google.gms.google-services") -// apply("com.google.firebase.firebase-perf") -// apply("com.google.firebase.crashlytics") + apply("com.google.gms.google-services") + apply("com.google.firebase.firebase-perf") + apply("com.google.firebase.crashlytics") } // dependencies { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c4f66f9..86b153b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,6 +2,9 @@ agp = "8.4.1" androidTools = "31.3.2" +versionName = "0.0.1" +versionCode = "1" + accompanist = "0.34.0" guava = "33.0.0-android" diff --git a/instuctions b/instuctions index 91108ef..4973ff0 100644 --- a/instuctions +++ b/instuctions @@ -10,3 +10,7 @@ ./gradlew :app:generateReleaseBaselineProfile + sed -i -e '/google-services/d' -e '/firebase/d' ../build.gradle.kts; + sed -i -e '/mlkit/,+14d' -e '/google-services/d' -e '/firebase/d' build.gradle.kts; + sed -i -e '/with(target) {/,/^ }/d' -e '/CrashlyticsExtension/d' build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt +