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

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

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

Add blueprint support for prebuilts

See merge request !8
parents 20bb2ad1 c35de833
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1359,10 +1359,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
@@ -374,8 +374,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"
	"sort"
	"strings"
@@ -1235,10 +1236,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
@@ -99,6 +99,9 @@ type AndroidAppImportProperties struct {
	// If set, create package-export.apk, which other packages can
	// use to get PRODUCT-agnostic resource data like IDs and type definitions.
	Export_package_resources *bool

	// 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
@@ -2342,9 +2342,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")