Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Backward compatibility issue since version 2.5.x #3680
My app has dependency of my own library module published in maven repo, which includes Exoplayer r2.4.3 dependency.
So It means there is backward compatibility issue since 2.5.x.
And I need to add another dependency which has Exoplayer r2.0.3 dependency.(ex:Facebook Audience Network SDK)
Is there any way to know which version is the latest version that can assure backward compatibility??
We don't have a great answer for this, unfortunately, since we do not currently guarantee API stability even between minor versions.
In most cases ExoPlayer is intended to be used by apps directly, in which case this isn't a problem because the app developer can simply pick their preferred version. The problem arises when libraries depend on ExoPlayer. This forces an app using such a library to use the same version of ExoPlayer as the library uses. If an app wants to use two libraries, both of which depend on different versions of ExoPlayer, then that becomes tricky to resolve.
We recommend that library developers who wish to use ExoPlayer do so by building it directly into their library with an obfuscated package name, rather than having a dependency. This allows both the library and app to keep their own separate versions at the cost of increased binary size, but since ExoPlayer is small (particularly after proguarding) the increase isn't particularly large. The Google VR SDK is an example of a library that internalizes ExoPlayer in this way. The Facebook Audience Network SDK should probably do the same thing, so I'd suggest you raise an issue with the developers at Facebook requesting that they do this.
Whether we revisit this in the future depends largely on how many libraries are using ExoPlayer, since this is the problematic case. We're aware that the solution isn't ideal, and so if we start seeing widespread usage by libraries we'll probably reconsider.