ExoPlayer migration script does not work with variable and shows malformed message
@marcbaechinger is already working on this.
Since Jun 19, 2023.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Media3 Version
ExoPlayer 2.18.7
Devices that reproduce the issue
PC, Windows v11, Windows Linux Subsystem v2 running Ubuntu 20.04.4 LTS
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
- Create an Android library. In its module-level
build.gradledefine a variabledef exoPlayerVersion = "2.18.7"and add dependency from ExoPlayer:def exoPlayerVersion = "2.18.7" dependencies { api "com.google.android.exoplayer:exoplayer-core:${exoPlayerVersion}" api "com.google.android.exoplayer:exoplayer-ui:${exoPlayerVersion}" } - Download migration script for v2.18.7 and follow instructions in Migration Guide
- As guide instructs, run the script with
-loption:./media3-migration.sh -l . # script is run from library module folder
Expected result
The outcome of -l command: the set of files that are selected for migration.
Actual result
[...omitted...]$ ./media3-migration.sh -l .
=============================================
Validation errors (use -f to force execution)
---------------------------------------------
' found in version does not match '2.18.7'. Update to '2.18.7' or use the migration script matching your current version. Current version '${exoPlayerVersion}
./my-module-name/build.gradle
What we can see here is that:
-
use of variable in dependency does not seem to be supported. If that's the case, can we file a PR to documentation mentioning that?
-
the error message seems malformed. It starts with a single quote, probably there is some part before missing. Also the ending seems corrupted (
Current version '${exoPlayerVersion}). But a quick check on current script did not help to understand what's going on.
Media
No media needed
Bug Report
- You will email the zip file produced by
adb bugreportto dev.exoplayer@gmail.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.