Skip to content

Commit 093cea3

Browse files
committed
Merge branch 'main' into migrate_last_android_test
2 parents d115134 + 903172d commit 093cea3

File tree

135 files changed

+3518
-2921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+3518
-2921
lines changed

.github/workflows/build_windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ jobs:
2929
run: >
3030
./gradlew
3131
:pillarbox-demo:assembleProdDebug
32-
:pillarbox-demo-cast:assembleDebug
3332
:pillarbox-demo-tv:assembleDebug

.github/workflows/quality.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
run: >
3535
./gradlew
3636
:pillarbox-demo:lintProdDebug
37-
:pillarbox-demo-cast:lintDebug
3837
:pillarbox-demo-tv:lintDebug
3938
:pillarbox-player-testutils:lintDebug
4039
- name: Upload Android Lint results
@@ -116,7 +115,7 @@ jobs:
116115
run: ./gradlew :build-logic:plugins:koverXmlReport koverXmlReportDebug
117116
- name: Report Code Coverage
118117
if: ${{ github.event_name == 'pull_request' }}
119-
uses: madrapps/[email protected].1
118+
uses: madrapps/[email protected].2
120119
with:
121120
paths: ${{ github.workspace }}/**/build/reports/kover/**.xml
122121
token: ${{ github.token }}

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
USERNAME: ${{ github.actor }}
3838
GITHUB_TOKEN: ${{ github.token }}
3939
VERSION_NAME: ${{ github.ref_name }}
40+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
41+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
42+
4043
steps:
4144
- name: Checkout
4245
uses: actions/checkout@v4

build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidApplicationPlugin.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ import ch.srgssr.pillarbox.gradle.internal.VersionConfig
99
import ch.srgssr.pillarbox.gradle.internal.configureAndroidLintModule
1010
import ch.srgssr.pillarbox.gradle.internal.configureAndroidModule
1111
import ch.srgssr.pillarbox.gradle.internal.configureKotlinModule
12+
import ch.srgssr.pillarbox.gradle.internal.libs
1213
import com.android.build.api.dsl.ApplicationExtension
1314
import org.gradle.api.Plugin
1415
import org.gradle.api.Project
1516
import org.gradle.kotlin.dsl.configure
17+
import org.gradle.kotlin.dsl.dependencies
1618
import org.gradle.kotlin.dsl.extra
1719

1820
/**
@@ -69,5 +71,9 @@ class PillarboxAndroidApplicationPlugin : Plugin<Project> {
6971
}
7072
}
7173
}
74+
75+
dependencies {
76+
add("coreLibraryDesugaring", libs.findLibrary("desugar_jdk_libs").get())
77+
}
7278
}
7379
}

build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPlugin.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ package ch.srgssr.pillarbox.gradle
66

77
import ch.srgssr.pillarbox.gradle.internal.configureAndroidModule
88
import ch.srgssr.pillarbox.gradle.internal.configureKotlinModule
9+
import ch.srgssr.pillarbox.gradle.internal.libs
910
import com.android.build.api.dsl.LibraryExtension
1011
import org.gradle.api.Plugin
1112
import org.gradle.api.Project
1213
import org.gradle.kotlin.dsl.configure
14+
import org.gradle.kotlin.dsl.dependencies
1315

1416
/**
1517
* Custom Gradle plugin to configure an Android library module for Pillarbox.
@@ -22,7 +24,6 @@ class PillarboxAndroidLibraryPlugin : Plugin<Project> {
2224

2325
extensions.configure<LibraryExtension> {
2426
configureAndroidModule(this)
25-
2627
defaultConfig {
2728
consumerProguardFiles("consumer-rules.pro")
2829
}
@@ -35,7 +36,10 @@ class PillarboxAndroidLibraryPlugin : Plugin<Project> {
3536
}
3637
}
3738
}
38-
3939
configureKotlinModule()
40+
41+
dependencies {
42+
add("coreLibraryDesugaring", libs.findLibrary("desugar_jdk_libs").get())
43+
}
4044
}
4145
}

build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryPublishingPlugin.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,19 @@ class PillarboxAndroidLibraryPublishingPlugin : Plugin<Project> {
8686
.get()
8787
}
8888
}
89+
maven {
90+
name = "SRGSSRMaven"
91+
url = uri("https://nxrm.rts.ch/repository/maven-srgssr-releases/")
92+
93+
credentials {
94+
username = providers.gradleProperty("sonatypeUsername")
95+
.orElse(providers.environmentVariable("SONATYPE_USERNAME"))
96+
.orNull
97+
password = providers.gradleProperty("sonatypePassword")
98+
.orElse(providers.environmentVariable("SONATYPE_PASSWORD"))
99+
.orNull
100+
}
101+
}
89102
}
90103
}
91104

build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/PillarboxAndroidLibraryTestedModulePlugin.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class PillarboxAndroidLibraryTestedModulePlugin : Plugin<Project> {
2929
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3030
}
3131

32-
@Suppress("UnstableApiUsage")
3332
testOptions {
3433
unitTests {
3534
isIncludeAndroidResources = true

build-logic/plugins/src/main/java/ch/srgssr/pillarbox/gradle/internal/ProjectExtensions.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ internal fun Project.configureAndroidModule(extension: CommonExtension<*, *, *,
2626
compileOptions {
2727
sourceCompatibility = AppConfig.javaVersion
2828
targetCompatibility = AppConfig.javaVersion
29+
isCoreLibraryDesugaringEnabled = true
2930
}
3031

3132
buildFeatures {

docs/README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,41 @@ repositories {
8181
gpr.user=<your_GitHub_username>
8282
gpr.key=<your_GitHub_personal_access_token>
8383
```
84-
8584
> [!TIP]
8685
> You can check the [GitHub documentation](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package) for more information.
8786
87+
88+
### Add the SRG SSR Maven repository
89+
90+
Pillarbox is also deployed to the [SRG SSR Maven repository](https://nxrm.rts.ch/repository/maven-srgssr/). If you don't want to use the GitHub Packages repository, add the following to your Gradle configuration:
91+
92+
> [!NOTE]
93+
> You only need to add either the GitHub Packages repository or the SRG SSR repository, not both.
94+
95+
```kotlin
96+
// If you declare your repositories in the `settings.gradle(.kts)` file
97+
repositories {
98+
maven("https://nxrm.rts.ch/repository/maven-srgssr/") {
99+
credentials {
100+
username = providers.gradleProperty("srg_maven_user").get()
101+
password = providers.gradleProperty("srg_maven_password").get()
102+
}
103+
}
104+
}
105+
106+
// If you declare your repositories in the root `build.gradle(.kts)` file
107+
repositories {
108+
maven("https://nxrm.rts.ch/repository/maven-srgssr/") {
109+
credentials {
110+
username = project.findProperty("srg_maven_user")?.toString()
111+
password = project.findProperty("srg_maven_password")?.toString()
112+
}
113+
}
114+
}
115+
```
116+
117+
The necessary credentials can be found in the SRG SSR Bitwarden.
118+
88119
### Add the Pillarbox dependencies
89120

90121
In your module's `build.gradle`/`build.gradle.kts` file, add the following dependencies, based on your needs:
@@ -123,6 +154,22 @@ kotlinOptions {
123154
}
124155
```
125156

157+
### Support Android API < 26
158+
159+
If your min SDK version is below 26, you have to enable library desugaring as described in the [Android documentation](https://developer.android.com/studio/write/java8-support#library-desugaring):
160+
161+
```kotlin
162+
android {
163+
compileOptions {
164+
isCoreLibraryDesugaringEnabled = true
165+
}
166+
}
167+
168+
dependencies {
169+
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
170+
}
171+
```
172+
126173
### Integrate Pillarbox
127174

128175
To start using Pillarbox in your project, you can check each module's documentation:

gradle/libs.versions.toml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
[versions]
2-
android-gradle-plugin = "8.9.2"
2+
android-gradle-plugin = "8.10.0"
33
androidx-activity = "1.10.1"
44
androidx-annotation = "1.9.1"
5-
androidx-compose = "2025.04.00"
5+
androidx-compose = "2025.05.01"
66
androidx-core = "1.16.0"
7-
androidx-datastore = "1.1.4"
8-
androidx-lifecycle = "2.8.7"
9-
androidx-media3 = "1.6.1"
10-
androidx-mediarouter-compose = "0.3.0"
11-
androidx-navigation = "2.8.9"
7+
androidx-datastore = "1.1.7"
8+
androidx-lifecycle = "2.9.0"
9+
androidx-media3 = "1.7.1"
10+
androidx-navigation = "2.9.0"
1211
androidx-paging = "3.3.6"
1312
androidx-test-core = "1.6.1"
1413
androidx-test-ext-junit = "1.2.1"
1514
androidx-test-monitor = "1.7.2"
1615
androidx-tv-material = "1.0.0"
17-
coil = "3.1.0"
16+
coil = "3.2.0"
1817
comscore = "6.11.1"
19-
dependency-analysis-gradle-plugin = "2.16.0"
18+
dependency-analysis-gradle-plugin = "2.17.0"
19+
desugar_jdk_libs = "2.1.5"
2020
detekt = "1.23.8"
2121
dokka = "2.0.0"
2222
guava = "33.3.1-android"
23-
json = "20250107"
23+
json = "20250517"
2424
junit = "4.13.2"
25-
kotlin = "2.1.20"
25+
kotlin = "2.1.21"
2626
kotlinx-coroutines = "1.10.2"
2727
kotlinx-datetime = "0.6.2"
2828
kotlinx-kover = "0.9.1"
2929
kotlinx-serialization = "1.8.1"
30-
mockk = "1.14.0"
30+
media-maestro = "0.10.0"
31+
mockk = "1.14.2"
3132
okhttp = "4.12.0"
3233
okio = "3.11.0"
34+
reorderable = "2.4.3"
3335
robolectric = "4.14.1"
34-
srg-data-provider = "0.13.2"
36+
srg-data-provider = "0.15.1"
3537
tag-commander-core = "5.4.3"
3638
tag-commander-server-side = "5.5.2"
3739
turbine = "1.2.0"
@@ -51,7 +53,6 @@ androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime",
5153
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" }
5254
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "androidx-lifecycle" }
5355
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
54-
androidx-mediarouter-compose = { module = "ch.srgssr.androidx.mediarouter:mediarouter-compose", version.ref = "androidx-mediarouter-compose" }
5556
androidx-navigation-common = { module = "androidx.navigation:navigation-common", version.ref = "androidx-navigation" }
5657
androidx-navigation-runtime = { module = "androidx.navigation:navigation-runtime", version.ref = "androidx-navigation" }
5758
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" }
@@ -66,6 +67,7 @@ coil-core = { group = "io.coil-kt.coil3", name = "coil-core", version.ref = "coi
6667
coil-network-cache-control = { group = "io.coil-kt.coil3", name = "coil-network-cache-control", version.ref = "coil" }
6768
coil-network-core = { group = "io.coil-kt.coil3", name = "coil-network-core", version.ref = "coil" }
6869
coil-network-okhttp = { group = "io.coil-kt.coil3", name = "coil-network-okhttp", version.ref = "coil" }
70+
desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
6971
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
7072
json = { module = "org.json:json", version.ref = "json" }
7173
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
@@ -76,6 +78,8 @@ kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.
7678
kotlinx-kover-gradle = { module = "org.jetbrains.kotlinx:kover-gradle-plugin", version.ref = "kotlinx-kover" }
7779
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
7880
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
81+
media-maestro = { module = "ch.srgssr.media.maestro:media-maestro", version.ref = "media-maestro" }
82+
reorderable = { module = "sh.calvin.reorderable:reorderable", version.ref = "reorderable" }
7983
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
8084
robolectric-annotations = { module = "org.robolectric:annotations", version.ref = "robolectric" }
8185
robolectric-shadows-framework = { module = "org.robolectric:shadows-framework", version.ref = "robolectric" }
@@ -124,7 +128,6 @@ androidx-compose-ui-text = { module = "androidx.compose.ui:ui-text" }
124128
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
125129
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
126130
androidx-compose-ui-unit = { module = "androidx.compose.ui:ui-unit" }
127-
androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" }
128131
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
129132
androidx-compose-material3-window-size = { module = "androidx.compose.material3:material3-window-size-class" }
130133
androidx-compose-material-icons-core = { module = "androidx.compose.material:material-icons-core" }

0 commit comments

Comments
 (0)