I'm trying to use graalvm with compose for desktop...
# compose-desktop
u
I'm trying to use graalvm with compose for desktop, I'm using Liberica Native Image Kit but I can't run the app, I get the error
Copy code
Caused by: org.jetbrains.skiko.LibraryLoadException: Cannot find libskiko-linux-x64.so.sha256, proper native dependency missing.
a
It is my understanding that graalvm doesn’t work well with AWT/Swing, on which Compose for Desktop is build.
yes black 1
u
a
Do you have
Copy code
dependencies {
    implementation(compose.desktop.currentOs)
}
?
u
yes
Copy code
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
    kotlin("jvm")
    id("org.jetbrains.compose")
    id("org.jetbrains.kotlin.plugin.compose")
    id("org.graalvm.buildtools.native") version "0.10.4"

}

group = "com.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven("<https://maven.pkg.jetbrains.space/public/p/compose/dev>")
    google()
}

dependencies {
    implementation(compose.desktop.currentOs)
}

kotlin {
    compilerOptions {
        jvmTarget.set(JvmTarget.JVM_17)
    }
}

compose.desktop {
    application {
        mainClass = "MainKt"

    }
}


graalvmNative {
    binaries {
        named("main") {
            imageName.set("demo")
            mainClass.set("MainKt")
            buildArgs.addAll(
                "-Djava.awt.headless=false",
            )

        }
    }
    binaries.all {
        javaLauncher.set(
            project.javaToolchains.launcherFor {
                languageVersion.set(JavaLanguageVersion.of(17))
            }
        )
    }
    agent{
        defaultMode.set("standard")

        metadataCopy {
            inputTaskNames.add("run") // Tasks previously executed with the agent attached.
            outputDirectories.add("src/main/resources/META-INF/native-image")
            mergeWithExisting.set(true)
        }
    }
}
I also tried with :
Copy code
dependencies {
    implementation(compose.desktop.linux_x64)
}
m