mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Fix file names with variants.
This commit is contained in:
parent
b08790cf50
commit
1590128a11
2 changed files with 22 additions and 10 deletions
|
@ -204,4 +204,19 @@ class Variant(val productFlavorName: String = "", val buildTypeName: String = ""
|
|||
return result
|
||||
}
|
||||
}
|
||||
|
||||
fun archiveName(project: Project, archiveName: String?, suffix: String) : String {
|
||||
val result: String =
|
||||
if (isDefault) archiveName ?: project.name + "-" + project.version + suffix
|
||||
else {
|
||||
val base = if (archiveName != null) archiveName.substring(0, archiveName.length - suffix.length)
|
||||
else project.name + "-" + project.version
|
||||
base +
|
||||
if (productFlavorName.isEmpty()) "" else "-$productFlavorName" +
|
||||
if (buildTypeName.isEmpty()) "" else "-$buildTypeName" +
|
||||
suffix
|
||||
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue