diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 28c6ecf52..c9d67d327 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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" diff --git a/pillarbox-core-business/src/test/java/ch/srgssr/pillarbox/core/business/ChapterAdapterTest.kt b/pillarbox-core-business/src/test/java/ch/srgssr/pillarbox/core/business/ChapterAdapterTest.kt index c180bb5c0..5be17683a 100644 --- a/pillarbox-core-business/src/test/java/ch/srgssr/pillarbox/core/business/ChapterAdapterTest.kt +++ b/pillarbox-core-business/src/test/java/ch/srgssr/pillarbox/core/business/ChapterAdapterTest.kt @@ -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) ) @@ -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) ) @@ -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)) } @@ -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)) } @@ -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) ) @@ -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) @@ -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) ) diff --git a/pillarbox-demo-tv/build.gradle.kts b/pillarbox-demo-tv/build.gradle.kts index 83f124995..bd745b3c8 100644 --- a/pillarbox-demo-tv/build.gradle.kts +++ b/pillarbox-demo-tv/build.gradle.kts @@ -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) diff --git a/pillarbox-demo/build.gradle.kts b/pillarbox-demo/build.gradle.kts index fcb95f587..91e19f3b6 100644 --- a/pillarbox-demo/build.gradle.kts +++ b/pillarbox-demo/build.gradle.kts @@ -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) diff --git a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/theme/PillarboxTheme.kt b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/theme/PillarboxTheme.kt index e97c145d7..54402a519 100644 --- a/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/theme/PillarboxTheme.kt +++ b/pillarbox-demo/src/main/java/ch/srgssr/pillarbox/demo/ui/theme/PillarboxTheme.kt @@ -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() }