[Gradle, JS] No NPM tools configuration
This commit is contained in:
-24
@@ -137,33 +137,9 @@ internal class KotlinCompilationNpmResolver(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createNpmToolsConfiguration()?.let { tools ->
|
|
||||||
all.extendsFrom(tools)
|
|
||||||
}
|
|
||||||
|
|
||||||
return all
|
return all
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createNpmToolsConfiguration(): Configuration? {
|
|
||||||
val taskRequirements = projectResolver.taskRequirements.getTaskRequirements(compilation)
|
|
||||||
if (taskRequirements.isEmpty()) return null
|
|
||||||
|
|
||||||
val toolsConfiguration = project.configurations.create(compilation.disambiguateName("npmTools"))
|
|
||||||
|
|
||||||
toolsConfiguration.isVisible = false
|
|
||||||
toolsConfiguration.isCanBeConsumed = false
|
|
||||||
toolsConfiguration.isCanBeResolved = true
|
|
||||||
toolsConfiguration.description = "NPM Tools configuration for $compilation."
|
|
||||||
|
|
||||||
taskRequirements.forEach { requirement ->
|
|
||||||
requirement.requiredNpmDependencies.forEach { requiredNpmDependency ->
|
|
||||||
toolsConfiguration.dependencies.add(requiredNpmDependency.createDependency(project))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return toolsConfiguration
|
|
||||||
}
|
|
||||||
|
|
||||||
data class ExternalGradleDependency(
|
data class ExternalGradleDependency(
|
||||||
val dependency: ResolvedDependency,
|
val dependency: ResolvedDependency,
|
||||||
val artifact: ResolvedArtifact
|
val artifact: ResolvedArtifact
|
||||||
|
|||||||
Reference in New Issue
Block a user