in plugin/gradle/kmp/src/main/kotlin/com/jetbrains/packagesearch/plugin/gradle/PackageSearchKotlinMultiplatformVariant.kt [100:121]
override fun addDependency(
context: EditModuleContext,
apiPackage: ApiPackage,
selectedVersion: String,
selectedScope: String?,
) {
context.validate()
when (apiPackage) {
is ApiMavenPackage -> {
val newDescriptor = MppDependency.Maven(
groupId = apiPackage.groupId,
artifactId = apiPackage.artifactId,
version = selectedVersion,
configuration = selectedScope ?: defaultScope
)
context.kmpData.install(
sourceSet = name,
descriptor = newDescriptor
)
}
}
}