-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚠️ [Dependency Updates] Update googleExoPlayerVersion
to 2.18.1
#17936
Conversation
It seems that this exclusion is no longer necessary and as such removed to make this dependency a bit more maintainable going forward, that is, without needing to care about any exclusions.
It is generally recommended that transitively used dependencies should be declared directly.
Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.18.1 ------------------------------------------------------------------------ Note that the '2.18.2' update requires libraries and applications that depend on it to compile against version 33 (Android 13) or later of the Android APIs. However, this project is currently compiled against android-31 (Android 12). Thus, until the 'compileSdkVersion' of this project gets updated to '33' updating to '2.18.2' isn't possible. ------------------------------------------------------------------------
This started appearing because, as part of the 'ExoPlayer' update to '2.18.1', its transient 'RecyclerView' dependency got updated as well, from '1.1.0' to '1.2.1', which caused this deprecation warning. Warning Message: "'getter for adapterPosition: Int' is deprecated. Deprecated in Java" Explanation: "This method is confusing when adapters nest other adapters. If you are calling this in the context of an Adapter, you probably want to call getBindingAdapterPosition or if you want the position as RecyclerView sees it, you should call getAbsoluteAdapterPosition." This deprecated warning is suppressed, that is, instead of being resolved, since a resolution is out of the scope of this 'ExoPlayer' update. For more info see: - RecyclerView.ViewHolder#getAdapterPosition (Doc): https://developer.android.com/reference/androidx/recyclerview/widget/ RecyclerView.ViewHolder#getAdapterPosition()
Error Message: "InjectProcessingStep was unable to process 'mMediaStore' because 'com.google.android.exoplayer2.Player.EventListener' could not be resolved." As part of the 'ExoPlayer' version '2.17.0' the deprecated 'Player.EventListener' got removed in favor of 'Player.Listener'. Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.17.0 In addition to that, this changes adds an extra warnings because of the 'onLoadingChanged(...)' method, which is now deprecated. However, resolving this change will happen in a separate subsequent commit. First, all other compilation errors will get resolved, the app will be tested for correctness and then all warnings will get resolved too. Warning Message: "Overrides deprecated method in 'com.google.android .exoplayer2.Player.Listener'" Explanation: "Use onIsLoadingChanged(boolean) instead." For more info see: - exoplayer2.Player.Listener#onIsLoadingChanged (Doc): https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ Player.Listener.html#onIsLoadingChanged(boolean)
Error Message: "e: /Users/.../WordPress-Android/WordPress/src/main/java/ org/wordpress/android/ui/media/ExoPlayerUtils.kt: (10, 45): Unresolved reference: ExtractorMediaSource" As part of the 'ExoPlayer' version '2.14.0' the deprecated 'ExtractorMediaSource' got removed in favor of 'ProgressiveMediaSource'. Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.14.0
Error Message: "e: /Users/.../WordPress-Android/WordPress/src/main/java/ org/wordpress/android/ui/media/ExoPlayerUtils.kt: (19, 47): Unresolved reference: DefaultHttpDataSourceFactory" As part of the 'ExoPlayer' version '2.16.0' the deprecated 'DefaultHttpDataSourceFactory' got removed in favor of 'DefaultHttpDataSource.Factory'. Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.16.0 PS: Also, the 'DashMediaSource.Factory' import got update to resolve 'Factory' related import conflicts.
Error Message: "e: /Users/.../WordPress-Android/WordPress/src/main/java/ org/wordpress/android/ui/media/ExoPlayerUtils.kt: (53, 18): None of the following functions can be called with the arguments supplied: " As part of the 'ExoPlayer' version '2.17.0' the deprecated 'MediaSourceFactory#createMediaSource(Uri)' got removed in favor of 'MediaSourceFactory#createMediaSource(MediaItem)'. Release Notes: https://github.com/google/ExoPlayer/releases/tag/r2.17.0
This 'buildHttpDataSourceFactory(...)' fucntion doesn't need to be public.
This suppression is no longer necessary as all the deprecation were no longer applicable. Instead, those deprecated APIs got removed and the project wasn't compiling anymore. After fixing the compilation errors, the deprecated warnings were no longer applicable.
Warning Message: "'com.google.android.exoplayer2.ui.PlayerView' is deprecated " Explanation: "Use StyledPlayerView instead." For more info see: - exoplayer2.ui.PlayerView (Doc): https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ui/ PlayerView.html
Warning Message: "'com.google.android.exoplayer2.SimpleExoPlayer' is deprecated" Explanation: "Use ExoPlayer instead." For more info see: - exoplayer2.SimpleExoPlayer (Doc): https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ SimpleExoPlayer.html
Warning Message: "Overrides deprecated method in 'com.google.android.exoplayer2.Player.Listener'" Explanation: "Use onIsLoadingChanged(boolean) instead." For more info see: - exoplayer2.Player.Listener#onIsLoadingChanged (Doc): https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ Player.Listener.html#onIsLoadingChanged(boolean)
Warning Message: "'prepare(com.google.android.exoplayer2.source. MediaSource)' is deprecated " Explanation: "Use setMediaSource(MediaSource) and Player.prepare() instead." For more info see: - exoplayer2.ExoPlayer#prepare (Doc): https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ ExoPlayer.html#prepare(com.google.android.exoplayer2.source.MediaSource)
googleExoPlayerVersion
to 2.18.1googleExoPlayerVersion
to 2.18.1
📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17936-93feeee.apk
|
📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17936-93feeee.apk
|
Excluding the 'org.checkerframework' group and its 'checker' module seems to be fixing this 'CheckDuplicatesRunnable' failure. ------------------------------------------------------------------------ * What went wrong: Execution failed for task ':WordPress:checkWordpressWasabiDebug AndroidTestDuplicateClasses'. > A failure occurred while executing com.android.build.gradle.internal .tasks.CheckDuplicatesRunnable > Duplicate class org.checkerframework.checker.compilermsgs.qual .CompilerMessageKey found in modules checker-3.1 (org .checkerframework:checker:3.1.1) and checker-qual-3.12.0 (org.checkerframework:checker-qual:3.12.0) ... ------------------------------------------------------------------------
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
Found 1 violations: The PR caused the following dependency changes: +--- project :libs:editor
| +--- org.wordpress:aztec:{strictly v1.6.3} -> v1.6.3
| | \--- androidx.legacy:legacy-support-v4:1.0.0
-| | \--- androidx.media:media:1.0.0 -> 1.2.1
-| | +--- androidx.collection:collection:1.1.0 (*)
-| | \--- androidx.core:core:1.3.0 -> 1.8.0 (*)
+| | \--- androidx.media:media:1.0.0 -> 1.4.3
+| | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
+| | +--- androidx.collection:collection:1.1.0 (*)
+| | \--- androidx.core:core:1.6.0 -> 1.8.0 (*)
| \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.92.0
| \--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-5
-| +--- com.google.android.exoplayer:exoplayer:2.13.3
-| | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
-| | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | | | \--- com.google.guava:guava:27.1-android
-| | | | +--- com.google.guava:failureaccess:1.0.1
-| | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
-| | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
-| | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
-| | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
-| | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
-| | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
-| | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
-| | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
-| | +--- androidx.recyclerview:recyclerview:1.1.0 -> 1.2.1 (*)
-| | \--- androidx.media:media:1.2.1 (*)
+| +--- com.google.android.exoplayer:exoplayer:2.13.3 -> 2.18.1
+| | +--- com.google.android.exoplayer:exoplayer-common:2.18.1
+| | | +--- androidx.annotation:annotation:1.3.0
+| | | \--- com.google.guava:guava:31.0.1-android
+| | | +--- com.google.guava:failureaccess:1.0.1
+| | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+| | +--- com.google.android.exoplayer:exoplayer-database:2.18.1
+| | | +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+| | | \--- androidx.annotation:annotation:1.3.0
+| | +--- com.google.android.exoplayer:exoplayer-datasource:2.18.1
+| | | +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+| | | +--- com.google.android.exoplayer:exoplayer-database:2.18.1 (*)
+| | | \--- androidx.annotation:annotation:1.3.0
+| | +--- com.google.android.exoplayer:exoplayer-decoder:2.18.1
+| | | +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+| | | \--- androidx.annotation:annotation:1.3.0
+| | +--- com.google.android.exoplayer:exoplayer-extractor:2.18.1
+| | | +--- androidx.annotation:annotation:1.3.0
+| | | +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+| | | \--- com.google.android.exoplayer:exoplayer-decoder:2.18.1 (*)
+| | +--- com.google.android.exoplayer:exoplayer-core:2.18.1
+| | | +--- androidx.annotation:annotation:1.3.0
+| | | +--- androidx.core:core:1.7.0 -> 1.8.0 (*)
+| | | +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+| | | +--- com.google.android.exoplayer:exoplayer-datasource:2.18.1 (*)
+| | | +--- com.google.android.exoplayer:exoplayer-decoder:2.18.1 (*)
+| | | +--- com.google.android.exoplayer:exoplayer-extractor:2.18.1 (*)
+| | | \--- com.google.android.exoplayer:exoplayer-database:2.18.1 (*)
+| | +--- com.google.android.exoplayer:exoplayer-dash:2.18.1
+| | | +--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+| | | \--- androidx.annotation:annotation:1.3.0
+| | +--- com.google.android.exoplayer:exoplayer-hls:2.18.1
+| | | +--- androidx.annotation:annotation:1.3.0
+| | | \--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+| | +--- com.google.android.exoplayer:exoplayer-rtsp:2.18.1
+| | | +--- androidx.annotation:annotation:1.3.0
+| | | \--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+| | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.1
+| | | +--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
+| | | \--- androidx.annotation:annotation:1.3.0
+| | \--- com.google.android.exoplayer:exoplayer-ui:2.18.1
+| | +--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
+| | +--- androidx.annotation:annotation:1.3.0
+| | +--- androidx.recyclerview:recyclerview:1.2.1 (*)
+| | \--- androidx.media:media:1.4.3 (*)
-| +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
+| +--- androidx.media:media:1.1.0 -> 1.4.3 (*)
| \--- com.google.android.exoplayer:extension-okhttp:2.13.3
-| \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+| \--- com.google.android.exoplayer:exoplayer-common:2.13.3 -> 2.18.1 (*)
+--- org.wordpress:login:1.0.0
-| \--- androidx.media:media:1.2.1 (*)
+| \--- androidx.media:media:1.2.1 -> 1.4.3 (*)
-\--- com.google.android.exoplayer:exoplayer:2.13.3 (*)
++--- com.google.android.exoplayer:exoplayer-common:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-core:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-dash:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-hls:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.1 (*)
++--- com.google.android.exoplayer:exoplayer-ui:2.18.1 (*)
+\--- com.google.android.exoplayer:exoplayer:2.18.1 (*)
Please review and act accordingly
|
👋 @fluiddot ! A friendly reminder on this (internal discussion: Do you think that someone from the Gutenberg team can take a look at it at some point in order to avoid keeping this PR open for much longer, risking it becoming stale (it has been already more than 2 months)? 🙏 😱 🙇 |
Hey @ParaskP7 👋 ! Sorry for not being able to check this sooner 🙇.
I agree it's not ideal to keep this open much longer, but I'm not sure if we have the bandwidth to take a look soon. I'd like to defer this to @twstokes in case we can prioritize it in the next Sprint. |
👋 @fluiddot and thanks so much for the reply! 🙇
Sure, and of course, I understand. 👍 @twstokes do you think this update can be prioritized at any point in the future, next sprint or otherwise? I personally think we better update |
👋 Hey @fluiddot and @ParaskP7, thanks for looping me in!
Due to the recent work to update the target SDK version to 33 / Android 13, should effort be put into bumping it to FYI, our team is planning to update GBM to use Android 13 in the upcoming weeks. |
👋 @twstokes and thanks for the reply!
Since the FYI: The only caveat to that is that you would need to upgrade
Awesome, looking forward to that as it has the potential to unlock other updates as well (ie. latest |
Hey @ParaskP7 👋 , as part of the ongoing effort of upgrading Android 13 in Gutenberg Mobile, I took a quick look at this. Gutenberg Mobile uses the Exoplayer library via the That said, I see the following options in order to unblock this PR:
Since none of the above options seem optimal, I'm wondering how urgent is updating Exoplayer:
|
👋 @fluiddot and thank you for the reply!
Thank you for taking a look! 🙇
Yes, yes! 😬 I see that only in 6.0 alpha versions (specifically, v6.0.0-alpha.2) Exoplayer was updated to a newer version, the latest is 2.18.1 (reference). Good find! 🌟
🙏 👀 🤔
Yea, from the (quick) looks of it, this might be our best (only?) option, but as you said, it's a long shot (lack of support/contributions) and thus we can't really depend on it happening anytime soon... 🤷
Yea, this might be risky indeed, and to be honest, from the (quick) looks of it, I wouldn't recommend. 🙅
Yea, that might be a lot of work and sound a bit of risky too, I wouldn't recommend. 🙅
True, this would give us the most flexibility with
🙏 🤔 👀
My understanding is that this isn't blocking any project. But then, I don't have a clear picture of any future projects that the products team are and will be working against. FYI: Me checking out
As far as I understand no, maybe this will change with FYI: PS: Apart from that, to the best of my knowledge,
Not sure, it depends how much FYI: Also, we now have Having said the above, if you too think this update is not urgent, you can totally ignore it, at least for now. 👍 My effort was to try and update In the future, if anyone would try to update |
Sounds good to me 👍, if there's no urgency on merging this PR or need of unblocking something else, I agree on pausing it for now. In the future, if there's a need for upgrading this library, we could resume it by exploring the options we shared. |
Deal, I'll then go ahead and close this (for now)! 🤝
👍
Thank YOU @fluiddot for helping me resolve this, one way or another! ❤️ 💯 🥇 |
Parent #17566
This PR updates
googleExoPlayerVersion
to 2.18.1. FYI: This is NOT the latest version of google.exoplayer.Also, as part of this update the below transitive dependencies were added:
WordPress
module (359b690):com.google.android.exoplayer:exoplayer-common
com.google.android.exoplayer:exoplayer-core
com.google.android.exoplayer:exoplayer-dash
com.google.android.exoplayer:exoplayer-hls
com.google.android.exoplayer:exoplayer-smoothstreaming
com.google.android.exoplayer:exoplayer-ui
Note that the latest 2.18.2 update requires libraries and applications that depend on it to compile against version 33 (
Android 13
) or later of the Android APIs. However, this project is currently compiled against android-31 (Android 12
).Thus, until the
compileSdkVersion
of this project gets updated to33
, updating to2.18.2
isn't possible.More details
In addition to the dependency update commits, a few additional fix related commits were added to fix a few API updates on the
gooogle.exoplayer
library itself. see below:And in addition to the above fixes, a few more analysis related commits were added to resolve new API deprecations on the
gooogle.exoplayer
library itself. see below:Also, an
androidx.recyclerview
deprecation got suppressed, due to a transitive dependency update onRecyclerView
, and in order to unblock this PR, see below:Finally, a couple of additional commits were added to resolve a couple of remaining minor warnings related to
gooogle.exoplayer
and a fix commit for aCheckDuplicatesRunnable
UI test related failure:PS: @fluiddot I added you as the main reviewer, that is, in addition to the @wordpress-mobile/apps-infrastructure team itself, but not entirely randomly as this
ExoPlayer
, or (probably) any such update, requires an update onExoPlayer
on theGutenberg
side too. For more info seeGutenberg Crash Stack Trace
below, but also this e2ePublishSimplePost UI test that is failing on Firebase Test Lab.Let me know if you or any other member of the
Sparrow
team can pick-up this work to help unblock and then sign-off on that change for WPAndroid. In the hope to make your life a bit easier with this update, that is, on theGutenberg
side, please refer to the commits above as I tried to break it down per change, providing enough details per commit description, so as to make this update a bit more manageable for you. 🙇FYI: Last time we did something similar was via this Drop Jetifier PR where @mchowning helped us on the
ExoPlayer
update (see comment). We would probably need something similar for this dependency update too.Gutenberg Crash Stack Trace
To test:
1. Image Preview
Post
screen.Image
block and then an image into it.Media Preview
screen and the image should be previewed.Image Preview
is working as expected, that rotating the device works and finally that clicking back navigates you back to the post edit screen.2. Video Preview
Post
screen.Video
block but don't add a video into it just yet.Video
block, click onADD VIDEO
and thenChoose from device
to choose a video.Play
button on the center on any video. FYI: If you don't click on the center, this video will get selected for use, but it won't play.Media Preview
screen and the video should start playing.Video Preview
is working as expected, that rotating the device works and finally that clicking back navigates you back to the list of available videos to choose from screen.Warning (⚠️ ): Note the fact that the app will crash unless Gutenberg's
ExoPlayer
version get to be updated to 2.18.1 as well.Merge instructions
Mobile Gutenberg
team to make the equivalent change on the gutenberg and gutenberg-mobile.gutenbergMobileVersion
version with that version that has itsExoPlayer
update to 2.18.1 as well.[PR] Not Ready For Merge]
label.Ready for review
state.trunk
.Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
To test
section.What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.