--wip-- [skip ci]
diff --git a/build.gradle b/build.gradle
index ab1533e..a180923 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,9 +2,9 @@
buildscript {
ext {
- composeVersion = '1.0.0-alpha11'
- kotlinVersion = '1.4.21-2'
- daggerVersion = '2.30.1'
+ composeVersion = '1.0.0-alpha12'
+ kotlinVersion = '1.4.30'
+ daggerVersion = '2.32'
}
repositories {
@@ -16,7 +16,7 @@
}
dependencies {
classpath 'org.ajoberstar:grgit:1.9.3'
- classpath 'com.android.tools.build:gradle:7.0.0-alpha05'
+ classpath 'com.android.tools.build:gradle:7.0.0-alpha06'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
classpath 'org.ajoberstar:grgit:1.9.3'
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 79f7a09..0ea3e8a 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https://services.gradle.org/distributions/gradle-6.8-all.zip
+distributionUrl=https://services.gradle.org/distributions/gradle-6.8.2-all.zip
diff --git a/lottie-compose/build.gradle b/lottie-compose/build.gradle
index 0d60d39..7cecc15 100644
--- a/lottie-compose/build.gradle
+++ b/lottie-compose/build.gradle
@@ -6,7 +6,7 @@
android {
compileSdkVersion 30
- buildToolsVersion "30.0.2"
+ buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 21
diff --git a/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt b/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
index 8cf482e..e48dbf7 100644
--- a/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
+++ b/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
@@ -3,15 +3,7 @@
import androidx.annotation.FloatRange
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.aspectRatio
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.LaunchedEffect
-import androidx.compose.runtime.SideEffect
-import androidx.compose.runtime.dispatch.withFrameNanos
-import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.DisposableEffect
-import androidx.compose.runtime.remember
-import androidx.compose.runtime.setValue
+import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
diff --git a/sample-compose/build.gradle b/sample-compose/build.gradle
index dfc9d74..8da3c1e 100644
--- a/sample-compose/build.gradle
+++ b/sample-compose/build.gradle
@@ -60,17 +60,17 @@
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.2.1'
+ 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-alpha06"
- implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-rc01'
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-rc01'
+ implementation "androidx.navigation:navigation-compose:1.0.0-alpha07"
+ implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0'
+ implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
- implementation "androidx.navigation:navigation-fragment-ktx:2.3.2"
- implementation "androidx.navigation:navigation-ui-ktx:2.3.2"
+ implementation "androidx.navigation:navigation-fragment-ktx:2.3.3"
+ implementation "androidx.navigation:navigation-ui-ktx:2.3.3"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
@@ -83,8 +83,8 @@
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
- implementation "dev.chrisbanes.accompanist:accompanist-coil:0.5.0"
- implementation 'com.airbnb.android:mvrx:2.0.0-beta3'
+ implementation "dev.chrisbanes.accompanist:accompanist-coil:0.5.1"
+ implementation 'com.airbnb.android:mavericks:2.0.0'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
diff --git a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/lottiefiles/LottieFilesPage.kt b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/lottiefiles/LottieFilesPage.kt
index 8cfe62e..2a65a97 100644
--- a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/lottiefiles/LottieFilesPage.kt
+++ b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/lottiefiles/LottieFilesPage.kt
@@ -12,11 +12,13 @@
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import androidx.compose.runtime.*
+import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.savedinstancestate.savedInstanceState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.platform.AmbientDensity
+import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.airbnb.lottie.sample.compose.R
@@ -30,7 +32,7 @@
@Composable
fun LottieFilesPage() {
- var tab by savedInstanceState { LottieFilesTab.Recent }
+ var tab by rememberSaveable { mutableStateOf(LottieFilesTab.Recent) }
Column {
Marquee("LottieFiles")
@@ -74,7 +76,7 @@
onClick: () -> Unit
) {
val textWidth = remember { mutableStateOf(0) }
- val pxRatio = with(AmbientDensity.current) { 1.dp.toPx() }
+ val pxRatio = with(LocalDensity.current) { 1.dp.toPx() }
val tabWidth by animateDpAsState(if (isSelected) (textWidth.value / pxRatio).dp else 0.dp)
val tabAlpha by animateFloatAsState(if (isSelected) 1f else 0f)
Column(
diff --git a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/player/PlayerPage.kt b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/player/PlayerPage.kt
index 85083db..5bcb545 100644
--- a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/player/PlayerPage.kt
+++ b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/player/PlayerPage.kt
@@ -42,7 +42,6 @@
import androidx.compose.runtime.Providers
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.onCommit
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
diff --git a/sample/src/main/kotlin/com/airbnb/lottie/samples/ShowcaseFragment.kt b/sample/src/main/kotlin/com/airbnb/lottie/samples/ShowcaseFragment.kt
index f5e879a..184cdfb 100644
--- a/sample/src/main/kotlin/com/airbnb/lottie/samples/ShowcaseFragment.kt
+++ b/sample/src/main/kotlin/com/airbnb/lottie/samples/ShowcaseFragment.kt
@@ -25,7 +25,7 @@
}
companion object : MvRxViewModelFactory<ShowcaseViewModel, ShowcaseState> {
- override fun create(viewModelContext: ViewModelContext, state: ShowcaseState): ShowcaseViewModel? {
+ override fun create(viewModelContext: ViewModelContext, state: ShowcaseState): ShowcaseViewModel {
val service = viewModelContext.app<LottieApplication>().lottiefilesService
return ShowcaseViewModel(state, service)
}