mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Only existing sources.
This commit is contained in:
parent
2214677d92
commit
3161d68ba3
1 changed files with 4 additions and 2 deletions
|
@ -76,8 +76,8 @@ open class Project(
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val DEFAULT_SOURCE_DIRECTORIES = hashSetOf("src/main/java", "src/main/kotlin", "src/main/resources")
|
val DEFAULT_SOURCE_DIRECTORIES = setOf("src/main/java", "src/main/kotlin", "src/main/resources")
|
||||||
val DEFAULT_SOURCE_DIRECTORIES_TEST = hashSetOf("src/test/java", "src/test/kotlin")
|
val DEFAULT_SOURCE_DIRECTORIES_TEST = setOf("src/test/java", "src/test/kotlin")
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -92,6 +92,7 @@ open class Project(
|
||||||
private fun existing(dirs: Set<String>) = dirs.filter { File(directory, it).exists() }.toHashSet()
|
private fun existing(dirs: Set<String>) = dirs.filter { File(directory, it).exists() }.toHashSet()
|
||||||
|
|
||||||
var sourceDirectories = hashSetOf<String>().apply { addAll(DEFAULT_SOURCE_DIRECTORIES)}
|
var sourceDirectories = hashSetOf<String>().apply { addAll(DEFAULT_SOURCE_DIRECTORIES)}
|
||||||
|
get() = existing(field)
|
||||||
|
|
||||||
@Directive
|
@Directive
|
||||||
fun sourceDirectoriesTest(init: Sources.() -> Unit) : Sources {
|
fun sourceDirectoriesTest(init: Sources.() -> Unit) : Sources {
|
||||||
|
@ -99,6 +100,7 @@ open class Project(
|
||||||
}
|
}
|
||||||
|
|
||||||
var sourceDirectoriesTest = hashSetOf<String>().apply { addAll(DEFAULT_SOURCE_DIRECTORIES_TEST)}
|
var sourceDirectoriesTest = hashSetOf<String>().apply { addAll(DEFAULT_SOURCE_DIRECTORIES_TEST)}
|
||||||
|
get() = existing(field)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dependencies
|
// Dependencies
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue