Skip to content

Commit 46e2173

Browse files
committed
Fix sdk + compose compiler + kts
1 parent 664f768 commit 46e2173

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

benchmarking/app/build.gradle.kts

+3-6
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ plugins {
1818
alias(libs.plugins.android.application)
1919
alias(libs.plugins.kotlin.android)
2020
alias(libs.plugins.kotlin.parcelize)
21+
alias(libs.plugins.compose.compiler)
2122
}
2223

2324
android {
24-
compileSdk = 34
25+
compileSdk = 35
2526
namespace = "com.example.macrobenchmark_codelab"
2627

2728
defaultConfig {
2829
applicationId = "com.example.macrobenchmark_codelab"
2930
minSdk = 21
30-
targetSdk = 34
31+
targetSdk = 35
3132
versionCode = 1
3233
versionName = "1.0"
3334
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -67,10 +68,6 @@ android {
6768
compose = true
6869
}
6970

70-
composeOptions {
71-
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
72-
}
73-
7471
packaging {
7572
// Multiple dependency bring these files in. Exclude them to enable
7673
// our test APK to build (has no effect on our AARs)

benchmarking/build.gradle.kts

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
1718
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1819

1920
plugins {
@@ -30,11 +31,11 @@ subprojects {
3031
}
3132

3233
tasks.withType<KotlinCompile>().configureEach {
33-
kotlinOptions {
34-
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
34+
compilerOptions {
35+
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
3536
// Enable experimental coroutines APIs, including Flow
36-
freeCompilerArgs += "-opt-in=kotlin.Experimental"
37-
jvmTarget = JavaVersion.VERSION_17.toString()
37+
freeCompilerArgs.add("-opt-in=kotlin.Experimental")
38+
jvmTarget.set(JvmTarget.JVM_17)
3839
}
3940
}
4041
}

benchmarking/gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ androix-test-uiautomator = "2.3.0"
2323
coil = "2.7.0"
2424
# @keep
2525
compileSdk = "33"
26-
compose-compiler = "1.5.8"
2726
coroutines = "1.9.0"
2827
google-maps = "19.0.0"
2928
gradle-versions = "0.51.0"
@@ -135,3 +134,4 @@ kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref =
135134
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
136135
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }
137136
version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "version-catalog-update" }
137+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

0 commit comments

Comments
 (0)