Warning: Unsupported Kotlin plugin version

I’ve got a kotlin multiplatform library, and I’d like to have a sub-project that publishes some plugins written in Kotlin.

However, I get the warning “Warning: Unsupported Kotlin plugin version.” if I try to use the kotlin-dsl plugin when the rest of the project uses kotlin(“multiplatform”)
Any suggestions how to avoid this warning?

(It doesn’t seem to matter that the root project doesn’t apply any kotlin plugins)

I believe I’m just working around the warning and not solving the reason for the warning, but this is what I did:

plugins {
    `maven-publish`
    `java-gradle-plugin`
    kotlin("jvm")
}

repositories {
    jcenter()
    gradlePluginPortal()
}

val kotlinVersion: String by extra
val dokkaVersion: String by extra

dependencies {
    compileOnly(gradleKotlinDsl())
    compileOnly(gradleApi())
    implementation(kotlin("gradle-plugin", version = kotlinVersion))
    implementation(kotlin("gradle-plugin-api", version = kotlinVersion))

...
}