Bug 1415298 - Pre: Move assets/ into standard Gradle location. r=maliu,nechen draft
authorNick Alexander <nalexander@mozilla.com>
Tue, 07 Nov 2017 12:41:21 -0800
changeset 695258 cfbe845516b0ede33e8c095468589eef30bb62bb
parent 695257 c10cf7082a9b84839e7c3fdda80bd468e091739a
child 695259 2e3359a372289593599725e1fa072e365f7c53cc
push id88368
push usernalexander@mozilla.com
push dateWed, 08 Nov 2017 22:39:54 +0000
reviewersmaliu, nechen
bugs1415298
milestone58.0a1
Bug 1415298 - Pre: Move assets/ into standard Gradle location. r=maliu,nechen This is part of a larger project to standardize our source locations. MozReview-Commit-ID: Gbh9qSW7RJY
mobile/android/app/assets/example_asset.txt
mobile/android/app/assets/parental_controls_theme.png
mobile/android/app/assets/publicsuffixlist
mobile/android/app/build.gradle
mobile/android/app/moz.build
mobile/android/app/src/main/assets/example_asset.txt
mobile/android/app/src/main/assets/parental_controls_theme.png
mobile/android/app/src/main/assets/publicsuffixlist
mobile/android/base/moz.build
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -168,17 +168,16 @@ android {
                     srcDir "${topsrcdir}/mobile/android/base/crashreporter/res"
                 }
             }
 
             assets {
                 if (mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY) {
                     srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
                 }
-                srcDir "${topsrcdir}/mobile/android/app/assets"
             }
         }
 
         // Every configuration needs the stub manifest at
         // src/main/AndroidManifest.xml and the generated manifest.  We can't
         // use the main sourceSet without losing the stub, so we cover all the
         // configurations by enumerating the buildTypes here.
         debug {
--- a/mobile/android/app/moz.build
+++ b/mobile/android/app/moz.build
@@ -14,22 +14,22 @@ with Files('lint*'):
     BUG_COMPONENT = ('Firefox for Android', 'General')
 
 with Files('mobile*'):
     BUG_COMPONENT = ('Firefox for Android', 'General')
 
 with Files('ua-update.json.in'):
     BUG_COMPONENT = ('Firefox for Android', 'General')
 
-with Files('assets/**'):
-    BUG_COMPONENT = ('Firefox for Android', 'General')
-
 with Files('omnijar/**'):
     BUG_COMPONENT = ('Firefox for Android', 'Build Config & IDE Support')
 
+with Files('src/main/**'):
+    BUG_COMPONENT = ('Firefox for Android', 'General')
+
 with Files('src/androidTest/**'):
     BUG_COMPONENT = ('Firefox for Android', 'Testing')
 
 with Files('src/test/**'):
     BUG_COMPONENT = ('Firefox for Android', 'Build Config & IDE Support')
 
 for var in ('APP_NAME', 'APP_VERSION'):
     DEFINES[var] = CONFIG['MOZ_%s' % var]
rename from mobile/android/app/assets/example_asset.txt
rename to mobile/android/app/src/main/assets/example_asset.txt
rename from mobile/android/app/assets/parental_controls_theme.png
rename to mobile/android/app/src/main/assets/parental_controls_theme.png
rename from mobile/android/app/assets/publicsuffixlist
rename to mobile/android/app/src/main/assets/publicsuffixlist
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -1403,17 +1403,17 @@ ANDROID_RES_DIRS += [
 
 ANDROID_GENERATED_RESFILES += [
     'res/raw/browsersearch.json',
     'res/raw/suggestedsites.json',
     'res/values/strings.xml',
 ]
 
 ANDROID_ASSETS_DIRS += [
-    '/mobile/android/app/assets',
+    '/mobile/android/app/src/main/assets',
 ]
 
 if CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY']:
     ANDROID_ASSETS_DIRS += [
         '%' + CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY'] + '/assets',
     ]
 
 DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']