Skip to content

Commit 7300ddf

Browse files
committed
Fix issues with build
1 parent 46e2173 commit 7300ddf

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

baseline-profiles/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.baselineprofiles_codelab"
2627

2728
defaultConfig {
2829
applicationId = "com.example.baselineprofiles_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)

baseline-profiles/app/src/main/java/com/example/baselineprofiles_codelab/ui/components/Button.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package com.example.baselineprofiles_codelab.ui.components
1818

1919
import android.content.res.Configuration.UI_MODE_NIGHT_YES
2020
import androidx.compose.foundation.BorderStroke
21+
import androidx.compose.foundation.LocalIndication
2122
import androidx.compose.foundation.background
2223
import androidx.compose.foundation.clickable
2324
import androidx.compose.foundation.indication
@@ -92,7 +93,7 @@ fun JetsnackButton(
9293
minWidth = ButtonDefaults.MinWidth,
9394
minHeight = ButtonDefaults.MinHeight
9495
)
95-
.indication(interactionSource, rememberRipple())
96+
.indication(interactionSource, LocalIndication.current)
9697
.padding(contentPadding),
9798
horizontalArrangement = Arrangement.Center,
9899
verticalAlignment = Alignment.CenterVertically,

baseline-profiles/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
}

baseline-profiles/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.4.5"
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" }

benchmarking/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ plugins {
2222
alias(libs.plugins.android.test) apply false
2323
alias(libs.plugins.kotlin.android) apply false
2424
alias(libs.plugins.kotlin.parcelize) apply false
25+
alias(libs.plugins.compose.compiler) apply false
2526
}
2627

2728
subprojects {

0 commit comments

Comments
 (0)