Closed Bug 1063109 Opened 10 years ago Closed 10 years ago

Allow for aapt to be invoked with min/max SDK arguments

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla35

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

Attachments

(1 file, 1 obsolete file)

This is one part of the API range limiting that we'll want to do when building split APKs. This alone saves 100KB of final APK size.
I tried for a while, and the only way I could get the real value here was to use substitution. Counter-patch welcome if that's distasteful! I also made our aapt invocation verbose. It isn't much more verbose, as far as I can tell. Verified with two builds that this works.
Attachment #8485044 - Flags: review?(nalexander)
Blocks: 1063643
Comment on attachment 8485044 [details] [diff] [review] Allow for aapt to be invoked with max-res-version argument. v1 Review of attachment 8485044 [details] [diff] [review]: ----------------------------------------------------------------- ::: build/autoconf/android.m4 @@ +427,4 @@ > AC_MSG_ERROR([--with-android-min-sdk is expected to be less than $ANDROID_TARGET_SDK]) > fi > > AC_DEFINE_UNQUOTED(MOZ_ANDROID_MIN_SDK_VERSION, $MOZ_ANDROID_MIN_SDK_VERSION) Let's AC_SUBST this too. ::: mobile/android/base/Makefile.in @@ +359,4 @@ > define aapt_command > $(1): $$(call mkdir_deps,$(filter-out ./,$(dir $(3) $(4) $(5)))) $(2) > @$$(TOUCH) $$@ > + $$(AAPT) package -f -m -v \ Why? Doesn't this spew crap about all the processed resources? @@ +363,3 @@ > -M AndroidManifest.xml \ > -I $(ANDROID_SDK)/android.jar \ > + $(if $(MAX_RES_VERSION),--max-res-version $(MAX_RES_VERSION),) \ You should be able to just use $(MOZ_ANDROID_MAX_SDK_VERSION) after the AC_SUBST.
Attachment #8485044 - Flags: review?(nalexander) → feedback+
Comments addressed.
Attachment #8485333 - Flags: review?(nalexander)
Attachment #8485044 - Attachment is obsolete: true
Comment on attachment 8485333 [details] [diff] [review] Allow for aapt to be invoked with max-res-version argument. v2 wfm if it wfy.
Attachment #8485333 - Flags: review?(nalexander) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 35 → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: