Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions livekit-uniffi/support/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import org.gradle.api.publish.maven.MavenPublication
import org.gradle.plugins.signing.SigningExtension

plugins {
id("com.android.library") version "8.2.2"
id("org.jetbrains.kotlin.android") version "1.9.22"
id("com.android.library") version "8.13.2"
id("org.jetbrains.kotlin.android") version "1.9.25"
Comment on lines +5 to +6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Android library build can fail because the Kotlin toolchain is too old for the newly upgraded libraries

The Android library keeps the old Kotlin build plugin (org.jetbrains.kotlin.android version "1.9.25" at livekit-uniffi/support/android/build.gradle.kts:6) while its libraries are bumped to versions produced by a much newer Kotlin, so the packaged Android artifact can stop building.
Impact: The Android release job may fail, blocking publishing of the Android package.

Kotlin metadata / AGP compatibility mismatch

kotlinx-coroutines-core:1.11.0 (livekit-uniffi/support/android/build.gradle.kts:64) is compiled with Kotlin 2.2.20, and androidx.annotation:annotation:1.10.0 (livekit-uniffi/support/android/build.gradle.kts:62) is likewise built with a Kotlin 2.x toolchain. The Kotlin 1.9.x compiler only accepts binary metadata up to version 2.0, so compiling the generated UniFFI Kotlin sources (wired in at livekit-uniffi/support/android/build.gradle.kts:52-58) against these artifacts typically fails with "was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.2.0, expected version is 1.9.0".

Additionally, AGP is jumped from 8.2.2 to 8.13.2 (livekit-uniffi/support/android/build.gradle.kts:5) while Kotlin Gradle Plugin 1.9.25 predates and was never tested against AGP 8.13; the usual supported pairing for AGP 8.13 is KGP 2.x. Bumping the Kotlin plugin to 2.x (and verifying compileSdk) alongside these dependency updates would keep the build consistent.

Prompt for agents
The Android support build for livekit-uniffi bumps AGP to 8.13.2 and dependencies (kotlinx-coroutines 1.11.0, androidx.annotation 1.10.0) that are compiled with Kotlin 2.x, while keeping the Kotlin Android Gradle plugin at 1.9.25. Kotlin 1.9 compilers reject binary metadata newer than 2.0, and KGP 1.9.x is not a supported companion to AGP 8.13. Verify by running the Android package build (cargo make android-package / ./gradlew assembleRelease) and, if it fails, bump org.jetbrains.kotlin.android to a 2.x release compatible with AGP 8.13 (and re-check compileSdk/jvmTarget settings), or keep the dependency versions at the last Kotlin 1.9-compatible releases.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
Expand Down Expand Up @@ -59,9 +59,9 @@ android {
}

dependencies {
implementation("androidx.annotation:annotation:1.9.0")
implementation("net.java.dev.jna:jna:5.16.0@aar")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
implementation("androidx.annotation:annotation:1.10.0")
implementation("net.java.dev.jna:jna:5.19.1@aar")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0")
}

afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Apr 29 14:50:17 JST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading