https://kotlinlang.org logo
#eap
Title
t

Thomas

09/09/2022, 12:03 PM
When upgrading the Kotlin version to 1.7.20-RC from 1.7.10 the following error is thrown on a Gradle sync. How can I figure out what is going wrong here?
t

Thomas

09/09/2022, 12:32 PM
I’m using Gradle version 7.5.1. Thanks for linking the issue, it does seem familiar but I do not use buildSrc. However, I do use includeBuild with plugins for shared build logic.
a

Alexey Belkov [JB]

09/09/2022, 12:33 PM
It may be a different issue, though related. If possible, please create a youtrack issue with a sample project to reproduce the error.
t

tapchicoma

09/09/2022, 12:36 PM
Copy code
Required by:
            project : > org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.18.3 > org.jetbrains.kotlin:atomicfu:1.7.0
I would suggest first to update kotlin-atomicfu plugin
hm, seems you have the latest version
0.18.3
that has fix for KGP 1.7.20. Then, yes, please open a new issue with repro project
t

Thomas

09/09/2022, 12:56 PM
Alright, thank you for the information. I will investigate further.
And yes, I am using atomicfu
0.18.3
Removing atomicfu plugin seems to fix the gradle sync. But ofcourse it’s required to build the project.
Found a workaround. Replacing the following:
Copy code
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.18.3")
with
Copy code
classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.18.3") {
    exclude("org.jetbrains.kotlin", "kotlin-gradle-plugin-api")
}
fixes the issue. My project syncs, builds, and runs correctly now.