Hi, I'm trying to build an artifact of my compose desktop project, but its throwing this error: ```K...
f
Hi, I'm trying to build an artifact of my compose desktop project, but its throwing this error:
Copy code
Kotlin: The provided plugin androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar is not compatible with this version of compiler.
java.lang.AbstractMethodError: Receiver class androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar does not define or inherit an implementation of the resolved method 'abstract void registerProjectComponents(com.intellij.mock.MockProject, org.jetbrains.kotlin.config.CompilerConfiguration)' of interface org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar.
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:666)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.registerExtensionsFromPlugins(KotlinCoreEnvironment.kt:168)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.configureProjectEnvironment(KotlinCoreEnvironment.kt:569)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:198)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:107)
a
https://github.com/JetBrains/compose-multiplatform-desktop-template#readme There you'll see:
Copy code
plugins {
   kotlin("jvm") version "1.8.20"
   id("org.jetbrains.compose") version "1.4.0"
}
f
same error with 1.8.x combinations
a
What is your gradle config?
f
Copy code
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.*

plugins {
    kotlin("jvm") version "1.8.10"
    id("org.jetbrains.compose") version "1.3.1"
}

group = "com.package"
version = "1.0.0"

repositories {
    google()
    mavenCentral()
}

dependencies {
    implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))

    implementation("org.jetbrains.kotlin:kotlin-stdlib:1.8.10")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:1.6.4")

    implementation(compose.desktop.currentOs)

implementation("io.insert-koin:koin-core:3.2.0")
    implementation("com.google.code.gson:gson:2.8.9")
    implementation("io.reactivex.rxjava2:rxkotlin:2.4.0")

    implementation("com.diogonunes:JColor:5.5.1")

    testImplementation(kotlin("test"))
}

tasks.test {
    useJUnitPlatform()
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "11"
}

compose.desktop {
    application {
        mainClass = "AppKt"
        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "appName"
            packageVersion = "1.0.0"
        }
    }
}
it's pretty simple
any idea?
a
No clue. Don't know about your ,jar files though that you include. Does it work if you create a minimal app?
f
Didn't tried, but by clicking Run button, the app works, it just fails to create the artifact
d
a
I posted that above and his Gradle reflects the compatibility table