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

Commit 14641289 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '3700-t-blueprint' into 'v1-t'

Add blueprint support for prebuilts

See merge request !7
parents f40ff00b 633cef94
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1490,10 +1490,6 @@ func (c *config) ProductPrivateSepolicyDirs() []string {
	return c.productVariables.ProductPrivateSepolicyDirs
}

func (c *config) MissingUsesLibraries() []string {
	return c.productVariables.MissingUsesLibraries
}

func (c *deviceConfig) DeviceArch() string {
	return String(c.config.productVariables.DeviceArch)
}
+0 −2
Original line number Diff line number Diff line
@@ -417,8 +417,6 @@ type productVariables struct {

	TargetFSConfigGen []string `json:",omitempty"`

	MissingUsesLibraries []string `json:",omitempty"`

	EnforceProductPartitionInterface *bool `json:",omitempty"`

	EnforceInterPartitionJavaSdkLibrary *bool    `json:",omitempty"`
+9 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package java
// related module types, including their override variants.

import (
	"fmt"
	"path/filepath"
	"strings"

@@ -1278,10 +1279,15 @@ func (u *usesLibrary) deps(ctx android.BottomUpMutatorContext, hasFrameworkLibs
	}
}

// presentOptionalUsesLibs returns optional_uses_libs after filtering out MissingUsesLibraries, which don't exist in the
// build.
// presentOptionalUsesLibs returns optional_uses_libs after filtering out libraries that don't exist in the source tree.
func (u *usesLibrary) presentOptionalUsesLibs(ctx android.BaseModuleContext) []string {
	optionalUsesLibs, _ := android.FilterList(u.usesLibraryProperties.Optional_uses_libs, ctx.Config().MissingUsesLibraries())
	optionalUsesLibs := android.FilterListPred(u.usesLibraryProperties.Optional_uses_libs, func(s string) bool {
		exists := ctx.OtherModuleExists(s)
		if !exists {
			fmt.Printf("Warning: Module '%s' depends on non-existing optional_uses_libs '%s'\n", ctx.ModuleName(), s)
		}
		return exists
	})
	return optionalUsesLibs
}

+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ type AndroidAppImportProperties struct {

	// Optional. Install to a subdirectory of the default install path for the module
	Relative_install_path *string

	// Whether the prebuilt apk can be installed without additional processing. Default is false.
	Preprocessed *bool
}

func (a *AndroidAppImport) IsInstallable() bool {
+0 −3
Original line number Diff line number Diff line
@@ -2599,9 +2599,6 @@ func TestUsesLibraries(t *testing.T) {
		prepareForJavaTest,
		PrepareForTestWithJavaSdkLibraryFiles,
		FixtureWithLastReleaseApis("runtime-library", "foo", "quuz", "qux", "bar", "fred"),
		android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
			variables.MissingUsesLibraries = []string{"baz"}
		}),
	).RunTestWithBp(t, bp)

	app := result.ModuleForTests("app", "android_common")