Looks like upgrading the kotlin plugin to 1.4 rc b...
# compose
f
Looks like upgrading the kotlin plugin to 1.4 rc broke my project 🙂
b
Copy code
android {
    buildFeatures {
        compose true
    }
    composeOptions {
        kotlinCompilerExtensionVersion "${compose_version}"
        kotlinCompilerVersion "1.4.0-dev-withExperimentalGoogleExtensions-20200720"
    }
}
Did you update the compiler version?
h
Having the same issue when adding Jetpack Compose to my project. I have the compiler version in my configuration.
b
is your project single module or multi? It has to be applied to all modules
h
Single (just
app
included). You can view my current experimentation here: https://github.com/fredagsdeploy/cheer-with-me/tree/feature/jetpack-compose/android if that's any help. I've more or less copied the sample here https://github.com/romainguy/sample-materials-shop for the gradle configuration
And I'm running Android Studio Canary :
Copy code
Android Studio 4.2 Canary 5
Build #AI-201.7846.76.42.6682321, built on July 15, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 24
Non-Bundled Plugins: org.jetbrains.kotlin
b
interesting next question was gonna be the compiler arg to skip pre release checks but you have that too
Copy code
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs += ["-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check"]
    }
}
wondering if we need an updated compiler version
h
Hmm, I didn't change anything (just fiddled back and forth with Kotlin-plugin settings etc) and now the Android Studio errors are gone. Still stuck on compiler error when trying to build though.
Or nevermind. Just doing any code change re-triggered the Android studio errors
b
ah
f
Changing kotlin version in buildscript to 1.4.0-rc fixed it
❤️ 2
b
ah nice find
h
Ah, nice! Now I just need to find out how to debug my internal compilation error. 😕
a
Changing kotlin version in buildscript to 1.4.0-rc fixed it
Awesome find, seems the problem occured due to this recent kotlin plugin update. Compose should probably update the instructions here: https://developer.android.com/jetpack/androidx/releases/compose
b
+1
a
probably should update coroutines as well to
1.3.8-1.4.0-rc