mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-29 17:38:12 -07:00
Refactor source sets.
This commit is contained in:
parent
9bbb9fe09d
commit
53bf5cbd4b
4 changed files with 27 additions and 18 deletions
|
@ -68,9 +68,7 @@ class Variant(val initialProductFlavor: ProductFlavorConfig? = null,
|
|||
private fun sourceDirectories(project: Project, suffix: String, variantFirst: Boolean, sourceSet: SourceSet)
|
||||
: List<File> {
|
||||
val result = arrayListOf<File>()
|
||||
val sourceDirectories = (if (sourceSet == SourceSet.MAIN) project.sourceDirectories
|
||||
else if (sourceSet == SourceSet.TEST) project.sourceDirectoriesTest
|
||||
else throw KobaltException("Unknown source set: $sourceSet"))
|
||||
val sourceDirectories = sourceSet.correctSourceSet(project)
|
||||
.filter { File(project.directory, it).exists() }
|
||||
.map { File(it) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue