[Gradle] KotlinTargetHierarchy.Module: Respect configuration from Android

KT-34662
This commit is contained in:
Sebastian Sellmair
2023-03-08 16:48:22 +01:00
committed by Space Team
parent 7ab6349ad5
commit 5fe6e3edbb
11 changed files with 125 additions and 43 deletions
@@ -13,8 +13,9 @@ interface KotlinTargetHierarchyBuilder {
fun group(name: String, build: KotlinTargetHierarchyBuilder.() -> Unit = {})
/* low-level APIs */
fun withCompilations(predicate: (KotlinCompilation<*>) -> Boolean)
fun withoutCompilations(predicate: (KotlinCompilation<*>) -> Boolean)
fun withCompilations(predicate: suspend (KotlinCompilation<*>) -> Boolean)
fun withoutCompilations(predicate: suspend (KotlinCompilation<*>) -> Boolean)
@Deprecated("Use plain 'withoutCompilations(!predicate) instead'", ReplaceWith("withoutCompilations { !predicate(it) }"))
fun filterCompilations(predicate: (KotlinCompilation<*>) -> Boolean) = withoutCompilations { !predicate(it) }