From bb8b2b0d8ab05b08970a2481f8b709d93147958b Mon Sep 17 00:00:00 2001 From: Alexandre G Pereira Date: Wed, 31 Jul 2024 20:29:00 -0300 Subject: [PATCH] Add version name on android (#307) --- .../hunter/app/ui/AppBottomNavigationTransition.android.kt | 5 +++++ .../hunter/app/ui/AppBottomNavigationTransition.kt | 4 +++- .../hunter/app/ui/AppBottomNavigationTransition.ios.kt | 3 +++ .../hunter/app/ui/AppBottomNavigationTransition.jvm.kt | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 app/src/androidMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.android.kt create mode 100644 app/src/iosMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.ios.kt create mode 100644 app/src/jvmMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.jvm.kt diff --git a/app/src/androidMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.android.kt b/app/src/androidMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.android.kt new file mode 100644 index 00000000..5ae90a8c --- /dev/null +++ b/app/src/androidMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.android.kt @@ -0,0 +1,5 @@ +package br.alexandregpereira.hunter.app.ui + +import br.alexandregpereira.hunter.app.BuildConfig + +internal actual fun getVersionName(): String = BuildConfig.VERSION_NAME diff --git a/app/src/commonMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.kt b/app/src/commonMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.kt index 11115bb2..3dcec9d0 100644 --- a/app/src/commonMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.kt +++ b/app/src/commonMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.kt @@ -28,9 +28,11 @@ internal fun AppBottomNavigationTransition( contentPadding = contentPadding, ) BottomBarItemIcon.SETTINGS -> SettingsFeature( - versionName = "", + versionName = getVersionName(), contentPadding = contentPadding, ) } } } + +internal expect fun getVersionName(): String diff --git a/app/src/iosMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.ios.kt b/app/src/iosMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.ios.kt new file mode 100644 index 00000000..2299bb5c --- /dev/null +++ b/app/src/iosMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.ios.kt @@ -0,0 +1,3 @@ +package br.alexandregpereira.hunter.app.ui + +internal actual fun getVersionName(): String = "1.0.0-beta" diff --git a/app/src/jvmMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.jvm.kt b/app/src/jvmMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.jvm.kt new file mode 100644 index 00000000..2299bb5c --- /dev/null +++ b/app/src/jvmMain/kotlin/br/alexandregpereira/hunter/app/ui/AppBottomNavigationTransition.jvm.kt @@ -0,0 +1,3 @@ +package br.alexandregpereira.hunter.app.ui + +internal actual fun getVersionName(): String = "1.0.0-beta"