[Gradle] Inline 'sourceSetFreeCompilerArgsPropertyName' to its use site

KT-61634
This commit is contained in:
Sebastian Sellmair
2023-10-18 11:53:05 +02:00
committed by Space Team
parent 90230dda60
commit 3210fdfec4
2 changed files with 1 additions and 4 deletions
@@ -29,8 +29,5 @@ class KotlinMultiplatformPlugin : Plugin<Project> {
companion object { companion object {
const val METADATA_TARGET_NAME = "metadata" const val METADATA_TARGET_NAME = "metadata"
internal fun sourceSetFreeCompilerArgsPropertyName(sourceSetName: String) =
"kotlin.mpp.freeCompilerArgsForSourceSet.$sourceSetName"
} }
} }
@@ -32,7 +32,7 @@ internal val SyncLanguageSettingsWithKotlinExtensionSetupAction = KotlinProjectS
languageSettings.freeCompilerArgsProvider = project.provider { languageSettings.freeCompilerArgsProvider = project.provider {
val propertyValue = with(project.extensions.extraProperties) { val propertyValue = with(project.extensions.extraProperties) {
val sourceSetFreeCompilerArgsPropertyName = KotlinMultiplatformPlugin.sourceSetFreeCompilerArgsPropertyName(sourceSet.name) val sourceSetFreeCompilerArgsPropertyName = "kotlin.mpp.freeCompilerArgsForSourceSet.${sourceSet.name}"
if (has(sourceSetFreeCompilerArgsPropertyName)) { if (has(sourceSetFreeCompilerArgsPropertyName)) {
get(sourceSetFreeCompilerArgsPropertyName) get(sourceSetFreeCompilerArgsPropertyName)
} else null } else null