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
--- 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']