Skip to content

Commit fc1845c

Browse files
committed
~ Drop 1.3.x hacks, turn on HMPP by default
1 parent 9c41b35 commit fc1845c

File tree

3 files changed

+9
-26
lines changed

3 files changed

+9
-26
lines changed

build.gradle

+4-5
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@ buildscript {
8787

8888
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
8989

90-
// Hierarchical project structures are not fully supported in 1.3.7x MPP, enable conditionally for 1.4.x
91-
// Also enable it in IDEA to properly import project structure
92-
if (Idea.active || VersionNumber.parse(kotlin_version) > VersionNumber.parse("1.3.79")) {
93-
ext.set("kotlin.mpp.enableGranularSourceSetsMetadata", "true")
94-
}
90+
//// Hierarchical project structures is enabled in IDEA to properly import project structure
91+
//if (Idea.active) {
92+
// ext.set("kotlin.mpp.enableGranularSourceSetsMetadata", "true")
93+
//}
9594

9695
// todo:KLUDGE: This is needed to workaround dependency resolution between Java and MPP modules
9796
def configureKotlinJvmPlatform(configuration) {

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
6060

6161
# This is commented out, and the property is set conditionally in build.gradle, because 1.3.71 doesn't work with it.
6262
# Once this property is set by default in new versions or 1.3.71 is dropped, either uncomment or remove this line.
63-
#kotlin.mpp.enableGranularSourceSetsMetadata=true
63+
kotlin.mpp.enableGranularSourceSetsMetadata=true
6464
kotlin.mpp.enableCompatibilityMetadataVariant=true

kotlinx-coroutines-core/build.gradle

+4-20
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,10 @@ compileKotlinMetadata {
110110
// :KLUDGE: Idea.active: This is needed to workaround resolve problems after importing this project to IDEA
111111
def configureNativeSourceSetPreset(name, preset) {
112112
def hostMainCompilation = project.kotlin.targetFromPreset(preset).compilations.main
113-
// Kotlin 1.3.x: Look for platform libraries in "compile" configuration
114-
def compileConfiguration = configurations[hostMainCompilation.compileDependencyConfigurationName]
115-
// Kotlin 1.4.x: Look for platform libraries in "implementation" for default source set
113+
// Look for platform libraries in "implementation" for default source set
116114
def implementationConfiguration = configurations[hostMainCompilation.defaultSourceSet.implementationMetadataConfigurationName]
117-
// Now find the libraries:
118-
// Kotlin 1.3.x: Find all platform libs
119-
// Kotlin 1.4.x: Finds platform libs & stdlib, but platform declarations are still not resolved due to IDE bugs
115+
// Now find the libraries: Finds platform libs & stdlib, but platform declarations are still not resolved due to IDE bugs
120116
def hostNativePlatformLibs = files(
121-
provider {
122-
compileConfiguration.findAll {
123-
it.path.endsWith(".klib") || it.absolutePath.contains("klib${File.separator}platform")
124-
}
125-
},
126117
provider {
127118
implementationConfiguration.findAll {
128119
it.path.endsWith(".klib") || it.absolutePath.contains("klib${File.separator}platform") || it.absolutePath.contains("stdlib")
@@ -158,17 +149,10 @@ kotlin.sourceSets {
158149
}
159150

160151
jvmTest.dependencies {
161-
// This is a workaround for https://youtrack.jetbrains.com/issue/KT-39037
162-
def excludingCurrentProject = { dependency ->
163-
def result = project.dependencies.create(dependency)
164-
result.exclude(module: project.name)
165-
return result
166-
}
167-
168-
api(excludingCurrentProject("org.jetbrains.kotlinx:lincheck:$lincheck_version"))
152+
api "org.jetbrains.kotlinx:lincheck:$lincheck_version"
169153
api "org.jetbrains.kotlinx:kotlinx-knit-test:$knit_version"
170154
api "com.esotericsoftware:kryo:4.0.0"
171-
implementation(excludingCurrentProject(project(":android-unit-tests")))
155+
implementation project(":android-unit-tests")
172156
}
173157
}
174158

0 commit comments

Comments
 (0)