[mpp] Remove the kotlin.native.enableDependencyPropagation property

This property isn't used in IDE import since 222 (KTIJ-21525)
De-facto it was set to false by the code in
hierarchicalStructureMigrationHandling.kt if HMPP is enabled.
And in the future commit we will forbid to disable the HMPP

#KT-48554 In progress
This commit is contained in:
Stanislav Erokhin
2023-07-28 18:08:05 +02:00
committed by teamcity
parent 2c4569568b
commit a58dd84cdc
5 changed files with 1 additions and 18 deletions
@@ -15,10 +15,4 @@ kotlin {
dependsOn(myCustomSourceSet)
}
}
}
afterEvaluate {
// NB: HMPP-flags are reported by the custom code that needs to run directly after plugin application rather than in
// afterEvaluate, so this reporting will be missed
setProperty("kotlin.native.enableDependencyPropagation", "false")
}
}
@@ -41,7 +41,6 @@ import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLI
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_MPP_IMPORT_ENABLE_KGP_DEPENDENCY_RESOLUTION
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_MPP_IMPORT_ENABLE_SLOW_SOURCES_JAR_RESOLVER
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_PUBLISH_JVM_ENVIRONMENT_ATTRIBUTE
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_NATIVE_DEPENDENCY_PROPAGATION
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_NATIVE_IGNORE_DISABLED_TARGETS
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_NATIVE_SUPPRESS_EXPERIMENTAL_ARTIFACTS_DSL_WARNING
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_NATIVE_USE_XCODE_MESSAGE_STYLE
@@ -211,9 +210,6 @@ internal class PropertiesProvider private constructor(private val project: Proje
val hierarchicalStructureSupport: Boolean
get() = booleanProperty(KOTLIN_MPP_HIERARCHICAL_STRUCTURE_SUPPORT) ?: mppHierarchicalStructureByDefault
val nativeDependencyPropagation: Boolean?
get() = booleanProperty(KOTLIN_NATIVE_DEPENDENCY_PROPAGATION)
var mpp13XFlagsSetByPlugin: Boolean
get() = booleanProperty(MPP_13X_FLAGS_SET_BY_PLUGIN) ?: false
set(value) {
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLI
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider.PropertyNames.KOTLIN_NATIVE_DEPENDENCY_PROPAGATION
import org.jetbrains.kotlin.gradle.plugin.diagnostics.KotlinToolingDiagnostics
import org.jetbrains.kotlin.gradle.plugin.diagnostics.kotlinToolingDiagnosticsCollector
import org.jetbrains.kotlin.gradle.utils.runProjectConfigurationHealthCheckWhenEvaluated
import org.jetbrains.kotlin.tooling.core.UnsafeApi
internal fun runDeprecationDiagnostics(project: Project) {
@@ -56,5 +55,4 @@ internal val deprecatedMppProperties: List<String> = listOf(
private val propertiesSetByPlugin: Set<String> = setOf(
KOTLIN_MPP_ENABLE_GRANULAR_SOURCE_SETS_METADATA,
KOTLIN_NATIVE_DEPENDENCY_PROPAGATION,
)
@@ -27,7 +27,6 @@ private fun doHandleHierarchicalStructureFlagsMigration(project: Project) {
if (hierarchicalStructureSupport) {
if (project === project.rootProject)
project.extensions.extraProperties.getOrPut(PropertyNames.KOTLIN_MPP_ENABLE_GRANULAR_SOURCE_SETS_METADATA) { "true" }
project.extensions.extraProperties.getOrPut(PropertyNames.KOTLIN_NATIVE_DEPENDENCY_PROPAGATION) { "false" }
PropertiesProvider(project).mpp13XFlagsSetByPlugin = true
}
}
@@ -108,9 +108,6 @@ private fun File.listLibraryFiles(): List<File> = listFiles().orEmpty()
.filter { it.isDirectory || it.extension == "klib" }
internal val Project.isNativeDependencyPropagationEnabled: Boolean
get() = PropertiesProvider(this).nativeDependencyPropagation ?: true
/**
* Function signature needs to be kept stable since this is used during import
* in IDEs (KotlinCommonizerModelBuilder) < 222
@@ -124,5 +121,4 @@ internal fun Project.isAllowCommonizer(): Boolean {
return multiplatformExtension.targets.any { it.platformType == KotlinPlatformType.native }
&& isKotlinGranularMetadataEnabled
&& !isNativeDependencyPropagationEnabled // temporary fix: turn on commonizer only when native deps propagation is disabled
}