Skip to content

Commit

Permalink
WA for broken atomicfu compiler plugin dependency in kotlin 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mvicsokolova authored and woainikk committed Aug 17, 2022
1 parent f8fb838 commit b902150
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,35 @@ allprojects {
}
}

dependencies {
components {
withModule("org.jetbrains.kotlin:atomicfu") {
withVariant("runtimeElements") {
val runtimeElementsVariant = this
this@withModule.addVariant("runtimeJsIrElements") {
attributes.attribute(
org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType.attribute,
org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType.js
)
attributes.attribute(
org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.jsCompilerAttribute,
org.jetbrains.kotlin.gradle.targets.js.KotlinJsCompilerAttribute.ir
)
attributes.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage.JAVA_RUNTIME))
runtimeElementsVariant.withFiles {
val runtimeElementsFiles = this as org.gradle.api.internal.artifacts.repositories.resolver.DefaultMutableVariantFilesMetadata
this@addVariant.withFiles {
runtimeElementsFiles.files.forEach {
addFile(it.name)
}
}
}
}
}
}
}
}

kotlin {
targets.all {

Expand Down

0 comments on commit b902150

Please sign in to comment.