Commit f91e6349 by hoangtc Committed by Oliver Woodman

Migrate ExoPlayer Gradle build files.

- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
parent 4519c31c
......@@ -2,6 +2,12 @@
### 2.7.1 ###
* Gradle: Replaced 'compile' (deprecated) with 'implementation' and
'api'. This may lead to build breakage for applications upgrading from
previous version that rely on indirect dependencies of certain modules. In such
cases, application developers need to add the missing dependency to their
gradle file. You can read more about the new dependency configurations
[here](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations).
* HlsMediaSource: make HLS periods start at zero instead of the epoch.
Applications that rely on HLS timelines having a period starting at
the epoch will need to update their handling of HLS timelines. The program
......
......@@ -42,11 +42,13 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile project(modulePrefix + 'library-dash')
compile project(modulePrefix + 'library-hls')
compile project(modulePrefix + 'library-smoothstreaming')
compile project(modulePrefix + 'library-ui')
compile project(modulePrefix + 'extension-cast')
compile 'com.android.support:recyclerview-v7:' + supportLibraryVersion
implementation project(modulePrefix + 'library-core')
implementation project(modulePrefix + 'library-dash')
implementation project(modulePrefix + 'library-hls')
implementation project(modulePrefix + 'library-smoothstreaming')
implementation project(modulePrefix + 'library-ui')
implementation project(modulePrefix + 'extension-cast')
implementation 'com.android.support:support-v4:' + supportLibraryVersion
implementation 'com.android.support:appcompat-v7:' + supportLibraryVersion
implementation 'com.android.support:recyclerview-v7:' + supportLibraryVersion
}
......@@ -41,10 +41,11 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile project(modulePrefix + 'library-ui')
compile project(modulePrefix + 'library-dash')
compile project(modulePrefix + 'library-hls')
compile project(modulePrefix + 'library-smoothstreaming')
compile project(modulePrefix + 'extension-ima')
implementation project(modulePrefix + 'library-core')
implementation project(modulePrefix + 'library-ui')
implementation project(modulePrefix + 'library-dash')
implementation project(modulePrefix + 'library-hls')
implementation project(modulePrefix + 'library-smoothstreaming')
implementation project(modulePrefix + 'extension-ima')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
}
......@@ -55,15 +55,16 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile project(modulePrefix + 'library-dash')
compile project(modulePrefix + 'library-hls')
compile project(modulePrefix + 'library-smoothstreaming')
compile project(modulePrefix + 'library-ui')
withExtensionsCompile project(path: modulePrefix + 'extension-ffmpeg')
withExtensionsCompile project(path: modulePrefix + 'extension-flac')
withExtensionsCompile project(path: modulePrefix + 'extension-ima')
withExtensionsCompile project(path: modulePrefix + 'extension-opus')
withExtensionsCompile project(path: modulePrefix + 'extension-vp9')
withExtensionsCompile project(path: modulePrefix + 'extension-rtmp')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
implementation project(modulePrefix + 'library-core')
implementation project(modulePrefix + 'library-dash')
implementation project(modulePrefix + 'library-hls')
implementation project(modulePrefix + 'library-smoothstreaming')
implementation project(modulePrefix + 'library-ui')
withExtensionsImplementation project(path: modulePrefix + 'extension-ffmpeg')
withExtensionsImplementation project(path: modulePrefix + 'extension-flac')
withExtensionsImplementation project(path: modulePrefix + 'extension-ima')
withExtensionsImplementation project(path: modulePrefix + 'extension-opus')
withExtensionsImplementation project(path: modulePrefix + 'extension-vp9')
withExtensionsImplementation project(path: modulePrefix + 'extension-rtmp')
}
......@@ -12,7 +12,7 @@ Cast receiver app.
The easiest way to use the extension is to add it as a gradle dependency:
```gradle
compile 'com.google.android.exoplayer:extension-cast:rX.X.X'
implementation 'com.google.android.exoplayer:extension-cast:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
......
......@@ -26,19 +26,24 @@ android {
}
dependencies {
// This dependency is necessary to force the supportLibraryVersion of
// com.android.support:support-v4 to be used. Else an older version (25.2.0)
// is included via:
// These dependencies are necessary to force the supportLibraryVersion of
// com.android.support:support-v4, com.android.support:appcompat-v7 and
// com.android.support:mediarouter-v7 to be used. Else older versions are
// used, for example:
// com.google.android.gms:play-services-cast-framework:11.4.2
// |-- com.google.android.gms:play-services-basement:11.4.2
// |-- com.android.support:support-v4:25.2.0
compile 'com.android.support:support-v4:' + supportLibraryVersion
compile 'com.android.support:appcompat-v7:' + supportLibraryVersion
compile 'com.android.support:mediarouter-v7:' + supportLibraryVersion
compile 'com.google.android.gms:play-services-cast-framework:' + playServicesLibraryVersion
compile project(modulePrefix + 'library-core')
compile project(modulePrefix + 'library-ui')
testCompile project(modulePrefix + 'testutils-robolectric')
api 'com.android.support:support-v4:' + supportLibraryVersion
api 'com.android.support:appcompat-v7:' + supportLibraryVersion
api 'com.android.support:mediarouter-v7:' + supportLibraryVersion
api 'com.google.android.gms:play-services-cast-framework:' + playServicesLibraryVersion
implementation project(modulePrefix + 'library-core')
implementation project(modulePrefix + 'library-ui')
testImplementation project(modulePrefix + 'testutils')
testImplementation 'junit:junit:' + junitVersion
testImplementation 'org.mockito:mockito-core:' + mockitoVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
testImplementation project(modulePrefix + 'testutils-robolectric')
}
ext {
......
......@@ -35,12 +35,13 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile files('libs/cronet_api.jar')
compile files('libs/cronet_impl_common_java.jar')
compile files('libs/cronet_impl_native_java.jar')
testCompile project(modulePrefix + 'library')
testCompile project(modulePrefix + 'testutils-robolectric')
api files('libs/cronet_api.jar')
implementation files('libs/cronet_impl_common_java.jar')
implementation files('libs/cronet_impl_native_java.jar')
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
testImplementation project(modulePrefix + 'library')
testImplementation project(modulePrefix + 'testutils-robolectric')
}
ext {
......
......@@ -31,7 +31,7 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
implementation project(modulePrefix + 'library-core')
}
ext {
......
......@@ -31,8 +31,8 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
androidTestCompile project(modulePrefix + 'testutils')
implementation project(modulePrefix + 'library-core')
androidTestImplementation project(modulePrefix + 'testutils')
}
ext {
......
......@@ -12,7 +12,7 @@ of surround sound and ambisonic soundfields.
The easiest way to use the extension is to add it as a gradle dependency:
```gradle
compile 'com.google.android.exoplayer:extension-gvr:rX.X.X'
implementation 'com.google.android.exoplayer:extension-gvr:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
......
......@@ -25,8 +25,8 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'com.google.vr:sdk-audio:1.80.0'
implementation project(modulePrefix + 'library-core')
implementation 'com.google.vr:sdk-audio:1.80.0'
}
ext {
......
......@@ -12,7 +12,7 @@ alongside content.
The easiest way to use the extension is to add it as a gradle dependency:
```gradle
compile 'com.google.android.exoplayer:extension-ima:rX.X.X'
implementation 'com.google.android.exoplayer:extension-ima:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
......
......@@ -26,7 +26,6 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
// This dependency is necessary to force the supportLibraryVersion of
// com.android.support:support-v4 to be used. Else an older version (25.2.0)
// is included via:
......@@ -34,14 +33,10 @@ dependencies {
// |-- com.google.android.gms:play-services-ads-lite:11.4.2
// |-- com.google.android.gms:play-services-basement:11.4.2
// |-- com.android.support:support-v4:25.2.0
compile 'com.android.support:support-v4:' + supportLibraryVersion
compile 'com.google.ads.interactivemedia.v3:interactivemedia:3.7.4'
compile 'com.google.android.gms:play-services-ads:' + playServicesLibraryVersion
androidTestCompile project(modulePrefix + 'library')
androidTestCompile 'com.google.dexmaker:dexmaker:' + dexmakerVersion
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestCompile 'org.mockito:mockito-core:' + mockitoVersion
androidTestCompile 'com.android.support.test:runner:' + testSupportLibraryVersion
api 'com.android.support:support-v4:' + supportLibraryVersion
api 'com.google.ads.interactivemedia.v3:interactivemedia:3.7.4'
implementation project(modulePrefix + 'library-core')
implementation 'com.google.android.gms:play-services-ads:' + playServicesLibraryVersion
}
ext {
......
......@@ -11,7 +11,7 @@ ExoPlayer.
The easiest way to use the extension is to add it as a gradle dependency:
```gradle
compile 'com.google.android.exoplayer:extension-leanback:rX.X.X'
implementation 'com.google.android.exoplayer:extension-leanback:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
......
......@@ -25,8 +25,8 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile('com.android.support:leanback-v17:' + supportLibraryVersion)
implementation project(modulePrefix + 'library-core')
implementation('com.android.support:leanback-v17:' + supportLibraryVersion)
}
ext {
......
......@@ -12,7 +12,7 @@ behaviour can be extended to support other playback and custom actions.
The easiest way to use the extension is to add it as a gradle dependency:
```gradle
compile 'com.google.android.exoplayer:extension-mediasession:rX.X.X'
implementation 'com.google.android.exoplayer:extension-mediasession:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
......
......@@ -25,8 +25,8 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'com.android.support:support-media-compat:' + supportLibraryVersion
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-media-compat:' + supportLibraryVersion
}
ext {
......
......@@ -19,7 +19,7 @@ licensed separately.
The easiest way to use the extension is to add it as a gradle dependency:
```gradle
compile 'com.google.android.exoplayer:extension-okhttp:rX.X.X'
implementation 'com.google.android.exoplayer:extension-okhttp:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
......
......@@ -30,8 +30,9 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile('com.squareup.okhttp3:okhttp:3.9.0') {
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
implementation('com.squareup.okhttp3:okhttp:3.9.0') {
exclude group: 'org.json'
}
}
......
......@@ -31,7 +31,7 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
implementation project(modulePrefix + 'library-core')
}
ext {
......
......@@ -20,7 +20,7 @@ Android, which is licensed separately.
The easiest way to use the extension is to add it as a gradle dependency:
```gradle
compile 'com.google.android.exoplayer:extension-rtmp:rX.X.X'
implementation 'com.google.android.exoplayer:extension-rtmp:rX.X.X'
```
where `rX.X.X` is the version, which must match the version of the ExoPlayer
......
......@@ -25,8 +25,9 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'net.butterflytv.utils:rtmp-client:3.0.1'
implementation project(modulePrefix + 'library-core')
implementation 'net.butterflytv.utils:rtmp-client:3.0.1'
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
}
ext {
......
......@@ -31,8 +31,9 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
androidTestCompile 'com.google.truth:truth:' + truthVersion
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
androidTestImplementation 'com.google.truth:truth:' + truthVersion
}
ext {
......
......@@ -25,11 +25,11 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile project(modulePrefix + 'library-dash')
compile project(modulePrefix + 'library-hls')
compile project(modulePrefix + 'library-smoothstreaming')
compile project(modulePrefix + 'library-ui')
api project(modulePrefix + 'library-core')
api project(modulePrefix + 'library-dash')
api project(modulePrefix + 'library-hls')
api project(modulePrefix + 'library-smoothstreaming')
api project(modulePrefix + 'library-ui')
}
ext {
......
......@@ -45,15 +45,15 @@ android {
}
dependencies {
compile 'com.android.support:support-annotations:' + supportLibraryVersion
androidTestCompile 'com.google.dexmaker:dexmaker:' + dexmakerVersion
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestCompile 'com.google.truth:truth:' + truthVersion
androidTestCompile 'org.mockito:mockito-core:' + mockitoVersion
testCompile 'com.google.truth:truth:' + truthVersion
testCompile 'junit:junit:' + junitVersion
testCompile 'org.mockito:mockito-core:' + mockitoVersion
testCompile 'org.robolectric:robolectric:' + robolectricVersion
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
androidTestImplementation 'com.google.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion
androidTestImplementation 'com.google.truth:truth:' + truthVersion
androidTestImplementation 'org.mockito:mockito-core:' + mockitoVersion
testImplementation 'com.google.truth:truth:' + truthVersion
testImplementation 'junit:junit:' + junitVersion
testImplementation 'org.mockito:mockito-core:' + mockitoVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
}
ext {
......
......@@ -33,9 +33,9 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'com.android.support:support-annotations:' + supportLibraryVersion
testCompile project(modulePrefix + 'testutils-robolectric')
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
testImplementation project(modulePrefix + 'testutils-robolectric')
}
ext {
......
......@@ -33,9 +33,9 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'com.android.support:support-annotations:' + supportLibraryVersion
testCompile project(modulePrefix + 'testutils-robolectric')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
implementation project(modulePrefix + 'library-core')
testImplementation project(modulePrefix + 'testutils-robolectric')
}
ext {
......
......@@ -33,9 +33,9 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'com.android.support:support-annotations:' + supportLibraryVersion
testCompile project(modulePrefix + 'testutils-robolectric')
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
testImplementation project(modulePrefix + 'testutils-robolectric')
}
ext {
......
......@@ -33,8 +33,8 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'com.android.support:support-annotations:' + supportLibraryVersion
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
}
ext {
......
......@@ -25,8 +25,8 @@ android {
}
dependencies {
androidTestCompile project(modulePrefix + 'library-core')
androidTestCompile project(modulePrefix + 'library-dash')
androidTestCompile project(modulePrefix + 'library-hls')
androidTestCompile project(modulePrefix + 'testutils')
androidTestImplementation project(modulePrefix + 'library-core')
androidTestImplementation project(modulePrefix + 'library-dash')
androidTestImplementation project(modulePrefix + 'library-hls')
androidTestImplementation project(modulePrefix + 'testutils')
}
......@@ -32,8 +32,9 @@ android {
}
dependencies {
compile project(modulePrefix + 'library-core')
compile 'org.mockito:mockito-core:' + mockitoVersion
compile 'com.google.truth:truth:' + truthVersion
testCompile project(modulePrefix + 'testutils-robolectric')
api 'org.mockito:mockito-core:' + mockitoVersion
api 'com.google.truth:truth:' + truthVersion
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
implementation project(modulePrefix + 'library-core')
testImplementation project(modulePrefix + 'testutils-robolectric')
}
......@@ -32,6 +32,8 @@ android {
}
dependencies {
compile project(modulePrefix + 'testutils')
compile 'org.robolectric:robolectric:' + robolectricVersion
api 'org.robolectric:robolectric:' + robolectricVersion
api project(modulePrefix + 'testutils')
implementation project(modulePrefix + 'library-core')
implementation 'com.android.support:support-annotations:' + supportLibraryVersion
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment