From a28559b4bd38fb0242e98b3ef73fd6bad0432772 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Mon, 24 Feb 2014 18:14:04 -0800 Subject: [PATCH] Bug 975152 - Part 1: Include CrashReporter resources in Android Eclipse projects. r=bnicholson The set of resources of all the Android library projects are processed at once. That means that the bi-directional dependency between the main project resources and the crash reporter resources causes no build time problems. Therefore, this patch moves all the main project resources into a library project (FennecResources) and adds an optional additional library project (FennecCrashReporterResources). --- mobile/android/base/moz.build | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index b9343f21ee5..1b8296169aa 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -495,7 +495,6 @@ branding.res = TOPSRCDIR + '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res' main = add_android_eclipse_project('Fennec', OBJDIR + '/AndroidManifest.xml') main.package_name = 'org.mozilla.gecko' -main.res = SRCDIR + '/resources' main.recursive_make_targets += ['.aapt.deps'] # Captures dependencies on Android manifest and all resources. main.recursive_make_targets += [OBJDIR + '/generated/' + f for f in mgjar.generated_sources] @@ -506,6 +505,7 @@ main.referenced_projects += [generated.name, branding.name] main.extra_jars += [CONFIG['ANDROID_COMPAT_LIB']] main.assets = TOPOBJDIR + '/dist/fennec/assets' main.libs = TOPOBJDIR + '/dist/fennec/lib' +main.res = None cpe = main.add_classpathentry('src', SRCDIR, dstdir='src/org/mozilla/gecko', @@ -518,3 +518,22 @@ main.add_classpathentry('generated', OBJDIR + '/generated', main.add_classpathentry('thirdparty', TOPSRCDIR + '/mobile/android/thirdparty', dstdir='thirdparty', ignore_warnings=True) + +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.referenced_projects += [generated.name, branding.name] + +main.included_projects += ['../' + resources.name] +main.referenced_projects += [resources.name] + +if CONFIG['MOZ_CRASHREPORTER']: + crashreporter = add_android_eclipse_library_project('FennecCrashReporterResources') + crashreporter.package_name = 'org.mozilla.fennec.crashreporterresources' + crashreporter.res = SRCDIR + '/crashreporter/res' + crashreporter.included_projects += ['../' + resources.name] + crashreporter.referenced_projects += [resources.name] + + main.included_projects += ['../' + crashreporter.name] + main.referenced_projects += [crashreporter.name]