Bug 1341990 - Post: Update build system to reference ExoPlayer in GeckoView thirdparty source directory. r=maliu draft
authorNick Alexander <nalexander@mozilla.com>
Fri, 19 May 2017 10:49:44 -0700
changeset 581355 ccad0ad99825856e71fe7c6840d37b5b5c28cf3c
parent 581354 00155cfdec8084c5fd8f07f955b27f21c559fde8
child 629551 fa40a6f66b1d3b3d9751b6994d1ff94f17ec3406
push id59840
push usernalexander@mozilla.com
push dateFri, 19 May 2017 17:51:21 +0000
reviewersmaliu
bugs1341990
milestone55.0a1
Bug 1341990 - Post: Update build system to reference ExoPlayer in GeckoView thirdparty source directory. r=maliu This should be folded into the previous part; I kept them separate so the huge rename wouldn't swamp the change view in MozReview. This should be folded into the initial patches in Bug 1341990 before landing to avoid churn in version control. MozReview-Commit-ID: Aa7ivoABWfd
mobile/android/base/moz.build
mobile/android/geckoview/build.gradle
mobile/android/thirdparty/build.gradle
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -1279,17 +1279,17 @@ if CONFIG['MOZ_ANDROID_HLS_SUPPORT']:
     exoplayer2_jar.javac_flags += [
         '-Xlint:all,-serial,-rawtypes,-unchecked,-fallthrough',
     ]
 
     exoplayer2_jar.extra_jars += [
         CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'],
     ]
 
-    exoplayer2_jar.sources += [thirdparty_source_dir + 'com/google/android/exoplayer2/' + x for x in [
+    exoplayer2_jar.sources += [geckoview_thirdparty_source_dir + 'java/com/google/android/exoplayer2/' + x for x in [
         'audio/Ac3Util.java',
         'audio/AudioCapabilities.java',
         'audio/AudioCapabilitiesReceiver.java',
         'audio/AudioDecoderException.java',
         'audio/AudioProcessor.java',
         'audio/AudioRendererEventListener.java',
         'audio/AudioTrack.java',
         'audio/ChannelMappingAudioProcessor.java',
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -68,16 +68,20 @@ android {
         abortOnError false
     }
 
     sourceSets {
         main {
             java {
                 srcDir "${topsrcdir}/mobile/android/geckoview/src/thirdparty/java"
 
+                if (!mozconfig.substs.MOZ_ANDROID_HLS_SUPPORT) {
+                    exclude 'com/google/android/exoplayer2/**'
+                }
+
                 // TODO: support WebRTC.
                 // if (mozconfig.substs.MOZ_WEBRTC) {
                 //     srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/audio_device/android/java/src"
                 //     srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src"
                 //     srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_render/android/java/src"
                 // }
 
                 // TODO: don't use AppConstants.
--- a/mobile/android/thirdparty/build.gradle
+++ b/mobile/android/thirdparty/build.gradle
@@ -25,20 +25,16 @@ android {
             manifest.srcFile 'AndroidManifest.xml'
             java {
                 srcDir '.'
 
                 if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
                     exclude 'com/adjust/**'
                 }
 
-                if (!mozconfig.substs.MOZ_ANDROID_HLS_SUPPORT) {
-                    exclude 'com/google/android/exoplayer2/**'
-                }
-
                 // Exclude LeakCanary: It will be added again via a gradle dependency. This version
                 // here is only the no-op library for mach-based builds.
                 exclude 'com/squareup/leakcanary/**'
             }
         }
     }
 }