Skip to content

Commit 95ffd3b

Browse files
committed
Fixed issues with HMPP + AtomicFU version 0.14.3
* Use the atomicfu root MPP module dependency, 'atomicfu-native' * Enable compatibility metadata variant publishing for consumers without HMPP * Enable Gradle module metadata needed for HMPP to resolve dependencies properly * Use AtomicFU version 0.14.3
1 parent 1540cf7 commit 95ffd3b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

gradle.properties

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ kotlin_version=1.3.71
99

1010
# Dependencies
1111
junit_version=4.12
12-
atomicfu_version=0.14.2
12+
atomicfu_version=0.14.3
1313
knit_version=0.1.3
1414
html_version=0.6.8
1515
lincheck_version=2.5.3
@@ -53,4 +53,5 @@ jekyll_version=4.0
5353
# TODO: Remove once KT-37187 is fixed
5454
org.gradle.jvmargs=-Xmx2g
5555

56-
kotlin.mpp.enableGranularSourceSetsMetadata=true
56+
kotlin.mpp.enableGranularSourceSetsMetadata=true
57+
kotlin.mpp.enableCompatibilityMetadataVariant=true

integration-testing/build.gradle

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5+
import org.gradle.api.attributes.Usage
6+
57
apply from: rootProject.file("gradle/compile-jvm.gradle")
68

79
repositories {
@@ -49,9 +51,12 @@ task mavenTest(type: Test) {
4951
classpath = sourceSet.runtimeClasspath
5052
// we can't depend on the subprojects because we need to test the classfiles that are published in the end.
5153
// also, we can't put this in the `dependencies` block because the resolution would happen before publication.
52-
classpath += project.configurations.detachedConfiguration(
54+
def configuration = project.configurations.detachedConfiguration(
5355
project.dependencies.create("org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"),
5456
project.dependencies.create("org.jetbrains.kotlinx:kotlinx-coroutines-android:$version"))
57+
// We need to specify an appropriate attribute for this configuration so that metadata resolves properly
58+
configuration.attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.class, Usage.JAVA_RUNTIME))
59+
classpath += configuration
5560
}
5661

5762
task debugAgentTest(type: Test) {

kotlinx-coroutines-core/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ kotlin {
6060
dependencies {
6161
// todo: we should not need it
6262
// todo: it must be compileOnly or JVM is spoiled !!!
63-
implementation "org.jetbrains.kotlinx:atomicfu-common:$atomicfu_version"
63+
implementation "org.jetbrains.kotlinx:atomicfu-native:$atomicfu_version"
6464
}
6565
}
6666
}

0 commit comments

Comments
 (0)