Post upgrading my project to Kotlin 1.8.20, Gradle...
# multiplatform
h
Post upgrading my project to Kotlin 1.8.20, Gradle Sync stopped working. Has anyone ever faced this before? (More details in 🧵.)
I'm running: • IntelliJ 2023.1.2 (Build #IC-231.9011.34, built on May 16, 2023) • JDK 17 (Zulu) • Gradle 7.6.1 • Kotlin 1.8.20 Reverting to Kotlin 1.7.10 fixed the issue. I've faced no problems running
build
through CLI.
All KMM modules in this project has
kotlin.cocoapods.framework.baseName
defined already
j
It might help if you share your
cocoapods
block declaration.
h
Sure thing.
Copy code
cocoapods {
         summary = "Some description for the Shared Module"
         homepage = "Link to the Shared Module homepage"
         ios.deploymentTarget = "14.1"
         framework {
             baseName = "library-name"
         }
     }
j
Try specifying the
cocoapods { name = "library-name" }
.
Also note, your framework
baseName
should replace non-alphanumeric characters, like
-
, with
_
, according to Apple's docs.
h
Thanks for the suggestions, I just tried but unfortunately they didn't work 😞
j
Did you specify both
cocoapods.name = "library-name"
as well as
cocoapods.framework.baseName = "library_name"
? What is your
library-name
?
h
Yes, I have several. One of them is
:lib-kmm-json
, specified both as
lib_kmm_json
.
j
Have you done a clean/invalidate caches?
h
I have. Even went as far as nuking the
~/.gradle
to no avail. The only thing I'm yet to try is reinstalling the IDE.
FWIW, removing
_kotlin_("native.cocoapods")
plugin "solved" the problem
j
Are you only using cocoapods to generate your own podspec to distribute your framework? You're not importing any pod dependencies?
h
Yes, dependencies so far are limited to KMM ones..
j
This is with Kotlin 1.8.20? Have you tried 1.8.21?
h
Just tried, but no luck here as well. 😞 Here's the commit link just in case you or anyone reading the thread wants to give it a go.