Bug 1123416 - Part 5: Make a 'thirdparty' Gradle project in the source directory. r=sebastian
authorNick Alexander <nalexander@mozilla.com>
Tue, 20 Oct 2015 15:32:50 -0700
changeset 268970 479539a438420df4feddae381c74c61be108bf5a
parent 268969 ef1e7dec5bad489be4556a10344626adefffc38d
child 268971 9b249dc7978b6f96de67ea55b9696fbad3c26c4e
push id66974
push usercbook@mozilla.com
push dateThu, 22 Oct 2015 09:55:14 +0000
treeherdermozilla-inbound@23796582512a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1123416
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1123416 - Part 5: Make a 'thirdparty' Gradle project in the source directory. r=sebastian I don't want to cut consumers of $OBJDIR/mobile/android/gradle over yet, so this doesn't remove the existing 'thirdparty' project.
mobile/android/thirdparty/AndroidManifest.xml
mobile/android/thirdparty/build.gradle
settings.gradle
copy from mobile/android/gradle/thirdparty/AndroidManifest.xml
copy to mobile/android/thirdparty/AndroidManifest.xml
--- a/mobile/android/gradle/thirdparty/AndroidManifest.xml
+++ b/mobile/android/thirdparty/AndroidManifest.xml
@@ -1,4 +1,4 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="org.mozilla.gecko.thirdparty">
+    package="org.mozilla.gecko.thirdparty_unused">
 
 </manifest>
copy from mobile/android/gradle/thirdparty/build.gradle
copy to mobile/android/thirdparty/build.gradle
--- a/mobile/android/gradle/thirdparty/build.gradle
+++ b/mobile/android/thirdparty/build.gradle
@@ -1,8 +1,10 @@
+buildDir "${topobjdir}/gradle/build/mobile/android/thirdparty"
+
 apply plugin: 'com.android.library'
 
 android {
     compileSdkVersion 23
     buildToolsVersion "23.0.1"
 
     defaultConfig {
         targetSdkVersion 22
@@ -15,20 +17,33 @@ android {
     }
 
     lintOptions {
         abortOnError false
     }
 
     sourceSets {
         main {
+            manifest.srcFile 'AndroidManifest.xml'
             java {
+                srcDir '.'
                 if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
                     exclude 'com/adjust/**'
                 }
             }
         }
     }
 }
 
 dependencies {
     compile 'com.android.support:support-v4:23.0.1'
 }
+
+apply plugin: 'idea'
+
+idea {
+    module {
+        // This is cosmetic.  See the excludes in the root project.
+        if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
+            excludeDirs += file('com/adjust/sdk')
+        }
+    }
+}
--- a/settings.gradle
+++ b/settings.gradle
@@ -25,22 +25,17 @@ include ':app'
 include ':base'
 include ':omnijar'
 include ':thirdparty'
 
 def gradleRoot = new File("${json.topobjdir}/mobile/android/gradle")
 project(':app').projectDir = new File(gradleRoot, 'app')
 project(':base').projectDir = new File(gradleRoot, 'base')
 project(':omnijar').projectDir = new File(gradleRoot, 'omnijar')
-project(':thirdparty').projectDir = new File(gradleRoot, 'thirdparty')
-
-if (json.substs.MOZ_INSTALL_TRACKING) {
-    include ':thirdparty_adjust_sdk'
-    project(':thirdparty_adjust_sdk').projectDir = new File(gradleRoot, 'thirdparty_adjust_sdk')
-}
+project(':thirdparty').projectDir = new File("${json.topsrcdir}/mobile/android/thirdparty")
 
 // The Gradle instance is shared between settings.gradle and all the
 // other build.gradle files (see
 // http://forums.gradle.org/gradle/topics/define_extension_properties_from_settings_xml).
 // We use this ext property to pass the per-object-directory mozconfig
 // between scripts.  This lets us execute set-up code before we gradle
 // tries to configure the project even once, and as a side benefit
 // saves invoking |mach environment| multiple times.