I just started trying to upgrade some of the depen...
# multiplatform
d
I just started trying to upgrade some of the dependencies for my project. The first thing I did was to upgrade the gradle plugin from 8.11.1 to 8.13.2. But after synching the project, Android Studio is giving the error:
Copy code
org.jetbrains.kotlin.gradle.plugin.ide.dependencyResolvers.IdeCommonizedNativePlatformDependencyResolver failed on :shared::shared/appleMain
java.io.FileNotFoundException: /Users/mcpierce/Repositories/comixed/variant/shared/build/kotlin/commonizedNativeDistributionLocation.txt (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(Unknown Source)
	at java.base/java.io.FileInputStream.<init>(Unknown Source)
	at kotlin.io.FilesKt__FileReadWriteKt.readText(FileReadWrite.kt:131)
	at kotlin.io.FilesKt__FileReadWriteKt.readText$default(FileReadWrite.kt:131)
	at org.gradle.internal.classpath.Instrumented.kotlinIoFilesKtReadTextDefault(Instrumented.java:363)
	at org.gradle.internal.classpath.declarations.KotlinFileExtensionsInterceptorsDeclaration.intercept_readText(KotlinFileExtensionsInterceptorsDeclaration.java:46)
	at org.jetbrains.kotlin.gradle.targets.native.internal.CommonizerTasksKt.getCommonizedPlatformLibrariesFor(CommonizerTasks.kt:145)
Googling the file commonizedNativeDistributionLocation.txt didn't result in anything useful. Any idea what I need to do to fixing this during the upgrade?
Or is this an IDE issue, since my cmdline build appears to work without issue.
c
1. You mean the Android Gradle Plugin? 2. You are using IntelliJ Idea?
d
@Chrimaeon Yes to both.
I saw that it's not a versioned file, so is it something that's created during the build?
c
so the android plugin for IDEA does not yet support any android gradle plugin version > 8.12. Jetbrains is working on a new plugin but because of the major changes in AGP 9 it takes a while and all the resources so they skipped 8.13 completely. If you search in this channel you’ll find post about this.
👍 1
d
Do they not support 8.12.3? I don't see the bundle for download for that version to add to my gradle-wrapper.properties file.
c
you are now talking about the gradle (wrapper) version, right?
d
Yeah. They all seem to affect each other as I'm doing this piecemeal upgrading.
Does it make any different if that is 8.12.1 but the plugin in my toml file is 8.12.3?
Man, this can be confusing. Now I'm getting this in Android Studio:
Copy code
Minimum supported Gradle version is 8.13. Current version is 8.12.1.
Try updating the 'distributionUrl' property in /Users/mcpierce/Repositories/comixed/variant/gradle/wrapper/gradle-wrapper.properties to 'gradle-8.13-bin.zip'.
c
the android gradle plugin version depend on a certain Gradle version, but usually you can have a higher Gradle version than AGP.
so i’m currently on AGP 9 but already use Gradle 9.3.1
and I was also using gradle 9.x when I was on AGP 8.x
d
What's the recommended AGP version for the time being? 8.12?
c
Match the gradle version with the AGP version
d
This was always a point of frustration for me when I started out on this project (I've set it aside a few times in the past 18 months), the dependencies feeling fragile with disruptive changes.
c
yes, either stay on those version or update regularly to not run into those issues.
👍 1
d
Dare I ask if there's a path to upgrading the Compose dependency from 1.5.4 to 1.10.3 to whatever's current? I'm doing this piece by piece, testing as I go...
c
yes, it helps updating from minor to minor version. also for depending 3rd party libs. update one at the time, compile and see if it still works. its tedious but the only way if you are not working regularly on a project and fall behind.
👍 1
d
Thanks, bud. I appreciate the help and advice. 😄
c
Good luck 🤞🏻
d
I may just need it. 😄 😄 😄
111 Views