Skip to content

Commit

Permalink
Remove lifecyle 2.8.1 (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ authored Jun 6, 2024
1 parent c973ecb commit 78e4001
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ androidx-compose = "2024.05.00"
androidx-core = "1.13.1"
androidx-fragment = "1.7.1"
androidx-leanback = "1.0.0"
androidx-lifecycle = "2.8.1"
#lifecyle is currently not stable, have to wait for 2.8.2 or higher.
androidx-lifecycle = "2.7.0"
androidx-media = "1.7.0"
androidx-media3 = "1.3.1"
androidx-navigation = "2.7.7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ class ChapterAdapterTest {
imageUrl = "https://www.rts.ch/image.png",
mediaType = MediaType.VIDEO,
)
val chapter1 = fullLengthChapter.copy(urn = "urn:chapitre1")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapitre2")
val chapter1 = fullLengthChapter.copy(urn = "urn:chapter1")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapter2")
val mediaComposition = MediaComposition(
chapterUrn = "urn", listChapter = listOf(fullLengthChapter, chapter1, chapter2)
)
Expand All @@ -116,8 +116,8 @@ class ChapterAdapterTest {
imageUrl = "https://www.rts.ch/image.png",
mediaType = MediaType.VIDEO,
)
val chapter1 = mainChapter.copy(urn = "urn:chapitre1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = mainChapter.copy(urn = "urn:chapitre2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn")
val chapter1 = mainChapter.copy(urn = "urn:chapter1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = mainChapter.copy(urn = "urn:chapter2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn")
val mediaComposition = MediaComposition(
chapterUrn = mainChapter.urn, listChapter = listOf(mainChapter, chapter1, chapter2)
)
Expand All @@ -135,10 +135,10 @@ class ChapterAdapterTest {
imageUrl = "https://www.rts.ch/image.png",
mediaType = MediaType.VIDEO,
)
val chapter1 = fullLengthChapter.copy(urn = "urn:chapitre1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapitre2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn")
val chapter1 = fullLengthChapter.copy(urn = "urn:chapter1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapter2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn")
val mediaComposition = MediaComposition(
chapterUrn = "urn:chapitre1", listChapter = listOf(fullLengthChapter, chapter1, chapter2)
chapterUrn = "urn:chapter1", listChapter = listOf(fullLengthChapter, chapter1, chapter2)
)
assertEquals(emptyList(), ChapterAdapter.getChapters(mediaComposition))
}
Expand All @@ -153,10 +153,10 @@ class ChapterAdapterTest {
imageUrl = "https://www.rts.ch/image.png",
mediaType = MediaType.AUDIO,
)
val chapter1 = fullLengthChapter.copy(urn = "urn:chapitre1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapitre2", fullLengthUrn = "urn")
val chapter1 = fullLengthChapter.copy(urn = "urn:chapter1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapter2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn")
val mediaComposition = MediaComposition(
chapterUrn = "urn:chapitre1", listChapter = listOf(fullLengthChapter, chapter1, chapter2)
chapterUrn = "urn", listChapter = listOf(fullLengthChapter, chapter1, chapter2)
)
assertEquals(emptyList(), ChapterAdapter.getChapters(mediaComposition))
}
Expand All @@ -171,8 +171,8 @@ class ChapterAdapterTest {
imageUrl = "https://www.rts.ch/image.png",
mediaType = MediaType.AUDIO,
)
val chapter1 = fullLengthChapter.copy(urn = "urn:chapitre1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapitre2", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter1 = fullLengthChapter.copy(urn = "urn:chapter", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapter", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val mediaComposition = MediaComposition(
chapterUrn = "urn", listChapter = listOf(fullLengthChapter, chapter1, chapter2)
)
Expand All @@ -189,10 +189,10 @@ class ChapterAdapterTest {
imageUrl = "https://www.rts.ch/image.png",
mediaType = MediaType.VIDEO,
)
val chapter1 = fullLengthChapter.copy(urn = "urn:chapitre1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapitre2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn")
val chapter1 = fullLengthChapter.copy(urn = "urn:chapter1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapter2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn")
val chapter3 = fullLengthChapter.copy(
urn = "urn:chapitre3", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn", mediaType = MediaType.AUDIO
urn = "urn:chapter3", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "urn", mediaType = MediaType.AUDIO
)
val mediaComposition = MediaComposition(
chapterUrn = "urn", listChapter = listOf(fullLengthChapter, chapter1, chapter2, chapter3)
Expand All @@ -215,8 +215,8 @@ class ChapterAdapterTest {
imageUrl = "https://www.rts.ch/image.png",
mediaType = MediaType.VIDEO,
)
val chapter1 = fullLengthChapter.copy(urn = "urn:chapitre1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapitre2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "other urn")
val chapter1 = fullLengthChapter.copy(urn = "urn:chapter1", fullLengthMarkIn = 0, fullLengthMarkOut = 10, fullLengthUrn = "urn")
val chapter2 = fullLengthChapter.copy(urn = "urn:chapter2", fullLengthMarkIn = 30, fullLengthMarkOut = 60, fullLengthUrn = "other urn")
val mediaComposition = MediaComposition(
chapterUrn = "urn", listChapter = listOf(fullLengthChapter, chapter1, chapter2)
)
Expand Down
1 change: 0 additions & 1 deletion pillarbox-demo-tv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ dependencies {
implementation(libs.androidx.core)
implementation(libs.androidx.fragment)
implementation(libs.androidx.lifecycle.common)
implementation(libs.androidx.lifecycle.runtime)
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.media3.common)
Expand Down
1 change: 0 additions & 1 deletion pillarbox-demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ dependencies {
implementation(libs.androidx.compose.ui.unit)
implementation(libs.androidx.core)
implementation(libs.androidx.lifecycle.common)
implementation(libs.androidx.lifecycle.runtime)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.lifecycle.viewmodel.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ fun PillarboxTheme(
MaterialTheme(colorScheme = colorScheme) {
CompositionLocalProvider(
LocalPaddings provides paddings,
// TODO Remove this when Compose 1.7 is stable (see https://issuetracker.google.com/issues/336842920)
androidx.lifecycle.compose.LocalLifecycleOwner provides androidx.compose.ui.platform.LocalLifecycleOwner.current,
) {
content()
}
Expand Down

0 comments on commit 78e4001

Please sign in to comment.