I think this has been broken since 617267bfcf (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
Colocate lines that refer to the same module, to reduce probability of
accidentally removing one line and not the other (which has happened
more than once :)).
PiperOrigin-RevId: 374847082
Gradle warns against passing a relative path to `new File(String)`:
https://docs.gradle.org/current/userguide/working_with_files.html#sec:single_file_paths
This change fixes all usages of `exoplayerRoot` to pass it to Gradle's
`Project.file()` first, which returns an absolute `File`.
To reproduce the problem in Issue: #8927:
1. Checkout ExoPlayer git project, to e.g. `~/ExoPlayer/exoplayer-git`
2. Create a new Android Studio project in e.g. `~/AndroidStudioProjects/exoplayer-test`
3. Edit the new project's `settings.gradle` file as described in
https://github.com/google/ExoPlayer/blob/release-v2/README.md
using a relative path for `exoplayerRoot`:
```
gradle.ext.exoplayerRoot = '../../ExoPlayer/exoplayer-git'
```
4. In a shell:
```bash
$ cd ~/AndroidStudioProjects/exoplayer-test/app
$ ../gradlew build
```
(Step 4 is important, it seems running `./gradlew` from the project root
doesn't trigger the relative path problem)
This change fixes the problem, and also works with `exoplayerRoot` as a
`File` or `Path` object. `String`, `File` and `Path` all work with relative or
absolute paths:
```
gradle.ext.exoplayerRoot = '/home/ibaker/ExoPlayer/exoplayer-git'
gradle.ext.exoplayerRoot = '../../ExoPlayer/exoplayer-git'
gradle.ext.exoplayerRoot = new File('/home/ibaker/ExoPlayer/exoplayer-git')
gradle.ext.exoplayerRoot = new File('../../ExoPlayer/exoplayer-git')
gradle.ext.exoplayerRoot = Paths.get('/home/ibaker/ExoPlayer/exoplayer-git')
gradle.ext.exoplayerRoot = Paths.get('../../ExoPlayer/exoplayer-git')
```
Note: The Path versions above require importing `java.nio.file.Paths`
and changing the `apply from:` line in the project's settings.gradle
file to something like:
```
apply from: file(gradle.ext.exoplayerRoot.resolve('core_settings.gradle'))
```
It's assumed that a project wanting to pass a `Path` will make these
changes.
Issue: #8927
PiperOrigin-RevId: 374421627
Including ExoPlayer via relative paths currently breaks the import
logic of the common library settings file because it's referenced
from different directories. Fix this by resolving the setting path
to its canonical name.
Issue: #7554
PiperOrigin-RevId: 319043560
This removes a lot of duplication from the module configuration,
avoids divergence, and makes sure that only the important differences
to the default are visible in each module file.
PiperOrigin-RevId: 318024823
We no longer need two modules as AndroidX-Test takes care of the system
abstraction and we no longer have Robolectric Handler/Looper workarounds.
PiperOrigin-RevId: 262363201
*** Reason for rollback ***
Broke everything
*** Original change description ***
Clean up message naming in EPII
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184061352
This CL adds the fundamental pieces for ExoPlayer/Cast integration and includes a
demo app to showcase this functionality. However, media queues should be supported
in the first release of this extension.
Issue:#2283
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165576892
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:
gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
You can optionally add a prefix onto ExoPlayer's module names
by adding:
gradle.ext.exoplayerModulePrefix = 'prefix'
Issue: #2851
Issue: #2974
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967