Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private val compilerOptionsMethod by lazy {
}
}

private class KgpImpl(private val dependencyHandler: DependencyHandler, extension: Any, private val providers: ProviderFactory, private val kgpVersion: String) : Kgp {
private class KgpImpl(private val project: Project, private val dependencyHandler: DependencyHandler, extension: Any, private val providers: ProviderFactory, private val kgpVersion: String) : Kgp {
private val kotlinProjectExtension: KotlinProjectExtension = extension as KotlinProjectExtension

override fun javaCompatibility(version: Int) {
Expand Down Expand Up @@ -102,9 +102,7 @@ private class KgpImpl(private val dependencyHandler: DependencyHandler, extensio
* See https://youtrack.jetbrains.com/issue/KT-66755/
*/
val isStdlibDefaultDependencyEnabled =
providers.gradleProperty("kotlin.stdlib.default.dependency")
.map { it.toBooleanStrictOrNull() != false }
.getOrElse(true)
project.findProperty("kotlin.stdlib.default.dependency")?.toString()?.toBooleanStrictOrNull() != false

if (isStdlibDefaultDependencyEnabled) {
/**
Expand Down Expand Up @@ -226,7 +224,7 @@ internal fun Project.onKgp(block: (Kgp) -> Unit) {
plugins.withType(KotlinBasePlugin::class.java).configureEach {
if(!hasKgp) {
hasKgp = true
block(KgpImpl(this.dependencies, extensions.getByName("kotlin"), providers, getKotlinPluginVersion()))
block(KgpImpl(this, this.dependencies, extensions.getByName("kotlin"), providers, getKotlinPluginVersion()))
}
}
}