Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compose to 1.7.0-beta3 #6393

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,14 +40,14 @@ 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 {
const val grpcVersion = "1.63.0"
const val grpcVersion = "1.64.0"
const val grpcKotlinVersion = "1.4.1"
const val protobufVersion = "3.25.3"
}
Expand All @@ -60,14 +60,14 @@ object Versions {
const val androidAapt = "$android-10880808"
const val playPublisher = "3.9.0"
const val protobuf = "0.9.4"
const val dependencyCheck = "9.0.9"
const val dependencyCheck = "9.2.0"
const val detekt = "1.23.5"
const val gradleVersions = "0.51.0"
const val junit5 = "1.10.0.0"
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
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ android.nonTransitiveRClass=false
android.useAndroidX=true
kotlin.code.style=official
org.gradle.jvmargs=-Xmx8192M -Dkotlin.daemon.jvm.options\="-Xmx8192M"
android.experimental.lint.version = 8.4.0
1,620 changes: 852 additions & 768 deletions android/gradle/verification-metadata.xml

Large diffs are not rendered by default.

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
}
Loading