зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550146 - Part 2: Make mach "build" run "stage-package && android assemble-app" for mobile/android. r=glandium
Android artifacts (GeckoView AARs, GeckoViewExample (and Fennec) APKs) require native libraries (`libxul.so`) and an omnijar (`omni.ja`). These are produced by `mach package` (really, the `stage-package` target). Engineers essentially never want a build without a package for mobile/android. This adds mobile/android-only tiers that run `mach package` and then `mach android assemble-app`. The latter consumes `libxul.so` and `omni.ja` to produce _all the things_ relevant to GeckoView engineers. Differential Revision: https://phabricator.services.mozilla.com/D41450 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ae36e5d5c2
Коммит
6790ecb3a2
|
@ -167,6 +167,14 @@ recurse_android-fat-aar-artifact:
|
|||
--distdir $(abspath $(DIST)/fat-aar))
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_BUILD_APP),mobile/android)
|
||||
|
||||
recurse_android-stage-package: stage-package
|
||||
|
||||
recurse_android-archive-geckoview:
|
||||
GRADLE_INVOKED_WITHIN_MACH_BUILD=1 $(topsrcdir)/mach --log-no-times android archive-geckoview
|
||||
endif
|
||||
|
||||
ifdef MOZ_WIDGET_TOOLKIT
|
||||
ifdef ENABLE_TESTS
|
||||
# Additional makefile targets to call automated test suites
|
||||
|
|
|
@ -43,7 +43,7 @@ ifndef INCLUDED_AUTOCONF_MK
|
|||
default::
|
||||
else
|
||||
# All possible tiers
|
||||
ALL_TIERS := artifact win32-artifact android-fat-aar-artifact pre-export export rust compile misc libs tools check
|
||||
ALL_TIERS := artifact win32-artifact android-fat-aar-artifact pre-export export rust compile misc libs android-stage-package android-archive-geckoview tools check
|
||||
|
||||
# All tiers that may be used manually via `mach build $tier`
|
||||
RUNNABLE_TIERS := $(ALL_TIERS)
|
||||
|
@ -56,6 +56,10 @@ endif
|
|||
ifndef MOZ_ANDROID_FAT_AAR_ARCHITECTURES
|
||||
RUNNABLE_TIERS := $(filter-out android-fat-aar-artifact,$(RUNNABLE_TIERS))
|
||||
endif
|
||||
ifneq ($(MOZ_BUILD_APP),mobile/android)
|
||||
RUNNABLE_TIERS := $(filter-out android-stage-package,$(RUNNABLE_TIERS))
|
||||
RUNNABLE_TIERS := $(filter-out android-archive-geckoview,$(RUNNABLE_TIERS))
|
||||
endif
|
||||
|
||||
# All tiers that run automatically on `mach build`
|
||||
TIERS := $(filter-out check,$(RUNNABLE_TIERS))
|
||||
|
|
|
@ -9,8 +9,18 @@ installer:
|
|||
|
||||
package:
|
||||
# Setting MOZ_GECKOVIEW_JAR makes the installer generate a separate GeckoView JAR
|
||||
ifdef MOZ_ANDROID_WITH_FENNEC
|
||||
@$(MAKE) MOZ_GECKOVIEW_JAR=1 -C mobile/android/installer stage-package
|
||||
@$(MAKE) -C mobile/android/installer
|
||||
else
|
||||
@$(MAKE) MOZ_GECKOVIEW_JAR=1 -C mobile/android/installer
|
||||
endif # MOZ_ANDROID_WITH_FENNEC
|
||||
|
||||
stage-package:
|
||||
$(MAKE) MOZ_GECKOVIEW_JAR=1 -C mobile/android/installer stage-package
|
||||
ifdef MOZ_ANDROID_WITH_FENNEC
|
||||
$(MAKE) -C mobile/android/installer stage-package
|
||||
endif # MOZ_ANDROID_WITH_FENNEC
|
||||
|
||||
ifeq ($(OS_TARGET),Android)
|
||||
ifneq ($(MOZ_ANDROID_INSTALL_TARGET),)
|
||||
|
|
|
@ -32,6 +32,11 @@ ext.configureVariantWithGeckoBinaries = { variant ->
|
|||
|
||||
def syncLibsFromDistDir = task("syncLibsFromDistDirFor${variant.name.capitalize()}", type: Sync) {
|
||||
onlyIf {
|
||||
if (!mozconfig.substs.COMPILE_ENVIRONMENT && !mozconfig.substs.MOZ_ARTIFACT_BUILDS) {
|
||||
// We won't have JNI libraries if we're not compiling and we're not downloading
|
||||
// artifacts. Such a configuration is used for running lints, generating docs, etc.
|
||||
return true
|
||||
}
|
||||
if (source.empty) {
|
||||
throw new StopExecutionException("Required JNI libraries not found in ${distDir}/lib. Have you built and packaged?")
|
||||
}
|
||||
|
|
|
@ -74,13 +74,4 @@ config = {
|
|||
},
|
||||
'src_mozconfig': 'mobile/android/config/mozconfigs/android/nightly',
|
||||
#########################################################################
|
||||
|
||||
# It's not obvious, but postflight_build is after packaging, so the Gecko
|
||||
# binaries are in the object directory, ready to be packaged into the
|
||||
# GeckoView AAR.
|
||||
'postflight_build_mach_commands': [
|
||||
['android',
|
||||
'archive-geckoview',
|
||||
],
|
||||
],
|
||||
}
|
||||
|
|
|
@ -4,9 +4,6 @@ config = {
|
|||
'multi_locale_config_platform': 'android',
|
||||
'debug_build': True,
|
||||
'postflight_build_mach_commands': [
|
||||
['android',
|
||||
'archive-geckoview',
|
||||
],
|
||||
['android',
|
||||
'archive-coverage-artifacts',
|
||||
],
|
||||
|
|
Загрузка…
Ссылка в новой задаче