Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Update dependencies #834

Merged
merged 1 commit into from
Jul 21, 2021
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: 1 addition & 3 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '5.14.1'
id 'com.diffplug.spotless' version '5.14.2'
id 'com.github.ben-manes.versions' version '0.39.0'
}

Expand All @@ -74,17 +74,9 @@ allprojects {
subprojects {
configurations.configureEach {
// We forcefully exclude AppCompat + MDC from any transitive dependencies.
// This is a Compose app, so there's no need for these.
// This is a Compose app, so there's no need for these
exclude group: 'androidx.appcompat'
exclude group: 'com.google.android.material', module: 'material'

resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.jetbrains.kotlinx'
&& details.requested.module.name == 'kotlinx-collections-immutable-jvm') {
// kotlinx-collections-immutable-jvm 0.3.4+ is available on Maven Central
details.useVersion '0.3.4'
}
}
}

apply plugin: 'com.diffplug.spotless'
Expand Down
3 changes: 2 additions & 1 deletion common-ui-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ dependencies {

implementation libs.kotlin.stdlib

implementation libs.accompanist.coil
implementation libs.coil.compose

api libs.accompanist.insets
api libs.accompanist.insetsui
implementation libs.accompanist.swiperefresh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import androidx.compose.ui.unit.dp
import app.tivi.common.compose.R
import app.tivi.data.entities.TiviShow
import app.tivi.data.entities.TmdbImageEntity
import com.google.accompanist.coil.rememberCoilPainter
import coil.compose.rememberImagePainter

@Composable
fun PosterCard(
Expand All @@ -61,7 +61,9 @@ fun PosterCard(
}
if (poster != null) {
Image(
painter = rememberCoilPainter(poster, fadeIn = true),
painter = rememberImagePainter(poster) {
crossfade(true)
},
contentDescription = stringResource(
R.string.cd_show_poster_image,
show.title ?: "show"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.tivi.common.compose.R
import app.tivi.data.entities.TraktUser
import com.google.accompanist.coil.rememberCoilPainter
import coil.compose.rememberImagePainter

@Composable
fun UserProfileButton(
Expand All @@ -45,7 +45,9 @@ fun UserProfileButton(
when {
loggedIn && user?.avatarUrl != null -> {
Image(
painter = rememberCoilPainter(user.avatarUrl!!),
painter = rememberImagePainter(user.avatarUrl!!) {
crossfade(true)
},
contentDescription = stringResource(R.string.cd_profile_pic, user.name),
modifier = Modifier
.size(32.dp)
Expand Down
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
[versions]
accompanist = "0.13.0"
accompanist = "0.14.0"
androidxhilt = "1.0.0"
androidxlifecycle = "2.4.0-alpha02"
androidxtest = "1.4.0"
coil = "1.2.2"
compose = "1.0.0-rc01"
coil = "1.3.0"
compose = "1.0.0-rc02"
composesnapshot = "-" # a single character = no snapshot
coroutines = "1.5.0"
coroutines = "1.5.1"
dagger = "2.37"
hilt = "2.37"
kotlin = "1.5.10"
ktlint = "0.40.0"
ktlint = "0.41.0"
okhttp = "4.9.1"
paging = "3.0.0"
retrofit = "2.9.0"
room = "2.4.0-alpha03"
threetenbp = "1.5.1"

[libraries]
accompanist-coil = { module = "com.google.accompanist:accompanist-coil", version.ref = "accompanist" }
accompanist-flowlayout = { module = "com.google.accompanist:accompanist-flowlayout", version.ref = "accompanist" }
accompanist-insets = { module = "com.google.accompanist:accompanist-insets", version.ref = "accompanist" }
accompanist-insetsui = { module = "com.google.accompanist:accompanist-insets-ui", version.ref = "accompanist" }
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }

android-r8 = "com.android.tools:r8:3.1.11-dev"
android-gradlePlugin = "com.android.tools.build:gradle:7.1.0-alpha02"
android-gradlePlugin = "com.android.tools.build:gradle:7.1.0-alpha03"

androidx-activity-compose = "androidx.activity:activity-compose:1.3.0-rc01"
androidx-activity-compose = "androidx.activity:activity-compose:1.3.0-rc02"
androidx-appcompat = "androidx.appcompat:appcompat:1.3.0"
androidx-archCoreTesting = "androidx.arch.core:core-testing:2.1.0"
androidx-browser = "androidx.browser:browser:1.3.0"
Expand Down Expand Up @@ -69,6 +68,7 @@ androidx-work-runtime = "androidx.work:work-runtime-ktx:2.5.0"
appauth = "net.openid:appauth:0.8.1"

coil-coil = { module = "io.coil-kt:coil", version.ref = "coil" }
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coil" }

compose-animation-animation = { module = "androidx.compose.animation:animation", version.ref = "compose" }
Expand Down
2 changes: 1 addition & 1 deletion ui-account/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
implementation libs.compose.ui.tooling


implementation libs.accompanist.coil
implementation libs.coil.compose
implementation libs.accompanist.insets
implementation libs.accompanist.flowlayout

Expand Down
6 changes: 4 additions & 2 deletions ui-account/src/main/java/app/tivi/account/AccountUi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import app.tivi.common.compose.rememberFlowWithLifecycle
import app.tivi.common.compose.ui.foregroundColor
import app.tivi.data.entities.TraktUser
import app.tivi.trakt.TraktAuthState
import com.google.accompanist.coil.rememberCoilPainter
import coil.compose.rememberImagePainter
import com.google.accompanist.flowlayout.FlowMainAxisAlignment
import com.google.accompanist.flowlayout.FlowRow
import org.threeten.bp.OffsetDateTime
Expand Down Expand Up @@ -183,7 +183,9 @@ private fun UserRow(
val avatarUrl = user.avatarUrl
if (avatarUrl != null) {
Image(
painter = rememberCoilPainter(avatarUrl, fadeIn = true),
painter = rememberImagePainter(avatarUrl) {
crossfade(true)
},
contentDescription = stringResource(R.string.cd_profile_pic, user.name),
modifier = Modifier
.size(40.dp)
Expand Down
1 change: 0 additions & 1 deletion ui-discover/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.accompanist.insets
implementation libs.accompanist.swiperefresh

Expand Down
2 changes: 1 addition & 1 deletion ui-episodedetails/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.coil.compose
implementation libs.accompanist.insets

implementation libs.kotlin.stdlib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ import app.tivi.data.entities.EpisodeWatchEntry
import app.tivi.data.entities.PendingAction
import app.tivi.data.entities.Season
import app.tivi.ui.animations.lerp
import com.google.accompanist.coil.rememberCoilPainter
import coil.compose.rememberImagePainter
import com.google.accompanist.insets.navigationBarsHeight
import com.google.accompanist.insets.navigationBarsPadding
import com.google.accompanist.insets.statusBarsPadding
Expand Down Expand Up @@ -272,7 +272,9 @@ private fun Backdrop(
Box(Modifier.fillMaxSize()) {
if (episode.tmdbBackdropPath != null) {
Image(
painter = rememberCoilPainter(episode, fadeIn = true),
painter = rememberImagePainter(episode) {
crossfade(true)
},
contentDescription = stringResource(R.string.cd_show_poster),
modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.Crop,
Expand Down
2 changes: 1 addition & 1 deletion ui-followed/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.coil.compose
implementation libs.accompanist.insets
implementation libs.accompanist.swiperefresh

Expand Down
6 changes: 4 additions & 2 deletions ui-followed/src/main/java/app/tivi/home/followed/Followed.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import app.tivi.data.entities.TiviShow
import app.tivi.data.entities.TraktUser
import app.tivi.data.resultentities.FollowedShowEntryWithShow
import app.tivi.trakt.TraktAuthState
import com.google.accompanist.coil.rememberCoilPainter
import coil.compose.rememberImagePainter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.rememberInsetsPaddingValues
import com.google.accompanist.insets.ui.Scaffold
Expand Down Expand Up @@ -245,7 +245,9 @@ private fun FollowedShowItem(
.aspectRatio(2 / 3f)
) {
Image(
painter = rememberCoilPainter(poster, fadeIn = true),
painter = rememberImagePainter(poster) {
crossfade(true)
},
contentDescription = stringResource(
R.string.cd_show_poster_image,
show.title ?: ""
Expand Down
1 change: 0 additions & 1 deletion ui-popular/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.accompanist.insets

implementation libs.androidx.hilt.compose
Expand Down
1 change: 0 additions & 1 deletion ui-recommended/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.accompanist.insets

implementation libs.androidx.hilt.compose
Expand Down
1 change: 0 additions & 1 deletion ui-search/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.accompanist.insets

implementation libs.androidx.hilt.compose
Expand Down
2 changes: 1 addition & 1 deletion ui-showdetails/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.coil.compose
implementation libs.accompanist.insets
implementation libs.accompanist.flowlayout

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ import app.tivi.data.resultentities.numberAiredToWatch
import app.tivi.data.resultentities.numberToAir
import app.tivi.data.resultentities.numberWatched
import app.tivi.data.views.FollowedShowsWatchStats
import com.google.accompanist.coil.rememberCoilPainter
import coil.compose.rememberImagePainter
import com.google.accompanist.flowlayout.FlowRow
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.navigationBarsPadding
Expand Down Expand Up @@ -435,7 +435,9 @@ private fun PosterInfoRow(
) {
Row(modifier.padding(horizontal = 16.dp)) {
Image(
painter = rememberCoilPainter(posterImage, fadeIn = true),
painter = rememberImagePainter(posterImage) {
crossfade(true)
},
contentDescription = stringResource(R.string.cd_show_poster, show.title ?: ""),
modifier = Modifier
.weight(1f)
Expand All @@ -461,7 +463,9 @@ private fun BackdropImage(
Surface(modifier = modifier) {
if (backdropImage != null) {
Image(
painter = rememberCoilPainter(backdropImage, fadeIn = true),
painter = rememberImagePainter(backdropImage) {
crossfade(true)
},
contentDescription = stringResource(R.string.cd_show_poster),
modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.Crop,
Expand Down Expand Up @@ -575,12 +579,10 @@ private fun NetworkInfoPanel(
}

Image(
painter = rememberCoilPainter(
request = tmdbImage,
requestBuilder = {
transformations(TrimTransparentEdgesTransformation)
},
),
painter = rememberImagePainter(tmdbImage) {
crossfade(true)
transformations(TrimTransparentEdgesTransformation)
},
contentDescription = stringResource(R.string.cd_network_logo),
modifier = Modifier.sizeIn(maxWidth = 72.dp, maxHeight = 32.dp),
alignment = Alignment.TopStart,
Expand Down
1 change: 0 additions & 1 deletion ui-trending/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.accompanist.insets

implementation libs.androidx.hilt.compose
Expand Down
3 changes: 2 additions & 1 deletion ui-watched/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ dependencies {
implementation libs.compose.animation.animation
implementation libs.compose.ui.tooling

implementation libs.accompanist.coil
implementation libs.coil.compose

implementation libs.accompanist.insets
implementation libs.accompanist.swiperefresh

Expand Down
6 changes: 4 additions & 2 deletions ui-watched/src/main/java/app/tivi/home/watched/Watched.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import app.tivi.data.entities.TiviShow
import app.tivi.data.entities.TraktUser
import app.tivi.data.resultentities.WatchedShowEntryWithShow
import app.tivi.trakt.TraktAuthState
import com.google.accompanist.coil.rememberCoilPainter
import coil.compose.rememberImagePainter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.rememberInsetsPaddingValues
import com.google.accompanist.insets.ui.Scaffold
Expand Down Expand Up @@ -242,7 +242,9 @@ private fun WatchedShowItem(
.aspectRatio(2 / 3f)
) {
Image(
painter = rememberCoilPainter(poster, fadeIn = true),
painter = rememberImagePainter(poster) {
crossfade(true)
},
contentDescription = stringResource(
R.string.cd_show_poster_image,
show.title
Expand Down