Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JetStream: gradle sync fails with the latest Android Studio #192

Open
gramound opened this issue Oct 2, 2024 · 1 comment
Open

JetStream: gradle sync fails with the latest Android Studio #192

gramound opened this issue Oct 2, 2024 · 1 comment

Comments

@gramound
Copy link

gramound commented Oct 2, 2024

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)
}
@gramound
Copy link
Author

gramound commented Oct 2, 2024

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 {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant