[Gradle][KPM] Split fragment factories into composable entities

This compasability will ensure that external target authors
(AGP) are able to reuse most of KPM code whilst allowing a lot of
customizability.
This commit is contained in:
sebastian.sellmair
2021-11-24 11:37:36 +01:00
committed by Space
parent 386e2e0950
commit 1fb723f844
44 changed files with 1228 additions and 480 deletions
@@ -21,6 +21,8 @@ interface KotlinModuleFragment {
// TODO: should this be source roots or source files?
val kotlinSourceRoots: Iterable<File>
companion object
}
interface KotlinModuleVariant : KotlinModuleFragment {
@@ -72,4 +74,4 @@ class BasicKotlinModuleVariant(
), KotlinModuleVariant {
override val variantAttributes: MutableMap<KotlinAttributeKey, String> = mutableMapOf()
override fun toString(): String = "variant $fragmentName"
}
}