diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63f5034..b0a05ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,9 @@ jobs: with: cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - - name: Assemble - run: ./gradlew assembleRelease --configuration-cache - name: Run tests run: ./gradlew test --configuration-cache + - name: Assemble + run: ./gradlew assembleRelease --configuration-cache + - name: Assemble with lowest supported player version + run: ./gradlew assembleRelease --configuration-cache -PinstallLowestSupportedPlayerVersion=true diff --git a/CHANGELOG.md b/CHANGELOG.md index e1a3293..0114e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ > - 🏠 Internal > - 💅 Polish +## Unreleased + +* 🐛 Changed the minimum supported THEOplayer version to 7.6.0. ([#85](https://github.com/THEOplayer/android-ui/pull/85)) + * This was effectively already the minimum version as of Open Video UI for Android version 1.7.2, but it wasn't noticed until now. + * Future versions will be properly tested with the minimum supported THEOplayer version to avoid similar compatibility issues. + ## v1.13.2 (2026-03-03) * 🐛 Fixed `PictureInPictureButton` to only be shown when the backing `THEOplayerView` has a valid `PiPConfiguration`. ([#81](https://github.com/THEOplayer/android-ui/pull/81)) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1ecef39..7d6bffe 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -82,7 +82,28 @@ dependencies { releaseImplementation(project(":ui")) "mavenImplementation"("com.theoplayer.android-ui:android-ui:1.+") - implementation(libs.theoplayer) - implementation(libs.theoplayer.ads.ima) - implementation(libs.theoplayer.cast) -} \ No newline at end of file + implementation(libs.theoplayer) { + useLowestSupportedPlayerVersion() + } + implementation(libs.theoplayer.ads.ima) { + useLowestSupportedPlayerVersion() + } + implementation(libs.theoplayer.cast) { + useLowestSupportedPlayerVersion() + } +} + +val installLowestSupportedPlayerVersion: String by project.ext + +fun ExternalDependency.useLowestSupportedPlayerVersion() { + if (installLowestSupportedPlayerVersion.toBooleanStrict()) { + val lowestVersion = versionConstraint.strictVersion + .removePrefix("[") + .split(",", limit = 2) + .first() + version { + prefer(lowestVersion) + strictly(lowestVersion) + } + } +} diff --git a/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt b/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt index 14e3ad5..ed29d6b 100644 --- a/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt +++ b/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt @@ -75,7 +75,7 @@ fun MainContent() { val context = LocalContext.current val theoplayerView = remember(context) { val config = THEOplayerConfig.Builder().apply { - pip(PipConfiguration.Builder().build()) + pipConfiguration(PipConfiguration.Builder().build()) }.build() THEOplayerView(context, config).apply { // Add ads integration through Google IMA diff --git a/gradle.properties b/gradle.properties index c396b12..0554f97 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,3 +28,5 @@ org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true # The version of the THEOplayer Open Video UI for Android. version=1.13.2 +# (For testing purposes) Install the lowest supported THEOplayer version. +installLowestSupportedPlayerVersion=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0b273d0..e1932a3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,7 @@ androidx-junit = "1.3.0" androidx-espresso = "3.7.0" androidx-mediarouter = "1.8.1" dokka = "2.0.0" -theoplayer = { prefer="10.11.0", strictly = "[5.0, 11.0)" } +theoplayer = { prefer="10.11.0", strictly = "[7.6.0, 11.0)" } [libraries] androidx-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "ktx" }