androidx / androidx/media

ExoPlayer migration script does not work with variable and shows malformed message

Open
#469 5 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Jun 19, 2023.

bug needs triage
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
  1. Create an Android library. In its module-level build.gradle define a variable def 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}"
    }
    
  2. Download migration script for v2.18.7 and follow instructions in Migration Guide
  3. As guide instructs, run the script with -l option:
    ./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:

  1. 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?

  2. 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 bugreport to dev.exoplayer@gmail.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.