[Gradle] Implement 'Project.kotlinPropertiesProvider' extension

This extension should increase discoverability over the previous
'PropertiesProvider(project)' API
This commit is contained in:
sebastian.sellmair
2021-11-15 13:39:42 +01:00
committed by Space
parent 373dcef45d
commit c56c503426
@@ -145,7 +145,9 @@ internal class PropertiesProvider private constructor(private val project: Proje
var mpp13XFlagsSetByPlugin: Boolean
get() = booleanProperty("kotlin.internal.mpp.13X.flags.setByPlugin") ?: false
set(value) { project.extensions.extraProperties.set("kotlin.internal.mpp.13X.flags.setByPlugin", "$value") }
set(value) {
project.extensions.extraProperties.set("kotlin.internal.mpp.13X.flags.setByPlugin", "$value")
}
val mppHierarchicalStructureByDefault: Boolean
get() = booleanProperty(KOTLIN_MPP_HIERARCHICAL_STRUCTURE_BY_DEFAULT) ?: false
@@ -429,5 +431,7 @@ internal class PropertiesProvider private constructor(private val project: Proje
return get(CACHED_PROVIDER_EXT_NAME) as? PropertiesProvider
?: PropertiesProvider(project) // Fallback if multiple class loaders are involved
}
internal val Project.kotlinPropertiesProvider get() = PropertiesProvider(this)
}
}