Skip to content

Commit

Permalink
feat: auto versionName
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcoding810 committed Dec 1, 2024
1 parent 75533ed commit 850fe2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ android {
namespace = "com.paulcoding.hviewer"
compileSdk = 35

val latestTag = providers.exec {
commandLine = "git describe --tags --abbrev=0".split(' ')
}.standardOutput.asText.get().trim().replaceFirst("v", "")

defaultConfig {
applicationId = "com.paulcoding.hviewer"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.1.0"
versionName = latestTag

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down

0 comments on commit 850fe2c

Please sign in to comment.