-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Cannot use relative path for exoplayerRoot #9403
Comments
At first glance this looks similar to #8927 which I thought I fixed in 73f28d4 (and was cherry-picked into 2.14.1). |
Something's odd indeed. The same setup in |
Thanks for the report, I reproduced the problem as follows:
Yep, I agree this is the root of the problem (and I think things were broken by my attempt to fix this that I referenced above). Since the full path to that file is I changed that line to (no arg and empty string aren't allowed):
And it seemed to fix the problem. I'll send that change for review - please also give it a try locally and let me know if it works for you (or if it's obviously not sensible - it seems a bit easy!). |
For the record, I also have the impression that the unexpected behavior may come from the fact that the gradle plugin is applied during execution of |
I think this has been broken since 617267b (which was trying to fix the same problem). This change initializes `rootDir` to always be the current project (i.e. ExoPlayer) directory. From the [Gradle docs](https://docs.gradle.org/current/userguide/working_with_files.html#sec:single_file_paths): > What happens in the case of multi-project builds? The file() method > will always turn relative paths into paths that are relative to the > current project directory, which may be a child project. We can also then remove exoplayerRoot completely and simplify the local dependency instructions. * #minor-release * #exofixit * Issue: #9403 PiperOrigin-RevId: 395478121
I think this has been broken since 617267b (which was trying to fix the same problem). This change initializes `rootDir` to always be the current project (i.e. ExoPlayer) directory. From the [Gradle docs](https://docs.gradle.org/current/userguide/working_with_files.html#sec:single_file_paths): > What happens in the case of multi-project builds? The file() method > will always turn relative paths into paths that are relative to the > current project directory, which may be a child project. We can also then remove exoplayerRoot completely and simplify the local dependency instructions. * #minor-release * #exofixit * Issue: #9403 PiperOrigin-RevId: 395478121
I'm using ExoPlayer 2.15.0 as local dependency, with gradle 7.1.1. My
settings.gradle
contains the following:This leads to build error due to missing dependencies. It turns out that the
projectDir
of the ExoPlayer modules do not have the expected path. E.g., I added this debug line insettings.gradle
:which prints
Note the duplicate parts in the path. AFAICS, this comes from this line in
core_settings.gradle
:If I'm reading gradle docs right, the
file
method resolves the relative path against the current project, not the top-level one. As the current project is already located atexoplayerRoot
, you end up with twice that part in the generated path.The text was updated successfully, but these errors were encountered: