From 07cb79cc657b77ab915b77a64630692e1abbc13c Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Wed, 4 Jun 2014 09:55:57 -0700 Subject: [PATCH] Bug 1019218 - Update org.mozilla.gecko.R when resources are changed in Eclipse. r=rnewman DONTBUILD NPOTB This is particularly important when changing strings.xml.in or changing the set of Android identifiers; without this, the Fennec code referencing R is not updated. This can either lead to compilation failures, or missing resources at run-time, leading to strange crashes on start-up. --- mobile/android/base/moz.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index 8f691c0fc2a..0eed125b682 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -546,13 +546,17 @@ if '-march=armv7' in CONFIG['OS_CFLAGS']: else: DEFINES['MOZ_MIN_CPU_VERSION'] = 5 +generated_recursive_make_targets = ['.aapt.deps', '.locales.deps'] # Captures dependencies on Android manifest and all resources. + generated = add_android_eclipse_library_project('FennecResourcesGenerated') generated.package_name = 'org.mozilla.fennec.resources.generated' generated.res = OBJDIR + '/res' +generated.recursive_make_targets += generated_recursive_make_targets branding = add_android_eclipse_library_project('FennecResourcesBranding') branding.package_name = 'org.mozilla.fennec.resources.branding' branding.res = TOPSRCDIR + '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res' +branding.recursive_make_targets += generated_recursive_make_targets main = add_android_eclipse_project('Fennec', OBJDIR + '/AndroidManifest.xml') main.package_name = 'org.mozilla.gecko' @@ -565,7 +569,7 @@ main.filtered_resources += [ '1.0-projectRelativePath-matches-false-false-*org/mozilla/gecko/tests/**', ] -main.recursive_make_targets += ['.aapt.deps'] # Captures dependencies on Android manifest and all resources. +main.recursive_make_targets += generated_recursive_make_targets main.recursive_make_targets += [OBJDIR + '/generated/' + f for f in mgjar.generated_sources] main.recursive_make_targets += [OBJDIR + '/generated/' + f for f in gbjar.generated_sources] @@ -591,6 +595,7 @@ resources = add_android_eclipse_library_project('FennecResources') resources.package_name = 'org.mozilla.fennec.resources' resources.res = SRCDIR + '/resources' resources.included_projects += ['../' + generated.name, '../' + branding.name] +resources.recursive_make_targets += generated_recursive_make_targets main.included_projects += ['../' + resources.name] main.referenced_projects += [resources.name]