Apply Kotlin multiplatform plugin via gradle legacy plugin application

In general, you can use apply false in the plugins DSL and call apply conditionally. Apply alone will NEVER work with Kotlin DSL, it only works with dynamic Groovy. Kotlin can work like Groovy if you also use the plugins DSL + apply false in it. Example:

plugins {
    kotlin("multiplatform") apply false // Applied conditionally later
}

For more detailed discussion of the problem check this.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top