<@U2UJXRF0W> Is the project in the <compose demo> ...
# compose
i
@zsmb Is the project in the

compose demo

available on github? there’s no link in the comments or chat
s
z
That's the one! It won't match the live demo 100% because we had to deviate a bit to fit things in for time and actually build it live, but it's 95% the same code.
i
Thanks guys! i’m getting my app dev feet wet for the first time after 8 years of backending and i’m excited to use Kotlin for it :D
👍 2
@zsmb There seems to be an issue with android studio and compose, when i pull this project, or init a new project from the web wizard, the IEDA says “kotlin not configured”. if i try and fix it by clicking configure, it adds the “org.jetbrains.kotlin.android” plugin to both gradle build files, which is wrong and causes build errors
1
another question, is there a way to centrelize the java version config so we don;t have to do both
Copy code
kotlin {
    androidTarget {
        compilations.all {
            kotlinOptions {
                jvmTarget = "11"
            }
        }
    }
and
Copy code
android {
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
}
?
And regarding the android studio config issue, this also keeps popping up:
Copy code
Duplicate content roots detected

Path [/Users/ido/IdeaProjects/Lineup/composeApp/src/commonMain/resources] of module [Lineup.composeApp.commonMain] was removed from modules [Lineup.composeApp.main]
1
z
Kotlin not configured
Could you try using Android Studio Hedgehog? I believe this was a bug that was present in Giraffe with Kotlin 1.9, that you'd get that warning sometimes. In Hedgehog it should be fixed.
Java versions
Using
jvmToolchain
might help you depending on your project's needs, but it's complicated, see this page for example.
Duplicate content roots detected
Not sure where this issue is coming from, but it's being tracked here for example, vote for it if you're affected: https://youtrack.jetbrains.com/issue/KT-63925/
i
@zsmb first issue fixed with hedgehog. duplicate content roots still happening. i wonder why both commonMain/kotlin and commonMain/resources appear as source roots, whereas in intellij, normal kotlin mp projects, commonMin is the root and kotlin is src and resources is resources (as is normal)
z
I've just been pointed to a better reference point for the issue, you can find out more about it here: https://github.com/JetBrains/compose-multiplatform/issues/2913