Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72be5901 authored by Dan Willemsen's avatar Dan Willemsen Committed by Colin Cross
Browse files

Add `aapt_include_all_resources`

The equivalent of Make's LOCAL_AAPT_INCLUDE_ALL_RESOURCES.

Test: build LatinIME with Soong
Change-Id: Ib76bea5f28e365b59fa9477b9bceabb84012ff8e
parent 000b4d1a
Loading
Loading
Loading
Loading
+19 −18
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@ func init() {
			"LOCAL_PRODUCT_SERVICES_MODULE":    "product_services_specific",
			"LOCAL_EXPORT_PACKAGE_RESOURCES":   "export_package_resources",
			"LOCAL_PRIVILEGED_MODULE":          "privileged",
			"LOCAL_AAPT_INCLUDE_ALL_RESOURCES": "aapt_include_all_resources",

			"LOCAL_DEX_PREOPT":                  "dex_preopt.enabled",
			"LOCAL_DEX_PREOPT_APP_IMAGE":        "dex_preopt.app_image",
+4 −0
Original line number Diff line number Diff line
@@ -47,6 +47,10 @@ type aaptProperties struct {
	// flags passed to aapt when creating the apk
	Aaptflags []string

	// include all resource configurations, not just the product-configured
	// ones.
	Aapt_include_all_resources *bool

	// list of directories relative to the Blueprints file containing assets.
	// Defaults to "assets"
	Asset_dirs []string
+9 −7
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
		linkFlags = append(linkFlags, "--product", ctx.Config().ProductAAPTCharacteristics())
	}

	if !Bool(a.aaptProperties.Aapt_include_all_resources) {
		// Product AAPT config
		for _, aaptConfig := range ctx.Config().ProductAAPTConfig() {
			linkFlags = append(linkFlags, "-c", aaptConfig)
@@ -203,6 +204,7 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
		if len(ctx.Config().ProductAAPTPreferredConfig()) > 0 {
			linkFlags = append(linkFlags, "--preferred-density", ctx.Config().ProductAAPTPreferredConfig())
		}
	}

	// TODO: LOCAL_PACKAGE_OVERRIDES
	//    $(addprefix --rename-manifest-package , $(PRIVATE_MANIFEST_PACKAGE_NAME)) \