Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,7 +51,7 @@ val Project.simpleVersionName: String
get() {

val version = rootProject.version.toString()
// Format: CodeOnTheGo-{debug|release}-MMDD-HHMM
// Format: C-{d|r}-MMDD-HHMM
val buildType =
if (project.gradle.startParameter.taskNames.any {
it.contains(
Expand All@@ -65,6 +65,7 @@ val Project.simpleVersionName: String
} else {
"release"
}
val buildTypeShort = if (buildType == "debug") "d" else "r"

val calendar = java.util.Calendar.getInstance()
val month = calendar.get(java.util.Calendar.MONTH) + 1
Expand All@@ -75,7 +76,7 @@ val Project.simpleVersionName: String
val formattedDate = String.format(Locale.getDefault(), "%02d%02d", month, day)
val formattedTime = String.format(Locale.getDefault(), "%02d%02d", hour, minute)

val simpleVersion = "CodeOnTheGo-$buildType-$formattedDate-$formattedTime"
val simpleVersion = "C-$buildTypeShort-$formattedDate-$formattedTime"

if (shouldPrintVersionName) {
logger.warn("Simple version name is '$simpleVersion' (from version $version)")
Expand Down