Bug 1195388 - Pre: Remove Eclipse definitions. r=gps
authorNick Alexander <nalexander@mozilla.com>
Mon, 10 Aug 2015 16:33:27 -0700
changeset 258412 6480a988c996db6de0ed9b1eb648fc54829ae947
parent 258411 3e09f5f7e0667c78ba7e5ce670ab49d6caf351cb
child 258413 ddbe8b7acc4d3b48f286b1b144bf761e60e19559
push id14738
push usernalexander@mozilla.com
push dateWed, 19 Aug 2015 21:49:56 +0000
treeherderfx-team@b7db8a48e0c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1195388, 1196367
milestone43.0a1
Bug 1195388 - Pre: Remove Eclipse definitions. r=gps This is just cruft; I didn't want to think about it when working on the other parts. Bug 1196367 tracks removing the AndroidEclipse build backend that consumed these definitions entirely.
mobile/android/base/moz.build
mobile/android/stumbler/moz.build
mobile/android/tests/background/junit3/moz.build
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -818,164 +818,9 @@ if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']
         'constants.jar',
         'gecko-R.jar',
         'gecko-browser.jar',
         'gecko-mozglue.jar',
         'gecko-thirdparty.jar',
         'gecko-util.jar'
     ]
 
-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.gecko.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.gecko.branding'
-branding.res = TOPSRCDIR + '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res'
-branding.recursive_make_targets += generated_recursive_make_targets
-
-static = add_android_eclipse_library_project('FennecResourcesStatic')
-# 'org.mozilla.gecko.static' is not a valid Java package name, so we use a different one.
-static.package_name = 'org.mozilla.gecko.resources'
-static.res = SRCDIR + '/resources'
-static.recursive_make_targets += generated_recursive_make_targets
-static.included_projects += ['../' + generated.name, '../' + branding.name]
-static.referenced_projects += ['../' + generated.name, '../' + branding.name]
-
-main = add_android_eclipse_project('Fennec', OBJDIR + '/AndroidManifest.xml')
-main.package_name = 'org.mozilla.gecko'
-
-# These values were extracted from an existing Eclipse project.  Use
-# Project > Resource > Resource Filters and inspect the resulting
-# .project file to modify this list.
-main.filtered_resources += [
-    '1.0-projectRelativePath-matches-false-false-*org/mozilla/gecko/resources/**',
-]
-
-main.recursive_make_targets += generated_recursive_make_targets
-main.recursive_make_targets += ['generated/' + f for f in mgjar.generated_sources]
-main.recursive_make_targets += ['generated/' + f for f in gbjar.generated_sources]
-
-main.extra_jars += [CONFIG['ANDROID_COMPAT_LIB']]
-main.assets = TOPOBJDIR + '/dist/' + CONFIG['MOZ_APP_NAME'] + '/assets'
-main.libs = [
-    (TOPOBJDIR + '/dist/' + CONFIG['MOZ_APP_NAME'] + '/lib/' + CONFIG['ANDROID_CPU_ARCH'] + '/libmozglue.so',
-     'libs/' + CONFIG['ANDROID_CPU_ARCH'] + '/libmozglue.so'),
-    (TOPOBJDIR + '/dist/' + CONFIG['MOZ_APP_NAME'] + '/lib/' + CONFIG['ANDROID_CPU_ARCH'] + '/libplugin-container.so',
-     'libs/' + CONFIG['ANDROID_CPU_ARCH'] + '/libplugin-container.so'),
-]
-main.res = None
-
-cpe = main.add_classpathentry('src', SRCDIR,
-    dstdir='src/org/mozilla/gecko',
-    exclude_patterns=[
-        'org/mozilla/gecko/resources/**'])
-
-if not CONFIG['MOZ_CRASHREPORTER']:
-    cpe.exclude_patterns += ['org/mozilla/gecko/CrashReporter.java']
-
-if CONFIG['MOZ_NATIVE_DEVICES']:
-    # This is rather hacky, but: we define three Eclipse projects for appcompat,
-    # mediarouter, and Google Play Services. mediarouter depends on appcompat;
-    # Google Play Services depends on both mediarouter and appcompat.  The three
-    # projects are "resources only" because it is difficult to arrange for
-    # exactly one version of each shipped Java JAR file to end up in the final
-    # APK when including the JARs in the Eclipse projects. To work around this,
-    # we instead add all the JAR files to the main Fennec project.
-
-    appcompat = add_android_eclipse_library_project('appcompat')
-    appcompat.package_name = 'android.support.v7.appcompat'
-    appcompat.res = CONFIG['ANDROID_APPCOMPAT_RES']
-
-    mediarouter = add_android_eclipse_library_project('mediarouter')
-    mediarouter.package_name = 'android.support.v7.mediarouter'
-    mediarouter.res = CONFIG['ANDROID_MEDIAROUTER_RES']
-    mediarouter.included_projects += ['../' + appcompat.name]
-    mediarouter.referenced_projects += ['../' + appcompat.name]
-
-    gps = add_android_eclipse_library_project('google-play-services_lib')
-    gps.package_name = 'com.google.android.gms'
-    gps.res = CONFIG['GOOGLE_PLAY_SERVICES_RES']
-    gps.included_projects += ['../' + appcompat.name, '../' + mediarouter.name]
-    gps.referenced_projects += ['../' + appcompat.name, '../' + mediarouter.name]
-
-    main.included_projects += ['../' + gps.name, '../' + appcompat.name, '../' + mediarouter.name]
-    main.referenced_projects += ['../' + gps.name, '../' + appcompat.name, '../' + mediarouter.name]
-
-    main.extra_jars += moz_native_devices_jars
-else:
-    cpe.exclude_patterns += moz_native_devices_sources
-
-# The generated/ directory includes both files generated by aapt (R.java and
-# Manifest.java for all packages) but also preprocessed files. In the past, the
-# generated R.java files were used by the Eclipse build, but now Eclipse
-# generates these files itself. Therefore, we exclude those generated sources.
-main.add_classpathentry('generated', OBJDIR + '/generated/preprocessed',
-    dstdir='generated')
-main.add_classpathentry('thirdparty', TOPSRCDIR + '/mobile/android/thirdparty',
-    dstdir='thirdparty',
-    ignore_warnings=True)
-
-# Eclipse generates org.mozilla.gecko.R for this project, which is referenced by
-# all the Java code. The reason that this is not generated in the main Fennec
-# project is that you cannot specify a custom package to the Eclipse Android
-# builder; that is, the Eclipse Android builder always builds the
-# org.mozilla.fennec_*.R class. This approach works because Eclipse shares
-# resources and some code across projects implicitly, which lets us provide
-# org.mozilla.gecko.R to the main Fennec project from the FennecResources
-# project.
-#
-# Previously, the static resources were in the FennecResources project. To let
-# the FennecResources Eclipse project produce org.mozilla.gecko.R, however, the
-# project must depend on all the resource projects.  But the crash reporter
-# resources depend on some of the static resources, and that causes a cycle.
-# This layer of indirection lets us break the cycle.
-
-resources = add_android_eclipse_library_project('FennecResources')
-resources.package_name = 'org.mozilla.gecko'
-resources.res = None
-resources.included_projects += ['../' + static.name, '../' + generated.name, '../' + branding.name]
-resources.recursive_make_targets += generated_recursive_make_targets
-
-# The resources are included in the Fennec APK.
-main.included_projects += ['../' + resources.name]
-
-omnijar = add_android_eclipse_library_project('FennecOmnijar')
-omnijar.package_name = 'org.mozilla.gecko.omnijar'
-# This is delicate.  We write into OBJDIR, and write triggers a new build of the
-# Fennec project, because the omni.ja timestamp is always updated. (The target
-# is FORCE and the installer does not track dependencies.) However, Eclipse only
-# triggers a new build (of FennecOmnijar) when something actually changes, so
-# we're not constantly rebuilding the FennecOmnijar (or Fennec) project.
-omnijar.recursive_make_targets += [TOPOBJDIR + '/dist/fennec/assets/omni.ja']
-for d in ['app', 'chrome', 'components', 'locales', 'modules', 'themes']:
-    omnijar.add_classpathentry(d, TOPSRCDIR + '/mobile/android/' + d, dstdir=d)
-
-# The omnijar is included in the Fennec APK (although it's empty,
-# having no resources, assets, or Java code).
-main.included_projects += ['../' + omnijar.name]
-
-if CONFIG['MOZ_CRASHREPORTER']:
-    crashreporter = add_android_eclipse_library_project('FennecResourcesCrashReporter')
-    crashreporter.package_name = 'org.mozilla.gecko.crashreporter'
-    crashreporter.res = SRCDIR + '/crashreporter/res'
-    crashreporter.recursive_make_targets += generated_recursive_make_targets
-
-    # layout/crash_reporter.xml references strings and other resources, and
-    # therefore depends on other resource projects.
-    crashreporter.included_projects += ['../' + static.name, '../' + generated.name]
-    crashreporter.referenced_projects += ['../' + static.name, '../' + generated.name]
-
-    resources.included_projects += ['../' + crashreporter.name]
-    resources.referenced_projects += ['../' + crashreporter.name]
-
-if CONFIG['MOZ_ANDROID_MLS_STUMBLER']:
-    main.included_projects += ['../FennecStumbler']
-    main.referenced_projects += ['../FennecStumbler']
-
-if CONFIG['MOZ_ANDROID_SEARCH_ACTIVITY']:
-    # The Search Activity code is built as part of Fennec, so we follow suit in Eclipse.
-    main.add_classpathentry('search', TOPSRCDIR + '/mobile/android/search/java', dstdir='search')
-
 DIST_FILES += ['package-name.txt.in']
