Skip to content

Commit

Permalink
[All] Update to Compose 1.2.0-alpha06 (#760)
Browse files Browse the repository at this point in the history
* [All] Update to Compose 1.2.0-alpha06

* Removed unused import

* Updated to Accompanist 0.24.5-alpha

* Added bug reference for onClickLabel

* Suppressed unused parameter warning for onClickLabel

Co-authored-by: Ian G. Clifton <IanGClifton@users.noreply.github.com>
  • Loading branch information
IanGClifton and IanGClifton authored Mar 28, 2022
1 parent 7610f7c commit 9bf90d0
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ private fun DayContainer(
onClick: () -> Unit = { },
onClickEnabled: Boolean = true,
backgroundColor: Color = Color.Transparent,
onClickLabel: String? = null,
// TODO: Determine the best way to pass the onClickLabel via the updated Surface API
// https://github.com/android/compose-samples/issues/766
@Suppress("UNUSED_PARAMETER") onClickLabel: String? = null,
content: @Composable () -> Unit
) {
// What if this doesn't fit the screen? - LayoutFlexible(1f) + LayoutAspectRatio(1f)
Expand All @@ -206,8 +208,8 @@ private fun DayContainer(
),
onClick = onClick,
enabled = onClickEnabled,
selected = selected,
color = backgroundColor,
onClickLabel = onClickLabel
) {
content()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.crane.buildsrc

object Versions {
const val ktLint = "0.44.0"
const val ktLint = "0.45.1"
}

object Libs {
Expand All @@ -30,7 +30,7 @@ object Libs {
}

object Volley {
const val volley = "com.android.volley:volley:1.2.0"
const val volley = "com.android.volley:volley:1.2.1"
}

object Kotlin {
Expand All @@ -55,7 +55,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha05"
const val version = "1.2.0-alpha06"

const val runtime = "androidx.compose.runtime:runtime:$version"
const val runtimeLivedata = "androidx.compose.runtime:runtime-livedata:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.example.jetnews.R
import com.example.jetnews.ui.JetnewsDestinations
import com.example.jetnews.ui.theme.JetnewsTheme

@OptIn(ExperimentalMaterialApi::class)
@Composable
fun JetnewsNavRail(
modifier: Modifier = Modifier,
Expand All @@ -70,7 +68,6 @@ fun JetnewsNavRail(
}
}

@OptIn(ExperimentalMaterialApi::class)
@Composable
fun AppNavRail(
currentRoute: String,
Expand Down Expand Up @@ -118,10 +115,10 @@ private fun NavRailIcon(
)

Surface(
selected = isSelected,
color = backgroundColor,
onClick = action,
shape = CircleShape,
role = Role.Tab,
modifier = modifier.size(48.dp)
) {
NavigationIcon(
Expand Down
4 changes: 2 additions & 2 deletions JetNews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

buildscript {
ext.kotlin_version = '1.6.10'
ext.compose_version = '1.2.0-alpha05'
ext.compose_version = '1.2.0-alpha06'
ext.coroutines_version = '1.6.0'
ext.accompanist_version = '0.24.4-alpha'

Expand Down Expand Up @@ -48,7 +48,7 @@ subprojects {
targetExclude("$buildDir/**/*.kt")
targetExclude('bin/**/*.kt')

ktlint("0.44.0")
ktlint("0.45.1")
licenseHeaderFile rootProject.file('spotless/copyright.kt')
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
package com.example.jetcaster.buildsrc

object Versions {
const val ktlint = "0.44.0"
const val ktlint = "0.45.1"
}

object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2"
const val jdkDesugar = "com.android.tools:desugar_jdk_libs:1.1.5"

object Accompanist {
const val version = "0.24.4-alpha"
const val version = "0.24.5-alpha"
const val pager = "com.google.accompanist:accompanist-pager:$version"
}

Expand Down Expand Up @@ -70,7 +70,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha05"
const val version = "1.2.0-alpha06"

@get:JvmStatic
val snapshotUrl: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.compose.jetchat.buildsrc

object Versions {
const val ktlint = "0.44.0"
const val ktlint = "0.45.1"
}

object Libs {
Expand All @@ -26,7 +26,7 @@ object Libs {

const val junit = "junit:junit:4.13"

const val material3 = "com.google.android.material:material:1.6.0-alpha02"
const val material3 = "com.google.android.material:material:1.6.0-alpha03"

object Kotlin {
private const val version = "1.6.10"
Expand All @@ -52,7 +52,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha05"
const val version = "1.2.0-alpha06"

const val foundation = "androidx.compose.foundation:foundation:$version"
const val layout = "androidx.compose.foundation:foundation-layout:$version"
Expand All @@ -70,7 +70,7 @@ object Libs {

object Material3 {
const val snapshot = ""
const val version = "1.0.0-alpha06"
const val version = "1.0.0-alpha08"

const val material3 = "androidx.compose.material3:material3:$version"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
package com.example.jetsnack.buildsrc

object Versions {
const val ktlint = "0.44.0"
const val ktlint = "0.45.1"
}

object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:7.3.0-alpha05"

object Accompanist {
const val version = "0.24.4-alpha"
const val version = "0.24.5-alpha"
const val systemuicontroller = "com.google.accompanist:accompanist-systemuicontroller:$version"
const val flowlayouts = "com.google.accompanist:accompanist-flowlayout:$version"
}
Expand All @@ -49,7 +49,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha05"
const val version = "1.2.0-alpha06"

const val foundation = "androidx.compose.foundation:foundation:${version}"
const val layout = "androidx.compose.foundation:foundation-layout:${version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.compose.jetsurvey.buildsrc

object Versions {
const val ktlint = "0.44.0"
const val ktlint = "0.45.1"
}

object Libs {
Expand All @@ -27,7 +27,7 @@ object Libs {
const val junit = "junit:junit:4.13"

object Accompanist {
const val version = "0.24.4-alpha"
const val version = "0.24.5-alpha"
const val permissions = "com.google.accompanist:accompanist-permissions:$version"
}

Expand Down Expand Up @@ -61,7 +61,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha05"
const val version = "1.2.0-alpha06"

@get:JvmStatic
val snapshotUrl: String
Expand All @@ -86,7 +86,7 @@ object Libs {
}

object Material {
private const val version = "1.6.0-alpha02"
private const val version = "1.6.0-alpha03"
const val material = "com.google.android.material:material:$version"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.example.owl.buildsrc

object Versions {
const val ktlint = "0.44.0"
const val ktlint = "0.45.1"
}

object Libs {
Expand Down Expand Up @@ -52,7 +52,7 @@ object Libs {

object Compose {
const val snapshot = ""
const val version = "1.2.0-alpha05"
const val version = "1.2.0-alpha06"

const val animation = "androidx.compose.animation:animation:$version"
const val foundation = "androidx.compose.foundation:foundation:$version"
Expand Down

0 comments on commit 9bf90d0

Please sign in to comment.