JetStream: gradle sync fails with the latest Android Studio
Gradle sync fails with the latest Android Studio. It is looking for java 17 explicitly in build.gradle.kts for both jetstream and benchmark. Is that obsolete? (Works fine without it)
kotlin {
jvmToolchain(17)
}
I should clarify "works fine without it" for my simple usage is like below. (Haven't tried the "baseline profile" thing, just open in Android Studio and run in the emulator)
--- a/JetStreamCompose/benchmark/build.gradle.kts
+++ b/JetStreamCompose/benchmark/build.gradle.kts
@@ -26,6 +26,2 @@ plugins {
-kotlin {
- jvmToolchain(17)
-}
-
android {
@@ -42,2 +38,10 @@ android {
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = "1.8"
+ }
+
buildFeatures {
--- a/JetStreamCompose/gradle/libs.versions.toml
+++ b/JetStreamCompose/gradle/libs.versions.toml
@@ -2,4 +2,4 @@
activity-compose = "1.9.2"
-android-gradle-plugin = "8.6.1"
-android-test-plugin = "8.6.1"
+android-gradle-plugin = "8.7.0"
+android-test-plugin = "8.7.0"
androidx-baselineprofile = "1.3.1"
index 20db9ad..171d876 100644
--- a/JetStreamCompose/gradle/wrapper/gradle-wrapper.properties
+++ b/JetStreamCompose/gradle/wrapper/gradle-wrapper.properties
@@ -2,3 +2,3 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
--- a/JetStreamCompose/jetstream/build.gradle.kts
+++ b/JetStreamCompose/jetstream/build.gradle.kts
@@ -25,6 +25,2 @@ plugins {
-kotlin {
- jvmToolchain(17)
-}
-
android {
@@ -47,2 +43,10 @@ android {
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = "1.8"
+ }
+
buildTypes {
I'm able to reproduce this on Android Studio Meerkat Feature Drop | 2024.3.2 Nightly 2025-02-07.
@pflammertsma Can you take a look at this?
This #195 pull request should solve the problem.
This #195 pull request should solve the problem.
Are you sure? It doesn't seem like the same error. I tried adding the compose-runtime base lib and it was still refusing to sync.