Add js compiler disambiguation attribute to fix errors on project import
There were remaining configurations in legacy JS projects with amiguous attributes requesting kotlin-stdlib. They are not used in build, but resolved on import.
This commit is contained in:
committed by
Space Team
parent
e380610ab0
commit
c98377af7b
@@ -29,8 +29,10 @@ kotlin {
|
|||||||
val test by compilations.getting
|
val test by compilations.getting
|
||||||
// TODO: Remove together with kotlin.js.compiler.publish.attribute=false property
|
// TODO: Remove together with kotlin.js.compiler.publish.attribute=false property
|
||||||
listOf(main, test).forEach { compilation ->
|
listOf(main, test).forEach { compilation ->
|
||||||
configurations[compilation.compileDependencyConfigurationName].attributes {
|
listOf(compilation.compileDependencyConfigurationName, compilation.runtimeDependencyConfigurationName).forEach { configurationName ->
|
||||||
attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, KotlinJsCompilerAttribute.ir)
|
configurations[configurationName].attributes {
|
||||||
|
attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, KotlinJsCompilerAttribute.ir)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ apply plugin: 'kotlin-platform-js'
|
|||||||
configurations {
|
configurations {
|
||||||
distJs
|
distJs
|
||||||
distLibrary
|
distLibrary
|
||||||
[compileClasspath, testCompileClasspath, testRuntimeClasspath].forEach {
|
[compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath].forEach {
|
||||||
it.attributes {
|
it.attributes {
|
||||||
attribute(org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.jsCompilerAttribute, org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.legacy)
|
attribute(org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.jsCompilerAttribute, org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.legacy)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ configurations {
|
|||||||
attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, KotlinJsCompilerAttribute.legacy)
|
attribute(KotlinJsCompilerAttribute.jsCompilerAttribute, KotlinJsCompilerAttribute.legacy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[compileClasspath, testCompileClasspath, testRuntimeClasspath].forEach {
|
[compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath].forEach {
|
||||||
it.attributes {
|
it.attributes {
|
||||||
attribute(org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.jsCompilerAttribute, org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.legacy)
|
attribute(org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.jsCompilerAttribute, org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.legacy)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user