1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00

Fix ArrayIndex error.

This commit is contained in:
Cedric Beust 2015-12-28 11:17:26 -08:00
parent 5825fc1f03
commit 51b0049f05

View file

@ -186,9 +186,9 @@ class Variant(val initialProductFlavor: ProductFlavorConfig? = null,
}
fun toCamelcaseDir() : String {
val pfName = productFlavor.name
val btName = buildType.name
return pfName[0].toLowerCase() + pfName.substring(1) + btName[0].toUpperCase() + btName.substring(1)
fun lci(s : String) = if (s.length == 0 || s.length == 1) s else s[0].toLowerCase() + s.substring(1)
return lci(productFlavor.name) + buildType.name.capitalize()
}
fun toIntermediateDir() : String {