https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
j

jw

08/23/2022, 2:08 PM
Are the JetBrains compiler and runtime now versioned independently? I see dev764 of the runtime (also on the GitHub releases) but only 755 of the compiler.
👀 2
e

eygraber

08/23/2022, 2:31 PM
Maybe dev764 uses 1.3.0 alpha?
j

jw

08/23/2022, 2:34 PM
The release notes say it's based on 1.2.1
e

eygraber

08/23/2022, 2:35 PM
Looks like it's hard coded in the gradle plugin to the value in the property
i

Igor Demin

08/23/2022, 2:35 PM
Yes, Compiler will be released independently and stable versions will be released faster. That is because Google also switched Compiler to a separate release cycle. We don’t do automatic dev builds for compiler now, only manual ones, which are built directly from stable commit of Google’s compiler. We are also experimenting with approach, when we don’t build our compiler at all, and just use compiler published by Google. Will this cause any issue?
j

jw

08/23/2022, 2:40 PM
Nope. Just eager to use the new iOS simulator target in the runtime so we can stop building our own runtime!
oh no it didn't make it in time for the release. looking forward to the next one then!
We are also experimenting with approach, when we don’t build our compiler at all, and just use compiler published by Google.
Yes, please! I would love to switch back to that as well. I advocated for them to ship a non-relocated copy back when native needed it but they never did. Now that we only need a relocated version as long as you all are still upstreaming native and JS fixes I would greatly prefer to stick to theirs.
d

Didier Villevalois

08/23/2022, 9:13 PM
@jw This seems to work well for me with JetBrains' Compose Gradle plugin and Google's Compose compiler plugin: `gradle.propreties`:
Copy code
kotlinVersion=1.7.10
serializationVersion=1.4.0
coroutinesVersion=1.6.4
ktorVersion=2.1.0

composeCompilerVersion=1.3.0
composeVersion=1.2.0-alpha01-dev755
`settings.gradle.kts`:
Copy code
pluginManagement {
    // ...

    plugins {
        kotlin("multiplatform") version kotlinVersion
        kotlin("plugin.serialization") version kotlinVersion
        id("org.jetbrains.compose") version composeVersion
    }
}
Root `build.gradle.kts`:
Copy code
// ...

plugins {
    kotlin("multiplatform") apply false
    kotlin("plugin.serialization") apply false
    id("org.jetbrains.compose") apply false
}

allprojects {
    configurations.all {
        resolutionStrategy.dependencySubstitution {
            substitute(module("org.jetbrains.compose.compiler:compiler")).apply {
                using(module("androidx.compose.compiler:compiler:$composeCompilerVersion"))
            }
        }
    }
}
Child module with Compose's `build.gradle.kts`:
Copy code
plugins {
    kotlin("multiplatform")
    id("org.jetbrains.compose")
}

// Usual kotlin {} and compose {} configuration
// ...
Platform: Gradle 7.5.1 / OpenJDK 17.0.4 / Fedora 36 (Gnome+Wayland+Pipewire) / GNU/Linux 5.18.18-200.fc36.x86_64
j

jw

08/23/2022, 9:17 PM
Yeah we already have a project working. We switched from Google's compiler to JetBrains' because it had essential fixes for native and JS targets that weren't upstream yet a few months ago. Now that Kotlin 1.7 drops the need for a hosted version of compiler plugins and since JB upstreamed their fixes it's probably safe to switch back. And as soon as the next runtime release is out we can stop building our own runtime for iOS.
d

Didier Villevalois

08/23/2022, 9:19 PM
Sorry, I think I was out of subject. 😛 (I had difficulties gathering all the ingredients from the different threads.)
5 Views