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.
This commit is contained in:
Nick Alexander 2014-06-04 09:55:57 -07:00
parent 781e6755f9
commit 7e15acb062

View File

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