зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626336 - Remove `MOZ_GECKOVIEW_JAR`. r=agi,geckoview-reviewers
While we're here we remove some Gradle Fennec-isms that are no longer needed. Differential Revision: https://phabricator.services.mozilla.com/D87334
This commit is contained in:
Родитель
02dffea93c
Коммит
851257343a
39
build.gradle
39
build.gradle
|
@ -120,15 +120,9 @@ ext.geckoBinariesOnlyIf = { task ->
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multi-l10n builds set `AB_CD=multi`, which isn't a valid locale. This
|
// Multi-l10n builds set `AB_CD=multi`, which isn't a valid locale. To
|
||||||
// causes the
|
// avoid failures, if Gradle is invoked with AB_CD=multi, we don't invoke
|
||||||
//
|
// Make at all.
|
||||||
// |mach build| > |mach gradle| >
|
|
||||||
// |mach build mobile/android/base/generated_android_code_and_resources| >
|
|
||||||
// AndroidManifest.xml > strings.xml > multi/brand.dtd
|
|
||||||
//
|
|
||||||
// dependency chain to fail, since multi isn't a real locale. To avoid
|
|
||||||
// this, if Gradle is invoked with AB_CD=multi, we don't invoke Make at all.
|
|
||||||
if ('multi' == System.env.AB_CD) {
|
if ('multi' == System.env.AB_CD) {
|
||||||
rootProject.logger.lifecycle("Skipping task ${task.path} because: AB_CD=multi")
|
rootProject.logger.lifecycle("Skipping task ${task.path} because: AB_CD=multi")
|
||||||
return false
|
return false
|
||||||
|
@ -157,12 +151,6 @@ class MachExec extends Exec {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Why |mach build mobile/android/base/...| and |mach build faster|? |mach
|
|
||||||
// build faster| generates dependentlibs.list, which in turn depends on compiled
|
|
||||||
// code. That causes a circular dependency between Java compilation/JNI wrapper
|
|
||||||
// generation/native code compilation. So we have the special target for
|
|
||||||
// Android-specific generated code, and the |mach build faster| target for all
|
|
||||||
// the stuff that goes into the omnijar.
|
|
||||||
task machBuildFaster(type: MachExec) {
|
task machBuildFaster(type: MachExec) {
|
||||||
onlyIf rootProject.ext.geckoBinariesOnlyIf
|
onlyIf rootProject.ext.geckoBinariesOnlyIf
|
||||||
|
|
||||||
|
@ -183,8 +171,7 @@ task machBuildFaster(type: MachExec) {
|
||||||
errorOutput = standardOutput
|
errorOutput = standardOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
def createMachStagePackageTask(name) {
|
task machStagePackage(type: MachExec) {
|
||||||
return task(name, type: MachExec) {
|
|
||||||
onlyIf rootProject.ext.geckoBinariesOnlyIf
|
onlyIf rootProject.ext.geckoBinariesOnlyIf
|
||||||
|
|
||||||
dependsOn rootProject.machBuildFaster
|
dependsOn rootProject.machBuildFaster
|
||||||
|
@ -198,8 +185,10 @@ def createMachStagePackageTask(name) {
|
||||||
args "${topobjdir}/mobile/android/installer"
|
args "${topobjdir}/mobile/android/installer"
|
||||||
args 'stage-package'
|
args 'stage-package'
|
||||||
|
|
||||||
outputs.file "${topobjdir}/dist/fennec/assets/${mozconfig.substs.ANDROID_CPU_ARCH}/libxul.so"
|
outputs.file "${topobjdir}/dist/geckoview/assets/omni.ja"
|
||||||
outputs.file "${topobjdir}/dist/fennec/lib/${mozconfig.substs.ANDROID_CPU_ARCH}/libmozglue.so"
|
|
||||||
|
outputs.file "${topobjdir}/dist/geckoview/assets/${mozconfig.substs.ANDROID_CPU_ARCH}/libxul.so"
|
||||||
|
outputs.file "${topobjdir}/dist/geckoview/lib/${mozconfig.substs.ANDROID_CPU_ARCH}/libmozglue.so"
|
||||||
|
|
||||||
// Force running `stage-package`.
|
// Force running `stage-package`.
|
||||||
outputs.upToDateWhen { false }
|
outputs.upToDateWhen { false }
|
||||||
|
@ -208,18 +197,6 @@ def createMachStagePackageTask(name) {
|
||||||
standardOutput = new TaggedLogOutputStream("${path}>", logger)
|
standardOutput = new TaggedLogOutputStream("${path}>", logger)
|
||||||
errorOutput = standardOutput
|
errorOutput = standardOutput
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
createMachStagePackageTask("machStagePackageForFennec").with {
|
|
||||||
outputs.file "${topobjdir}/dist/fennec/assets/omni.ja"
|
|
||||||
}
|
|
||||||
|
|
||||||
createMachStagePackageTask("machStagePackageForGeckoview").with {
|
|
||||||
args 'MOZ_GECKOVIEW_JAR=1'
|
|
||||||
outputs.file "${topobjdir}/dist/geckoview/assets/omni.ja"
|
|
||||||
// Avoid races between stage-package invocations.
|
|
||||||
mustRunAfter tasks["machStagePackageForFennec"]
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
subprojects { project ->
|
subprojects { project ->
|
||||||
|
|
|
@ -8,11 +8,10 @@ installer:
|
||||||
@$(MAKE) -C mobile/android/installer installer
|
@$(MAKE) -C mobile/android/installer installer
|
||||||
|
|
||||||
package:
|
package:
|
||||||
# Setting MOZ_GECKOVIEW_JAR makes the installer generate a separate GeckoView JAR
|
@$(MAKE) -C mobile/android/installer
|
||||||
@$(MAKE) MOZ_GECKOVIEW_JAR=1 -C mobile/android/installer
|
|
||||||
|
|
||||||
stage-package:
|
stage-package:
|
||||||
$(MAKE) MOZ_GECKOVIEW_JAR=1 -C mobile/android/installer stage-package
|
$(MAKE) -C mobile/android/installer stage-package
|
||||||
|
|
||||||
deb: package
|
deb: package
|
||||||
@$(MAKE) -C mobile/android/installer deb
|
@$(MAKE) -C mobile/android/installer deb
|
||||||
|
|
|
@ -146,12 +146,8 @@ class SyncLibsAndUpdateGeneration extends DefaultTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.configureVariantWithGeckoBinaries = { variant ->
|
ext.configureVariantWithGeckoBinaries = { variant ->
|
||||||
// :app needs the full Fennec omni.ja, whereas other projects need the
|
def omnijarDir = "${topobjdir}/dist/geckoview"
|
||||||
// GeckoView-specific omni.ja.
|
def distDir = "${topobjdir}/dist/geckoview"
|
||||||
def omnijarDir = { "${topobjdir}/dist/${it}" }("app".equals(project.name) ? "fennec" : "geckoview")
|
|
||||||
// All projects take the same Gecko libraries, which (for historical
|
|
||||||
// reasons) are in "fennec".
|
|
||||||
def distDir = "${topobjdir}/dist/fennec"
|
|
||||||
|
|
||||||
def syncOmnijarFromDistDir = task("syncOmnijarFromDistDirFor${variant.name.capitalize()}", type: Sync) {
|
def syncOmnijarFromDistDir = task("syncOmnijarFromDistDirFor${variant.name.capitalize()}", type: Sync) {
|
||||||
onlyIf {
|
onlyIf {
|
||||||
|
@ -208,15 +204,9 @@ ext.configureVariantWithGeckoBinaries = { variant ->
|
||||||
// moz.build system, which can be re-entrant. Official builds are driven by
|
// moz.build system, which can be re-entrant. Official builds are driven by
|
||||||
// the moz.build system and should never be re-entrant in this way.
|
// the moz.build system and should never be re-entrant in this way.
|
||||||
if (!mozconfig.substs.MOZILLA_OFFICIAL) {
|
if (!mozconfig.substs.MOZILLA_OFFICIAL) {
|
||||||
if ("app".equals(project.name)) {
|
syncOmnijarFromDistDir.dependsOn rootProject.machStagePackage
|
||||||
syncOmnijarFromDistDir.dependsOn rootProject.machStagePackageForFennec
|
syncLibsFromDistDir.dependsOn rootProject.machStagePackage
|
||||||
syncLibsFromDistDir.dependsOn rootProject.machStagePackageForFennec
|
syncAssetsFromDistDir.dependsOn rootProject.machStagePackage
|
||||||
syncAssetsFromDistDir.dependsOn rootProject.machStagePackageForFennec
|
|
||||||
} else {
|
|
||||||
syncOmnijarFromDistDir.dependsOn rootProject.machStagePackageForGeckoview
|
|
||||||
syncLibsFromDistDir.dependsOn rootProject.machStagePackageForGeckoview
|
|
||||||
syncAssetsFromDistDir.dependsOn rootProject.machStagePackageForGeckoview
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def assetGenTask = tasks.findByName("generate${variant.name.capitalize()}Assets")
|
def assetGenTask = tasks.findByName("generate${variant.name.capitalize()}Assets")
|
||||||
|
|
|
@ -42,12 +42,7 @@ ifdef MOZ_ARTIFACT_BUILDS
|
||||||
DEFINES += -DMOZ_ARTIFACT_BUILDS=1
|
DEFINES += -DMOZ_ARTIFACT_BUILDS=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef MOZ_GECKOVIEW_JAR
|
|
||||||
# Generate a GeckoView-specific omni.ja under dist/geckoview/omni.ja,
|
|
||||||
# alongside the full omni.ja used by Fennec under dist/fennec/omni.ja.
|
|
||||||
DEFINES += -DMOZ_GECKOVIEW_JAR=1
|
|
||||||
MOZ_PKG_DIR = geckoview
|
MOZ_PKG_DIR = geckoview
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef MOZ_ANDROID_FAT_AAR_ARCHITECTURES
|
ifdef MOZ_ANDROID_FAT_AAR_ARCHITECTURES
|
||||||
DEFINES += -DMOZ_ANDROID_FAT_AAR_ARCHITECTURES=1
|
DEFINES += -DMOZ_ANDROID_FAT_AAR_ARCHITECTURES=1
|
||||||
|
|
|
@ -24,13 +24,7 @@
|
||||||
@BINPATH@/hyphenation/*
|
@BINPATH@/hyphenation/*
|
||||||
@BINPATH@/localization/*
|
@BINPATH@/localization/*
|
||||||
|
|
||||||
; We want fennec/lib for both Fennec and GeckoView, so we turn
|
|
||||||
; geckoview/lib into fennec/lib.
|
|
||||||
#ifndef MOZ_GECKOVIEW_JAR
|
|
||||||
[lib destdir="lib/@ANDROID_CPU_ARCH@"]
|
[lib destdir="lib/@ANDROID_CPU_ARCH@"]
|
||||||
#else
|
|
||||||
[lib destdir="../fennec/lib/@ANDROID_CPU_ARCH@"]
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_CLANG_RT_ASAN_LIB
|
#ifdef MOZ_CLANG_RT_ASAN_LIB
|
||||||
@BINPATH@/@MOZ_CLANG_RT_ASAN_LIB@
|
@BINPATH@/@MOZ_CLANG_RT_ASAN_LIB@
|
||||||
|
@ -139,7 +133,6 @@
|
||||||
|
|
||||||
; [Default Preferences]
|
; [Default Preferences]
|
||||||
; All the pref files must be part of base to prevent migration bugs
|
; All the pref files must be part of base to prevent migration bugs
|
||||||
#ifdef MOZ_GECKOVIEW_JAR
|
|
||||||
#ifndef MOZ_ANDROID_FAT_AAR_ARCHITECTURES
|
#ifndef MOZ_ANDROID_FAT_AAR_ARCHITECTURES
|
||||||
@BINPATH@/@ANDROID_CPU_ARCH@/greprefs.js
|
@BINPATH@/@ANDROID_CPU_ARCH@/greprefs.js
|
||||||
@BINPATH@/@PREF_DIR@/@ANDROID_CPU_ARCH@/geckoview-prefs.js
|
@BINPATH@/@PREF_DIR@/@ANDROID_CPU_ARCH@/geckoview-prefs.js
|
||||||
|
@ -147,10 +140,6 @@
|
||||||
@BINPATH@/*/greprefs.js
|
@BINPATH@/*/greprefs.js
|
||||||
@BINPATH@/@PREF_DIR@/*/geckoview-prefs.js
|
@BINPATH@/@PREF_DIR@/*/geckoview-prefs.js
|
||||||
#endif # !MOZ_ANDROID_FAT_AAR_ARCHITECTURES
|
#endif # !MOZ_ANDROID_FAT_AAR_ARCHITECTURES
|
||||||
#else
|
|
||||||
@BINPATH@/@ANDROID_CPU_ARCH@/greprefs.js
|
|
||||||
@BINPATH@/@PREF_DIR@/mobile.js
|
|
||||||
#endif # MOZ_GECKOVIEW_JAR
|
|
||||||
@BINPATH@/@PREF_DIR@/channel-prefs.js
|
@BINPATH@/@PREF_DIR@/channel-prefs.js
|
||||||
@BINPATH@/defaults/autoconfig/prefcalls.js
|
@BINPATH@/defaults/autoconfig/prefcalls.js
|
||||||
|
|
||||||
|
@ -214,12 +203,7 @@
|
||||||
@BINPATH@/chrome/geckoview@JAREXT@
|
@BINPATH@/chrome/geckoview@JAREXT@
|
||||||
@BINPATH@/chrome/geckoview.manifest
|
@BINPATH@/chrome/geckoview.manifest
|
||||||
|
|
||||||
#ifdef MOZ_GECKOVIEW_JAR
|
|
||||||
@BINPATH@/components/GeckoView.manifest
|
@BINPATH@/components/GeckoView.manifest
|
||||||
#else
|
|
||||||
@BINPATH@/chrome/chrome@JAREXT@
|
|
||||||
@BINPATH@/chrome/chrome.manifest
|
|
||||||
#endif
|
|
||||||
|
|
||||||
; Remote control protocol
|
; Remote control protocol
|
||||||
#ifdef ENABLE_MARIONETTE
|
#ifdef ENABLE_MARIONETTE
|
||||||
|
|
|
@ -98,16 +98,6 @@ class MachCommands(MachCommandBase):
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
@SubCommand('android', 'generate-fennec-jni-wrappers',
|
|
||||||
"""Generate Fennec-specific JNI wrappers used when building
|
|
||||||
Firefox for Android.""")
|
|
||||||
@CommandArgument('args', nargs=argparse.REMAINDER)
|
|
||||||
def android_generate_fennec_jni_wrappers(self, args):
|
|
||||||
ret = self.gradle(
|
|
||||||
self.substs['GRADLE_ANDROID_GENERATE_FENNEC_JNI_WRAPPERS_TASKS'] + args, verbose=True)
|
|
||||||
|
|
||||||
return ret
|
|
||||||
|
|
||||||
@SubCommand('android', 'api-lint',
|
@SubCommand('android', 'api-lint',
|
||||||
"""Run Android api-lint.
|
"""Run Android api-lint.
|
||||||
REMOVED/DEPRECATED: Use 'mach lint --linter android-api-lint'.""")
|
REMOVED/DEPRECATED: Use 'mach lint --linter android-api-lint'.""")
|
||||||
|
|
|
@ -83,7 +83,7 @@ GARBAGE += $(addsuffix .log,$(MOCHITESTS) reftest crashtest jstestbrowser)
|
||||||
REMOTE_CPPUNITTESTS = \
|
REMOTE_CPPUNITTESTS = \
|
||||||
$(PYTHON3) -u $(topsrcdir)/testing/remotecppunittests.py \
|
$(PYTHON3) -u $(topsrcdir)/testing/remotecppunittests.py \
|
||||||
--xre-path=$(DEPTH)/dist/bin \
|
--xre-path=$(DEPTH)/dist/bin \
|
||||||
--localLib=$(DEPTH)/dist/fennec \
|
--localLib=$(DEPTH)/dist/geckoview \
|
||||||
--deviceIP=${TEST_DEVICE} \
|
--deviceIP=${TEST_DEVICE} \
|
||||||
$(TEST_PATH) $(EXTRA_TEST_ARGS)
|
$(TEST_PATH) $(EXTRA_TEST_ARGS)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче