Expand AndroidSourceSet#kotlinSourceSet to AndroidSourceSet#kotlinSourceSetOrNull

This commit is contained in:
sebastian.sellmair
2020-11-20 12:46:09 +01:00
committed by Sebastian Sellmair
parent 3e5cbf324d
commit 3f98e2974c
@@ -35,11 +35,14 @@ internal fun syncKotlinAndAndroidSourceSets(target: KotlinAndroidTarget) {
} }
internal var AndroidSourceSet.kotlinSourceSet: KotlinSourceSet internal var AndroidSourceSet.kotlinSourceSet: KotlinSourceSet
get() = getConvention(KOTLIN_DSL_NAME) as KotlinSourceSet get() = checkNotNull(kotlinSourceSetOrNull) { "Missing kotlinSourceSet for Android source set $name" }
private set(value) { private set(value) {
addConvention(KOTLIN_DSL_NAME, value) addConvention(KOTLIN_DSL_NAME, value)
} }
internal val AndroidSourceSet.kotlinSourceSetOrNull: KotlinSourceSet?
get() = getConvention(KOTLIN_DSL_NAME) as? KotlinSourceSet
private fun createDefaultDependsOnEdges( private fun createDefaultDependsOnEdges(
target: KotlinAndroidTarget, target: KotlinAndroidTarget,
kotlinSourceSet: KotlinSourceSet, kotlinSourceSet: KotlinSourceSet,