--- a/mobile/android/stumbler/moz.build
+++ b/mobile/android/stumbler/moz.build
@@ -5,14 +5,8 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include('stumbler_sources.mozbuild')
 
 stumbler_jar = add_java_jar('stumbler')
 stumbler_jar.sources += stumbler_sources
 stumbler_jar.extra_jars += [CONFIG['ANDROID_COMPAT_LIB']]
 stumbler_jar.javac_flags += ['-Xlint:all']
-
-stumbler_eclipse = add_android_eclipse_library_project('FennecStumbler')
-stumbler_eclipse.package_name = 'org.mozilla.fennec.stumbler'
-stumbler_eclipse.res = None
-stumbler_eclipse.extra_jars += [CONFIG['ANDROID_COMPAT_LIB']]
-stumbler_eclipse.add_classpathentry('java', SRCDIR + '/java', dstdir='java')
--- a/mobile/android/tests/background/junit3/moz.build
+++ b/mobile/android/tests/background/junit3/moz.build
@@ -7,19 +7,9 @@
 DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
 
 include('background_junit3_sources.mozbuild')
 
 jar = add_java_jar('background-junit3')
 jar.sources += background_junit3_sources
 jar.extra_jars += [CONFIG['ANDROID_COMPAT_LIB']]
 
-main = add_android_eclipse_project('BackgroundInstrumentationTests', OBJDIR + '/AndroidManifest.xml')
-main.package_name = 'org.mozilla.gecko.background.tests'
-main.res = SRCDIR + '/res'
-main.recursive_make_targets += [
-    OBJDIR + '/AndroidManifest.xml']
-main.referenced_projects += ['Fennec']
-
-main.add_classpathentry('src', SRCDIR + '/src',
-    dstdir='src/org/mozilla/gecko/background')
-
 ANDROID_INSTRUMENTATION_MANIFESTS += ['instrumentation.ini']