Add basic support for Kotlin/Native variants to the PM20 Gradle plugin

This commit is contained in:
Sergey Igushkin
2021-03-19 18:24:03 +03:00
parent 401fbae8d8
commit f029179fe0
30 changed files with 713 additions and 391 deletions
@@ -25,15 +25,15 @@ interface KotlinDependencyGraphResolver {
fun resolveDependencyGraph(requestingModule: KotlinModule): DependencyGraphResolution
}
sealed class DependencyGraphResolution(val requestingModule: KotlinModule) {
sealed class DependencyGraphResolution(open val requestingModule: KotlinModule) {
class Unknown(requestingModule: KotlinModule) : DependencyGraphResolution(requestingModule)
class DependencyGraph(requestingModule: KotlinModule, val root: DependencyGraphNode): DependencyGraphResolution(requestingModule)
open class DependencyGraph(requestingModule: KotlinModule, open val root: DependencyGraphNode): DependencyGraphResolution(requestingModule)
}
// TODO: should this be a single graph for all dependency scopes as well, not just for all fragments?
class DependencyGraphNode(
val module: KotlinModule,
val dependenciesByFragment: Map<KotlinModuleFragment, Iterable<DependencyGraphNode>>
open class DependencyGraphNode(
open val module: KotlinModule,
open val dependenciesByFragment: Map<KotlinModuleFragment, Iterable<DependencyGraphNode>>
) {
override fun toString(): String = "node ${module}"
}