mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Ordering: build type then product flavor.
This commit is contained in:
parent
6d605f3100
commit
ca6527df38
1 changed files with 6 additions and 5 deletions
|
@ -200,16 +200,17 @@ class Variant(val productFlavorName: String = "", val buildTypeName: String = ""
|
|||
if (isDefault) return sourceDirectories
|
||||
else {
|
||||
val result = arrayListOf<File>()
|
||||
if (! productFlavorName.isBlank()) {
|
||||
val dir = File(KFiles.joinDir("src", productFlavorName, project.projectInfo.sourceDirectory))
|
||||
log(2, "Adding source for product flavor $productFlavorName: ${dir.path}")
|
||||
result.add(dir)
|
||||
}
|
||||
// The ordering of files is: 1) build type 2) product flavor 3) default
|
||||
if (! buildTypeName.isBlank()) {
|
||||
val dir = File(KFiles.joinDir("src", buildTypeName, project.projectInfo.sourceDirectory))
|
||||
log(2, "Adding source for build type $buildTypeName: ${dir.path}")
|
||||
result.add(dir)
|
||||
}
|
||||
if (! productFlavorName.isBlank()) {
|
||||
val dir = File(KFiles.joinDir("src", productFlavorName, project.projectInfo.sourceDirectory))
|
||||
log(2, "Adding source for product flavor $productFlavorName: ${dir.path}")
|
||||
result.add(dir)
|
||||
}
|
||||
result.addAll(sourceDirectories)
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue