Skip to content

Commit

Permalink
Update compose to 1.7.0-beta03
Browse files Browse the repository at this point in the history
Also update some related libraries that were required

This fixes a crash on release build
  • Loading branch information
Pururun committed Jun 20, 2024
1 parent 3b659e0 commit 047b3be
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 25 deletions.
4 changes: 2 additions & 2 deletions android/app/lint-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.4.0)" variant="all" version="8.4.0">

<issue
id="UseCheckPermission"
Expand All @@ -25,7 +25,7 @@

<issue
id="QueryAllPackagesPermission"
message="A `&lt;queries>` declaration should generally be used instead of QUERY_ALL_PACKAGES; \&#xA;see https://g.co/dev/packagevisibility for details"
message="A `&lt;queries>` declaration should generally be used instead of QUERY_ALL_PACKAGES; see https://g.co/dev/packagevisibility for details"
errorLine1=" &lt;uses-permission android:name=&quot;android.permission.QUERY_ALL_PACKAGES&quot; />"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fun MullvadModalBottomSheet(
sheetState = sheetState,
containerColor = backgroundColor,
modifier = modifier,
windowInsets = WindowInsets(0, 0, 0, 0), // No insets
contentWindowInsets = { WindowInsets(0, 0, 0, 0) }, // No insets
dragHandle = { BottomSheetDefaults.DragHandle(color = onBackgroundColor) }
) {
sheetContent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private fun ConstraintLayoutScope.AutoConnectCarousel(
) {
HorizontalPager(
state = pagerState,
beyondBoundsPageCount = 2,
beyondViewportPageCount = 2,
modifier =
Modifier.constrainAs(pager) {
top.linkTo(parent.top)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ fun mullvadWhiteTextFieldColors(): TextFieldColors =
unfocusedSupportingTextColor = Color.Black,
focusedIndicatorColor = MaterialTheme.colorScheme.onPrimary,
unfocusedIndicatorColor = MaterialTheme.colorScheme.onPrimary,
errorIndicatorColor = MaterialTheme.colorScheme.error
errorIndicatorColor = MaterialTheme.colorScheme.error,
focusedContainerColor = MaterialTheme.colorScheme.onBackground,
unfocusedContainerColor = MaterialTheme.colorScheme.onBackground,
errorContainerColor = MaterialTheme.colorScheme.onBackground,
disabledContainerColor = MaterialTheme.colorScheme.onBackground
)

@Preview
Expand Down
16 changes: 8 additions & 8 deletions android/buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ object Versions {
const val junit = "5.10.2"
const val jvmTarget = "17"
const val konsist = "0.14.0"
const val kotlin = "1.9.22"
const val kotlinCompilerExtensionVersion = "1.5.10"
const val kotlin = "1.9.24"
const val kotlinCompilerExtensionVersion = "1.5.14"
const val kotlinx = "1.8.0"
const val leakCanary = "2.13"
const val mockk = "1.13.11"
Expand All @@ -22,7 +22,7 @@ object Versions {
}

object AndroidX {
const val appcompat = "1.6.1"
const val appcompat = "1.7.0"
const val coreKtx = "1.12.0"
const val espresso = "3.5.1"
const val lifecycle = "2.8.2"
Expand All @@ -40,10 +40,10 @@ object Versions {

object Compose {
const val destinations = "1.10.2"
const val base = "1.6.3"
const val base = "1.7.0-beta03"
const val constrainLayout = "1.0.1"
const val foundation = base
const val material3 = "1.2.1"
const val material3 = "1.3.0-beta03"
}

object Grpc {
Expand All @@ -56,8 +56,8 @@ object Versions {
// The androidAapt plugin version must be in sync with the android plugin version.
// Required for Gradle metadata verification to work properly, see:
// https://github.com/gradle/gradle/issues/19228
const val android = "8.3.0"
const val androidAapt = "$android-10880808"
const val android = "8.4.0"
const val androidAapt = "$android-11315950"
const val playPublisher = "3.9.0"
const val protobuf = "0.9.4"
const val dependencyCheck = "9.0.9"
Expand All @@ -67,7 +67,7 @@ object Versions {
const val ktfmt = "0.17.0"
// Ksp version is linked with kotlin version, find matching release here:
// https://github.com/google/ksp/releases
const val ksp = "${kotlin}-1.0.17"
const val ksp = "${kotlin}-1.0.20"
}

object Koin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package net.mullvad.mullvadvpn.lib.theme

import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.ripple.LocalRippleTheme
import androidx.compose.material.ripple.RippleAlpha
import androidx.compose.material.ripple.RippleTheme
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalRippleConfiguration
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RippleConfiguration
import androidx.compose.material3.Shapes
import androidx.compose.material3.Typography
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.remember
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.graphics.Color
Expand Down Expand Up @@ -137,6 +136,7 @@ fun ProvideDimens(dimensions: Dimensions, content: @Composable () -> Unit) {

private val LocalAppDimens = staticCompositionLocalOf { defaultDimensions }

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun AppTheme(content: @Composable () -> Unit) {
val colors = darkColorScheme
Expand All @@ -150,15 +150,12 @@ fun AppTheme(content: @Composable () -> Unit) {
shapes = Shapes,
typography = typography,
content = {
CompositionLocalProvider(LocalRippleTheme provides MullvadRippleTheme) { content() }
CompositionLocalProvider(
LocalRippleConfiguration provides RippleConfiguration(rippleAlpha = rippleAlpha)
) {
content()
}
}
)
}
}

@Immutable
object MullvadRippleTheme : RippleTheme {
@Composable override fun defaultColor() = LocalContentColor.current

@Composable override fun rippleAlpha() = rippleAlpha
}

0 comments on commit 047b3be

Please sign in to comment.