From 3c49044fb43060b28afe3da3d89544cabd28750a Mon Sep 17 00:00:00 2001 From: olly Date: Tue, 18 Apr 2017 06:12:08 -0700 Subject: [PATCH] Updates for ExoPlayer modularization - Update relevant documentation - Use individual modules for the demo app. Given it's preferable to use them over the full library, and that many people probably use the demo app as a starting point, we should set the right example even though we currently need to include all of them. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=153454898 --- README.md | 34 ++++++++++++++++++++++++++++------ demo/build.gradle | 6 +++++- testutils/build.gradle | 2 +- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f74cda84ee6..3de86d21a33 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,39 @@ repositories { } ``` -Next, include the following in your module's `build.gradle` file: +Next add a gradle compile dependency to the `build.gradle` file of your app +module. The following will add a dependency to the full ExoPlayer library: ```gradle -compile 'com.google.android.exoplayer:exoplayer:rX.X.X' +compile 'com.google.android.exoplayer:exoplayer:r2.X.X' ``` -where `rX.X.X` is the your preferred version. For the latest version, see the -project's [Releases][]. For more details, see the project on [Bintray][]. +where `r2.X.X` is your preferred version. Alternatively, you can depend on only +the library modules that you actually need. For example the following will add +dependencies on the Core, DASH and UI library modules, as might be required for +an app that plays DASH content: -[Releases]: https://github.com/google/ExoPlayer/releases -[Bintray]: https://bintray.com/google/exoplayer/exoplayer/view +```gradle +compile 'com.google.android.exoplayer:exoplayer-core:r2.X.X' +compile 'com.google.android.exoplayer:exoplayer-dash:r2.X.X' +compile 'com.google.android.exoplayer:exoplayer-ui:r2.X.X' +``` + +The available modules are listed below. Adding a dependency to the full +ExoPlayer library is equivalent to adding dependencies on all of the modules +individually. + +* `exoplayer-core`: Core functionality (required). +* `exoplayer-dash`: Support for DASH content. +* `exoplayer-hls`: Support for HLS content. +* `exoplayer-smoothstreaming`: Support for SmoothStreaming content. +* `exoplayer-ui`: UI components and resources for use with ExoPlayer. + +For more details, see the project on [Bintray][]. For information about the +latest versions, see the [Release notes][]. + +[Bintray]: https://bintray.com/google/exoplayer +[Release notes]: https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md ## Developing ExoPlayer ## diff --git a/demo/build.gradle b/demo/build.gradle index 01946c85043..be5e52a25c4 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -45,7 +45,11 @@ android { } dependencies { - compile project(':library') + compile project(':library-core') + compile project(':library-dash') + compile project(':library-hls') + compile project(':library-smoothstreaming') + compile project(':library-ui') withExtensionsCompile project(path: ':extension-ffmpeg') withExtensionsCompile project(path: ':extension-flac') withExtensionsCompile project(path: ':extension-opus') diff --git a/testutils/build.gradle b/testutils/build.gradle index f1d557bbf5e..5fea76f9c35 100644 --- a/testutils/build.gradle +++ b/testutils/build.gradle @@ -24,6 +24,6 @@ android { } dependencies { - compile project(':library') + compile project(':library-core') compile 'org.mockito:mockito-core:' + mockitoVersion }