gmazzo/gradle-buildconfig-plugin

Plugin enforces buildscript to use Kotlin 1.4.31

Him188 opened this issue · 3 comments

plugins {
    kotlin("multiplatform") version "1.6.0"
    id("com.github.gmazzo.buildconfig") version "3.0.3"
}

Then Gradle will use Kotlin 1.4.31, where 'macosArm64' is not available.

image

If I remove the BuildConfig plugin, it will work.

I did some investigations and find the potential cause here:

implementation(kotlin("gradle-plugin"))

This adds the kotlin-gradle-plugin to classpath to buildscript, which might have higher priority than resolution for the plugins block.

Here is one workaround by a member of Gradle, Him188/maven-central-publish#5, and the corresponding test here Him188/maven-central-publish#6. Hope that helps!

@Him188 on a tangent, how did you debug this? I'm facing a similar issue in Doist/ffs, but I can't tell what's pulling the outdated dependency. Did you remove yours 1 by 1 until it worked?

@goncalossilva

I only applied kotlin and this plugin so I can tell quickly.
You can try task 'dependencies'. Find something like 'compilerPluginClasspath' or just search kotlin-compiler or kotlin-gradle.