Skip to content

Commit 7172ef0

Browse files
committed
Fix build issues
1 parent 2b5a730 commit 7172ef0

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

baseline-profiles/app/build.gradle.kts

+3-6
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ 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
alias(libs.plugins.androidx.baselineprofile)
2223
}
2324

2425
android {
25-
compileSdk = 34
26+
compileSdk = 35
2627
namespace = "com.example.baselineprofiles_codelab"
2728

2829
defaultConfig {
2930
applicationId = "com.example.baselineprofiles_codelab"
3031
minSdk = 21
31-
targetSdk = 34
32+
targetSdk = 35
3233
versionCode = 1
3334
versionName = "1.0"
3435
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -68,10 +69,6 @@ android {
6869
compose = true
6970
}
7071

71-
composeOptions {
72-
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
73-
}
74-
7572
packaging {
7673
// Multiple dependency bring these files in. Exclude them to enable
7774
// 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-2
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
@@ -33,7 +34,6 @@ import androidx.compose.material.ButtonDefaults
3334
import androidx.compose.material.MaterialTheme
3435
import androidx.compose.material.ProvideTextStyle
3536
import androidx.compose.material.Text
36-
import androidx.compose.material.ripple.rememberRipple
3737
import androidx.compose.runtime.Composable
3838
import androidx.compose.runtime.remember
3939
import androidx.compose.ui.Alignment
@@ -92,7 +92,7 @@ fun JetsnackButton(
9292
minWidth = ButtonDefaults.MinWidth,
9393
minHeight = ButtonDefaults.MinHeight
9494
)
95-
.indication(interactionSource, rememberRipple())
95+
.indication(interactionSource, LocalIndication.current)
9696
.padding(contentPadding),
9797
horizontalArrangement = Arrangement.Center,
9898
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
alias(libs.plugins.androidx.baselineprofile) apply false
2527
}
2628

@@ -31,11 +33,11 @@ subprojects {
3133
}
3234

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

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"
@@ -137,4 +136,5 @@ kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref =
137136
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
138137
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }
139138
version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "version-catalog-update" }
139+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
140140
androidx-baselineprofile = { id = "androidx.baselineprofile", version.ref = "androidx-baselineprofile" }

0 commit comments

Comments
 (0)