Skip to content

Commit

Permalink
[Compose] Upgrade to Beta07 (#1809)
Browse files Browse the repository at this point in the history
Fixes #1808

Separated the upgrade from #1793 so the larger PR can be more carefully reviewed.

After this lands, sample-compose will be broken until mavericks-compose for beta07 is published but getting the lottie artifact updated is more important right now.
  • Loading branch information
gpeal authored May 20, 2021
1 parent 43f560a commit 90b3709
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG_COMPOSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#### Note: For the time being, we won't provide numbered releases for every new Jetpack Compose
version. Check out our [snapshot builds](https://github.com/airbnb/lottie/blob/master/android-compose.md#getting-started) instead.

# 1.0.0-beta07-1
* Compatible with Jetpack Compose Beta 07

# 1.0.0-beta03-1
* Update versioning scheme to match the underlying Compose version
* Compatible with Jetpack Compose Beta 03
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.ajoberstar.grgit.Grgit

buildscript {
ext {
composeVersion = '1.0.0-beta04'
composeVersion = '1.0.0-beta07'
kotlinVersion = '1.4.32'
daggerVersion = '2.34'
}
Expand All @@ -15,7 +15,7 @@ buildscript {
}
dependencies {
classpath 'org.ajoberstar:grgit:1.9.3'
classpath 'com.android.tools.build:gradle:7.0.0-alpha14'
classpath 'com.android.tools.build:gradle:7.0.0-beta01'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'org.ajoberstar:grgit:1.9.3'
classpath "net.ltgt.gradle:gradle-errorprone-plugin:2.0.1"
Expand Down
2 changes: 1 addition & 1 deletion lottie-compose/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ POM_INCEPTION_YEAR=2020
POM_ARTIFACT_ID=lottie-compose
POM_PACKAGING=aar
GROUP=com.airbnb.android
VERSION_NAME=1.0.0-beta04-2-SNAPSHOT
VERSION_NAME=1.0.0-beta07-1
14 changes: 7 additions & 7 deletions sample-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ kapt {

dependencies {
implementation project(':lottie-compose')
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.activity:activity-ktx:1.2.2'
implementation 'androidx.activity:activity-compose:1.3.0-alpha06'
implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
implementation 'androidx.activity:activity-ktx:1.2.3'
implementation 'androidx.activity:activity-compose:1.3.0-alpha08'
implementation 'androidx.appcompat:appcompat:1.4.0-alpha01'
implementation 'com.google.android.material:material:1.3.0'
implementation "androidx.compose.ui:ui:$composeVersion"
implementation "androidx.compose.material:material:$composeVersion"
implementation "androidx.compose.material:material-icons-extended:$composeVersion"
implementation "androidx.compose.ui:ui-tooling:$composeVersion"
implementation "androidx.navigation:navigation-compose:1.0.0-alpha10"
implementation "androidx.navigation:navigation-compose:2.4.0-alpha01"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'

Expand All @@ -76,8 +76,8 @@ dependencies {

implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
implementation "dev.chrisbanes.accompanist:accompanist-coil:0.6.1"
implementation 'com.airbnb.android:mavericks:2.1.0'
implementation "com.google.accompanist:accompanist-coil:0.10.0"
implementation 'com.airbnb.android:mavericks:2.2.0'
implementation 'com.airbnb.android:mavericks-compose:2.1.0-alpha01'

testImplementation 'junit:junit:4.13.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ComposeActivity : AppCompatActivity() {
contentColor = Teal,
) {
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.arguments?.getString(KEY_ROUTE)
val currentRoute = navBackStackEntry?.destination?.route

BottomNavItemData.values().forEach { item ->
BottomNavigationItem(
Expand Down Expand Up @@ -102,7 +102,7 @@ class ComposeActivity : AppCompatActivity() {
}


private enum class BottomNavItemData(val route: Route, @StringRes val iconRes: Int, @DrawableRes val labelRes: Int) {
private enum class BottomNavItemData(val route: Route, @DrawableRes val iconRes: Int, @StringRes val labelRes: Int) {
Showcase(Route.Showcase, R.drawable.ic_showcase, R.string.bottom_tab_showcase),
Preview(Route.Preview, R.drawable.ic_device, R.string.bottom_tab_preview),
LottieFiles(Route.LottieFiles, R.drawable.ic_lottie_files, R.string.bottom_tab_lottie_files),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.airbnb.lottie.sample.compose.composables

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
Expand All @@ -15,7 +16,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import dev.chrisbanes.accompanist.coil.CoilImage
import com.google.accompanist.coil.rememberCoilPainter

@Composable
fun AnimationRow(
Expand All @@ -34,8 +35,8 @@ fun AnimationRow(
.padding(16.dp)
.fillMaxWidth()
) {
CoilImage(
data = previewUrl,
Image(
painter = rememberCoilPainter(previewUrl),
modifier = Modifier
.padding(end = 16.dp)
.size(40.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import androidx.navigation.compose.navigate
import com.airbnb.lottie.sample.compose.Route
import com.airbnb.lottie.sample.compose.api.AnimationDataV2
import com.airbnb.lottie.sample.compose.api.LottieFilesApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import androidx.navigation.compose.navigate
import com.airbnb.lottie.sample.compose.R
import com.airbnb.lottie.sample.compose.Route
import com.airbnb.lottie.sample.compose.api.AnimationDataV2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog
import androidx.navigation.NavController
import androidx.navigation.compose.navigate
import androidx.navigation.compose.rememberNavController
import com.airbnb.lottie.sample.compose.R
import com.airbnb.lottie.sample.compose.Route
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.navigation.NavController
import androidx.navigation.compose.navigate
import androidx.navigation.compose.rememberNavController
import com.airbnb.lottie.sample.compose.Route
import com.airbnb.lottie.sample.compose.composables.AnimationRow
Expand Down

0 comments on commit 90b3709

Please sign in to comment.