Skip to content

Commit 2b5a730

Browse files
committed
Fix Sdk 35 + compose compiler + KTS change
1 parent c86a03a commit 2b5a730

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
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

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
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 {
2021
alias(libs.plugins.android.application) apply false
2122
alias(libs.plugins.android.test) apply false
2223
alias(libs.plugins.kotlin.android) apply false
2324
alias(libs.plugins.kotlin.parcelize) apply false
25+
alias(libs.plugins.compose.compiler) apply false
2426
}
2527

2628
subprojects {
@@ -30,11 +32,11 @@ subprojects {
3032
}
3133

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

benchmarking/gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ benchmarkMacroJunit4 = "1.2.0"
2424
coil = "2.7.0"
2525
# @keep
2626
compileSdk = "33"
27-
compose-compiler = "1.5.8"
2827
coroutines = "1.9.0"
2928
google-maps = "19.0.0"
3029
gradle-versions = "0.51.0"
@@ -138,3 +137,4 @@ kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref =
138137
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
139138
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }
140139
version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "version-catalog-update" }
140+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

benchmarking/macrobenchmark/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
android {
7-
compileSdk = 34
7+
compileSdk = 35
88
namespace = "com.example.macrobenchmark"
99

1010
compileOptions {
@@ -18,7 +18,7 @@ android {
1818

1919
defaultConfig {
2020
minSdk = 23
21-
targetSdk = 34
21+
targetSdk = 35
2222

2323
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2424
}

0 commit comments

Comments
 (0)