Skip to content

Commit

Permalink
Replace KotlinTopLevelExtensionConfig with KotlinBaseExtension in Pok…
Browse files Browse the repository at this point in the history
…oBuildPlugin (#453)
  • Loading branch information
drewhamilton authored Dec 16, 2024
1 parent 9281ce8 commit 79e50bf
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -88,9 +89,7 @@ class PokoBuildPlugin : Plugin<Project> {

// Published modules should be explicit about their API visibility.
val kotlinPluginHandler = Action<AppliedPlugin> {
val kotlin = project.extensions.getByType(
KotlinTopLevelExtensionConfig::class.java
)
val kotlin = project.extensions.getByType<KotlinBaseExtension>()
kotlin.explicitApi()
}
project.pluginManager.withPlugin("org.jetbrains.kotlin.jvm", kotlinPluginHandler)
Expand Down

0 comments on commit 79e50bf

Please sign in to comment.