jim

    jim

    1 year ago
    I just merged (https://android-review.googlesource.com/c/platform/frameworks/support/+/1506451) support for Kotlin 1.4.20, so for those of you who like living on the edge, a compatible build should appear in the snapshots server very shortly. For the rest of you, it means our next alpha release.
    John O'Reilly

    John O'Reilly

    1 year ago
    is there any eta right now for the alpha release that will support this?
    jim

    jim

    1 year ago
    After thanksgiving.
    John O'Reilly

    John O'Reilly

    1 year ago
    ok, thanks
    itnoles

    itnoles

    1 year ago
    Thankful Gifts 🙂
    Colton Idle

    Colton Idle

    1 year ago
    Might be a dumb question. But how does one use a snapshot build?
    Colton Idle

    Colton Idle

    1 year ago
    @jim getting this error
    e: androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: You are using an outdated version of Compose Runtime that is not compatible with the version of the Compose Compiler plugin you have installed. The compose compiler plugin you are using (version 1.0.0-alpha08) expects a minimum runtime version of 1.0.0-alpha08.
    jim

    jim

    1 year ago
    Yeah, it's hard to tell what's going on there because it tells you that it expects a minimum runtime version, but it doesn't tell you what version it thinks you're using. Assuming the verification is correct, you would need to confirm you're fetching your runtime jars from the same snapshot server that you're getting the compiler from (ie. not from gmaven). It's also conceivable there is a bug in how snapshot versions are compared, but again, hard to tell without it telling you what it thinks the runtime version is. cc @Leland Richardson [G]
    l

    Leland Richardson [G]

    1 year ago
    Hmm. I'll look at this when I get home. I'm not sure this logic was written to deal with snapshot versioning appropriately
    Colton Idle

    Colton Idle

    1 year ago
    Cool. It's my first time using a snapshot so I'm glad to see that it's probably not my fault. 😄
    a

    Alexjlockwood

    1 year ago
    @cb any chance we could generate a snapshot for accompanist v0.3.3 that is compatible with the most recent compose snapshot? seems like the last snapshot that was generated was 2 days before jim merged his CL
    Colton Idle

    Colton Idle

    1 year ago
    @Alexjlockwood are you able to use the latest compose snapshot? I keep getting the error I posted above.
    a

    Alexjlockwood

    1 year ago
    i havent gotten it working yet no. was gonna try again tomorrow. i was seeing the same error you are getting on friday though
    Colton Idle

    Colton Idle

    1 year ago
    Awesome. Glad I'm in good company. 😃
    a

    Alexjlockwood

    1 year ago
    ah i was able to get it working in a demo project by using
    ./gradlew --stop
    first. i think there was some caching going on behind the scenes that was causing the wrong deps to be used or something 🤷
    Colton Idle

    Colton Idle

    1 year ago
    Didn't work for me unfortunately. Anything else you did that could have led to it working magically? 86 actionable tasks: 1 executed, 85 up-to-date $ ./gradlew --stop Stopping Daemon(s) 1 Daemon stopped ./gradlew assembleFreeDebug e: androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: You are using an outdated version of Compose Runtime that is not compatible with the version of the Compose Compiler plugin you have installed. The compose compiler plugin you are using (version 1.0.0-alpha08) expects a minimum runtime version of 1.0.0-alpha08. @Alexjlockwood maybe you can confirm what version numbers you're using? My app build.gradle
    kotlinOptions {
            jvmTarget = '1.8'
            useIR = true
        }
        buildFeatures {
            compose true
            viewBinding true
        }
        composeOptions {
            kotlinCompilerVersion '1.4.20'
            kotlinCompilerExtensionVersion '1.0.0-SNAPSHOT'
        }
    and
    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.20"
        implementation "org.jetbrains.kotlin:kotlin-reflect:1.4.20"
    my root build.gradle
    classpath 'com.android.tools.build:gradle:4.2.0-alpha16'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20"
    Anything look different from your set up?
    a

    Alexjlockwood

    1 year ago
    that all looks the same to me. my suspicion is maybe there is something in
    ~/.gradle/caches
    that is screwing things up
    cb

    cb

    1 year ago
    Colton Idle

    Colton Idle

    1 year ago
    @Alexjlockwood thanks for the response, unfortunately I wiped .gradle/caches and ./gradlew --stop a bunch of different times to no avail. Looks like maybe I have a different issue?
    Giving up for now. Maybe @Leland Richardson [G] can point out if I'm missing something, but I guess at this point I'll have to just wait for alpha-08 to see if compose actually works in a project that uses reflection 🤞
    l

    Leland Richardson [G]

    1 year ago
    You can check to see if an empty compose project targeting a snapshot works (no 3rd party dependencies).
    i’m on PTO for this week though but will try and take a look at this particular problem as soon as i have time
    Colton Idle

    Colton Idle

    1 year ago
    No worries. I hate tagging people because you never know when they are on holiday. Please enjoy your time off! (i'll use this thread if I make progress)
    a

    Alexjlockwood

    1 year ago
    seems like the main downside of the snapshot is that
    @Preview
    composables no longer work. i think it is because
    @Preview
    was moved to a different package. i guess this will start working in the next android studio canary release though?
    Colton Idle

    Colton Idle

    1 year ago
    Ooh. That sucks! Currently I can't even use compose because simply enabling it in a project that uses reflection leads to a crash so I'm hoping kotlin 1.4.20 fixes it. If you feel like compose + supporting reflection is important... please star for visibility 😄 https://issuetracker.google.com/issues/171726539