From 30f7a09b96cc4f84bae39dd3d38885cb4e3081c8 Mon Sep 17 00:00:00 2001 From: Drew Hamilton Date: Mon, 16 Dec 2024 13:34:19 -0600 Subject: [PATCH] Replace KotlinTopLevelExtensionConfig with KotlinBaseExtension in PokoBuildPlugin --- .../java/dev/drewhamilton/poko/build/PokoBuildPlugin.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build-support/src/main/java/dev/drewhamilton/poko/build/PokoBuildPlugin.kt b/build-support/src/main/java/dev/drewhamilton/poko/build/PokoBuildPlugin.kt index 5e674de4..538b5ba6 100644 --- a/build-support/src/main/java/dev/drewhamilton/poko/build/PokoBuildPlugin.kt +++ b/build-support/src/main/java/dev/drewhamilton/poko/build/PokoBuildPlugin.kt @@ -8,7 +8,8 @@ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.plugins.AppliedPlugin import org.gradle.kotlin.dsl.buildConfigField -import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtensionConfig +import org.gradle.kotlin.dsl.getByType +import org.jetbrains.kotlin.gradle.dsl.KotlinBaseExtension import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask private val Project.pokoGroupId get() = property("PUBLISH_GROUP") as String @@ -88,9 +89,7 @@ class PokoBuildPlugin : Plugin { // Published modules should be explicit about their API visibility. val kotlinPluginHandler = Action { - val kotlin = project.extensions.getByType( - KotlinTopLevelExtensionConfig::class.java - ) + val kotlin = project.extensions.getByType() kotlin.explicitApi() } project.pluginManager.withPlugin("org.jetbrains.kotlin.jvm", kotlinPluginHandler)