Bug 1219846 - Part 1: Add 'app' Gradle project in srcdir. r=me
authorNick Alexander <nalexander@mozilla.com>
Wed, 28 Oct 2015 16:01:23 -0700
changeset 294027 8b66ed0e3cf1210d5898d7647c9c378d5c13f23b
parent 294026 17d6649e04327407d58b6a7f16a1188263f1e251
child 294028 49063069ff59b4602ef3c6e4b05fc6551520eef7
push idunknown
push userunknown
push dateunknown
reviewersme
bugs1219846
milestone45.0a1
Bug 1219846 - Part 1: Add 'app' Gradle project in srcdir. r=me DONTBUILD NPOTB
mobile/android/app/build.gradle
settings.gradle
copy from mobile/android/gradle/app/build.gradle
copy to mobile/android/app/build.gradle
--- a/mobile/android/gradle/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -1,8 +1,10 @@
+buildDir "${topobjdir}/gradle/build/mobile/android/app"
+
 apply plugin: 'com.android.application'
 
 android {
     compileSdkVersion 23
     buildToolsVersion "23.0.1"
 
     defaultConfig {
         targetSdkVersion 22
@@ -31,20 +33,26 @@ android {
     sourceSets {
         main {
             manifest.srcFile "${topobjdir}/mobile/android/base/AndroidManifest.xml"
         }
 
         androidTest {
             manifest.srcFile "${topobjdir}/build/mobile/robocop/AndroidManifest.xml"
             java {
-                srcDir "src/robocop"
-                srcDir "src/background"
-                srcDir "src/browser"
-                srcDir "src/javaaddons"
+                srcDir "${topsrcdir}/mobile/android/tests/browser/robocop/src"
+                srcDir "${topsrcdir}/mobile/android/tests/background/junit3/src"
+                srcDir "${topsrcdir}/mobile/android/tests/browser/junit3/src"
+                srcDir "${topsrcdir}/mobile/android/tests/javaddons/src"
+            }
+            res {
+                srcDir "${topsrcdir}/build/mobile/robocop/res"
+            }
+            assets {
+                srcDir "${topsrcdir}/mobile/android/tests/browser/robocop/assets"
             }
         }
     }
 }
 
 dependencies {
     compile project(':base')
     compile project(':omnijar')
--- a/settings.gradle
+++ b/settings.gradle
@@ -22,17 +22,17 @@ if (json.substs.MOZ_BUILD_APP != 'mobile
 }
 
 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(':app').projectDir = new File("${json.topsrcdir}/mobile/android/app")
 project(':base').projectDir = new File(gradleRoot, 'base')
 project(':omnijar').projectDir = new File(gradleRoot, 'omnijar')
 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