Fixed import of transitive HMPP dependencies
#KT-36792 Fixed
This commit is contained in:
@@ -616,8 +616,6 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
|
|||||||
gradleCompilation.name,
|
gradleCompilation.name,
|
||||||
classifier
|
classifier
|
||||||
)]?.dependencies?.map { dependencyMapper.getDependency(it) }?.filterNotNull() ?: emptySet()
|
)]?.dependencies?.map { dependencyMapper.getDependency(it) }?.filterNotNull() ?: emptySet()
|
||||||
|
|
||||||
makeConfigurationNamesDefault(dependencyMapper)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -825,6 +823,8 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
|
|||||||
) {
|
) {
|
||||||
private val adjustmentMap = HashMap<ExternalDependency, List<ExternalDependency>>()
|
private val adjustmentMap = HashMap<ExternalDependency, List<ExternalDependency>>()
|
||||||
|
|
||||||
|
private val EXTRA_DEFAULT_CONFIGURATION_NAMES = listOf("metadataApiElements")
|
||||||
|
|
||||||
private val projectDependencyTransformation =
|
private val projectDependencyTransformation =
|
||||||
transformations.filter { it.projectPath != null }.associateBy { it.projectPath }
|
transformations.filter { it.projectPath != null }.associateBy { it.projectPath }
|
||||||
|
|
||||||
@@ -899,7 +899,8 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService {
|
|||||||
return adjustmentMap.getOrPut(dependency) {
|
return adjustmentMap.getOrPut(dependency) {
|
||||||
if (dependency !is ExternalProjectDependency)
|
if (dependency !is ExternalProjectDependency)
|
||||||
return@getOrPut adjustLibraryDependency(dependency, parentScope)
|
return@getOrPut adjustLibraryDependency(dependency, parentScope)
|
||||||
if (dependency.configurationName != Dependency.DEFAULT_CONFIGURATION)
|
if (dependency.configurationName != Dependency.DEFAULT_CONFIGURATION &&
|
||||||
|
!EXTRA_DEFAULT_CONFIGURATION_NAMES.contains(dependency.configurationName))
|
||||||
return@getOrPut listOf(dependency)
|
return@getOrPut listOf(dependency)
|
||||||
val artifacts = dependenciesByProjectPath[dependency.projectPath] ?: return@getOrPut listOf(dependency)
|
val artifacts = dependenciesByProjectPath[dependency.projectPath] ?: return@getOrPut listOf(dependency)
|
||||||
val artifactConfiguration = artifacts.mapTo(LinkedHashSet()) {
|
val artifactConfiguration = artifacts.mapTo(LinkedHashSet()) {
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.gradle
|
|
||||||
|
|
||||||
//BUNCH: 193
|
|
||||||
fun makeConfigurationNamesDefault(dependencyMapper: KotlinDependencyMapper) {
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.gradle
|
|
||||||
|
|
||||||
import org.jetbrains.plugins.gradle.model.DefaultExternalProjectDependency
|
|
||||||
|
|
||||||
//BUNCH: 193
|
|
||||||
fun makeConfigurationNamesDefault(dependencyMapper: KotlinDependencyMapper) {
|
|
||||||
dependencyMapper.toDependencyMap().values.forEach {
|
|
||||||
(it as? DefaultExternalProjectDependency)?.configurationName = "default"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user