Skip to content

Bump min SDK to 24#1117

Merged
MGaetan89 merged 8 commits intomainfrom
1111-increase-min-sdk-level-to-24
Jul 29, 2025
Merged

Bump min SDK to 24#1117
MGaetan89 merged 8 commits intomainfrom
1111-increase-min-sdk-level-to-24

Conversation

@MGaetan89
Copy link
Contributor

@MGaetan89 MGaetan89 commented Jul 22, 2025

Pull request

Description

This PR bumps the min SDK version of the project to 24.

Changes made

  • Bump the min SDK version to 24.
  • Bump ComScore to 6.12.1.
  • Deprecate PendingIntentUtils.appendImmutableFlagIfNeeded().
  • Remove outdated SDK_INT checks.

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@MGaetan89 MGaetan89 linked an issue Jul 22, 2025 that may be closed by this pull request
3 tasks
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Pillarbox Jul 22, 2025
@github-actions
Copy link

github-actions bot commented Jul 22, 2025

Code Coverage

Overall Project 48.81% -0.03% 🟢
Files changed 72.97% 🟢

Module Coverage
:pillarbox-player 54.29% -0.03% 🟢
Kover Gradle Plugin XML report for :plugins 6.37% -0.3% 🟢
Files
Module File Coverage
:pillarbox-player PendingIntentUtils.kt 100% 🟢
Monitoring.kt 91.02% -0.51% 🟢
Kover Gradle Plugin XML report for :plugins PillarboxDetektPlugin.kt 0% -2.27% 🟢
AppConfig.kt 0% 🟢

@MGaetan89
Copy link
Contributor Author

I'll look into the failing Android Lint step.
This is not linked to this PR, but rather https://github.blog/changelog/2025-07-21-code-scanning-will-stop-combining-multiple-sarif-runs-uploaded-in-the-same-sarif-file/
I'll submit a dedicated PR for that.

@MGaetan89 MGaetan89 marked this pull request as ready for review July 22, 2025 14:46
@MGaetan89 MGaetan89 requested a review from StaehliJ July 22, 2025 15:15
@MGaetan89
Copy link
Contributor Author

I'll look into the failing Android Lint step. This is not linked to this PR, but rather github.blog/changelog/2025-07-21-code-scanning-will-stop-combining-multiple-sarif-runs-uploaded-in-the-same-sarif-file I'll submit a dedicated PR for that.

Done in #1118

Copy link
Contributor

@StaehliJ StaehliJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have to keep enabled library desurgaring as the min SDK is 24 and this is required for min SDK < 26.

I just tried on an emulator api 24 and the demo crash when using Instant.

Caused by: java.lang.NoClassDefFoundError: kotlinx.datetime.Instant
at kotlinx.datetime.Clock$System.now(Clock.kt:54)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel$AlwaysStartDateBlockedAssetLoader.(ContentNotYetAvailableViewModel.kt:32)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel.player$lambda$0(ContentNotYetAvailableViewModel.kt:49)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel.$r8$lambda$9Gce7COnvWAm8No41DLvhDX03IA(ContentNotYetAvailableViewModel.kt)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at ch.srgssr.pillarbox.player.PillarboxExoPlayerKt.PillarboxExoPlayer(PillarboxExoPlayer.kt:63)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel.(ContentNotYetAvailableViewModel.kt:48)
... 81 more

@MGaetan89 MGaetan89 force-pushed the 1111-increase-min-sdk-level-to-24 branch from fefd3e0 to c8d1006 Compare July 23, 2025 08:31
@MGaetan89
Copy link
Contributor Author

I think we have to keep enabled library desurgaring as the min SDK is 24 and this is required for min SDK < 26.

I just tried on an emulator api 24 and the demo crash when using Instant.

Caused by: java.lang.NoClassDefFoundError: kotlinx.datetime.Instant
at kotlinx.datetime.Clock$System.now(Clock.kt:54)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel$AlwaysStartDateBlockedAssetLoader.(ContentNotYetAvailableViewModel.kt:32)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel.player$lambda$0(ContentNotYetAvailableViewModel.kt:49)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel.$r8$lambda$9Gce7COnvWAm8No41DLvhDX03IA(ContentNotYetAvailableViewModel.kt)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at ch.srgssr.pillarbox.player.PillarboxExoPlayerKt.PillarboxExoPlayer(PillarboxExoPlayer.kt:63)
at ch.srgssr.pillarbox.demo.ui.showcases.misc.ContentNotYetAvailableViewModel.(ContentNotYetAvailableViewModel.kt:48)
... 81 more

Yes, for now it still uses kotlinx.datetime.Instant. It will be better once #1084 is merged, and we use kotlin.time.Instant.

@MGaetan89 MGaetan89 force-pushed the 1111-increase-min-sdk-level-to-24 branch from c8d1006 to b7696dd Compare July 23, 2025 10:38
@MGaetan89
Copy link
Contributor Author

Yes, for now it still uses kotlinx.datetime.Instant. It will be better once #1084 is merged, and we use kotlin.time.Instant.

We still use classes like TimeZone in the demo apps, which use classes that are only available in API 26+ (like ZoneId and TimeOffset).
So I've put the desugar library back.

@StaehliJ StaehliJ added this pull request to the merge queue Jul 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 29, 2025
@MGaetan89 MGaetan89 added this pull request to the merge queue Jul 29, 2025
Merged via the queue into main with commit e21883a Jul 29, 2025
12 checks passed
@MGaetan89 MGaetan89 deleted the 1111-increase-min-sdk-level-to-24 branch July 29, 2025 06:08
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Pillarbox Jul 29, 2025
@Gustl22
Copy link

Gustl22 commented Oct 6, 2025

When a new version with this change is released? 1. of November is not so far away, so we can include the 16 kb requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Increase min sdk level to 24

3 participants