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

Commit adb9e9f7 authored by satayev's avatar satayev Committed by Automerger Merge Worker
Browse files

Merge "Rename UpdatableBootJars to ApexBootJars." am: 4102c0cc

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1773912

Change-Id: Ife99a76ee653d4724184b92dddabe5a13a662c43
parents ccce36b5 4102c0cc
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1851,16 +1851,16 @@ var earlyBootJarsKey = NewOnceKey("earlyBootJars")
func (c *config) BootJars() []string {
	return c.Once(earlyBootJarsKey, func() interface{} {
		list := c.productVariables.BootJars.CopyOfJars()
		return append(list, c.productVariables.UpdatableBootJars.CopyOfJars()...)
		return append(list, c.productVariables.ApexBootJars.CopyOfJars()...)
	}).([]string)
}

func (c *config) NonUpdatableBootJars() ConfiguredJarList {
func (c *config) NonApexBootJars() ConfiguredJarList {
	return c.productVariables.BootJars
}

func (c *config) UpdatableBootJars() ConfiguredJarList {
	return c.productVariables.UpdatableBootJars
func (c *config) ApexBootJars() ConfiguredJarList {
	return c.productVariables.ApexBootJars
}

func (c *config) RBEWrapper() string {
+4 −4
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ type productVariables struct {
	ModulesLoadedByPrivilegedModules []string `json:",omitempty"`

	BootJars     ConfiguredJarList `json:",omitempty"`
	UpdatableBootJars ConfiguredJarList `json:",omitempty"`
	ApexBootJars ConfiguredJarList `json:",omitempty"`

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

@@ -442,7 +442,7 @@ func (v *productVariables) SetDefaultConfig() {
		Safestack:                    boolPtr(false),

		BootJars:     ConfiguredJarList{apexes: []string{}, jars: []string{}},
		UpdatableBootJars: ConfiguredJarList{apexes: []string{}, jars: []string{}},
		ApexBootJars: ConfiguredJarList{apexes: []string{}, jars: []string{}},
	}

	if runtime.GOOS == "linux" {
+5 −5
Original line number Diff line number Diff line
@@ -7264,7 +7264,7 @@ func TestDexpreoptAccessDexFilesFromPrebuiltApex(t *testing.T) {
	})
}

func testApexPermittedPackagesRules(t *testing.T, errmsg, bp string, apexBootJars []string, rules []android.Rule) {
func testApexPermittedPackagesRules(t *testing.T, errmsg, bp string, bootJars []string, rules []android.Rule) {
	t.Helper()
	bp += `
	apex_key {
@@ -7289,11 +7289,11 @@ func testApexPermittedPackagesRules(t *testing.T, errmsg, bp string, apexBootJar
		PrepareForTestWithApexBuildComponents,
		android.PrepareForTestWithNeverallowRules(rules),
		android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
			updatableBootJars := make([]string, 0, len(apexBootJars))
			for _, apexBootJar := range apexBootJars {
				updatableBootJars = append(updatableBootJars, "myapex:"+apexBootJar)
			apexBootJars := make([]string, 0, len(bootJars))
			for _, apexBootJar := range bootJars {
				apexBootJars = append(apexBootJars, "myapex:"+apexBootJar)
			}
			variables.UpdatableBootJars = android.CreateTestConfiguredJarList(updatableBootJars)
			variables.ApexBootJars = android.CreateTestConfiguredJarList(apexBootJars)
		}),
		fs.AddToFixture(),
	).
+1 −1
Original line number Diff line number Diff line
@@ -748,7 +748,7 @@ func TestBootclasspathFragment_HiddenAPIList(t *testing.T) {
		prepareForTestWithMyapex,
		// Configure bootclasspath jars to ensure that hidden API encoding is performed on them.
		java.FixtureConfigureBootJars("com.android.art:baz", "com.android.art:quuz"),
		java.FixtureConfigureUpdatableBootJars("myapex:foo", "myapex:bar"),
		java.FixtureConfigureApexBootJars("myapex:foo", "myapex:bar"),
		// Make sure that the frameworks/base/Android.bp file exists as otherwise hidden API encoding
		// is disabled.
		android.FixtureAddTextFile("frameworks/base/Android.bp", ""),
+5 −5
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
		prepareForTestWithMyapex,
		// Configure some libraries in the art and framework boot images.
		java.FixtureConfigureBootJars("com.android.art:baz", "com.android.art:quuz", "platform:foo"),
		java.FixtureConfigureUpdatableBootJars("myapex:bar"),
		java.FixtureConfigureApexBootJars("myapex:bar"),
		java.PrepareForTestWithJavaSdkLibraryFiles,
		java.FixtureWithLastReleaseApis("foo"),
	).RunTestWithBp(t, `
@@ -288,7 +288,7 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
		"com.android.art:quuz",
		"platform:foo",

		// The configured contents of UpdatableBootJars.
		// The configured contents of ApexBootJars.
		"myapex:bar",
	})

@@ -313,7 +313,7 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
		`com.android.art:quuz`,
		`platform:foo`,

		// The configured contents of UpdatableBootJars.
		// The configured contents of ApexBootJars.
		`myapex:bar`,

		// The fragments.
@@ -348,7 +348,7 @@ func TestPlatformBootclasspath_AlwaysUsePrebuiltSdks(t *testing.T) {
		// if the dependency on myapex:foo is filtered out because of either of those conditions then
		// the dependencies resolved by the platform_bootclasspath will not match the configured list
		// and so will fail the test.
		java.FixtureConfigureUpdatableBootJars("myapex:foo", "myapex:bar"),
		java.FixtureConfigureApexBootJars("myapex:foo", "myapex:bar"),
		java.PrepareForTestWithJavaSdkLibraryFiles,
		android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
			variables.Always_use_prebuilt_sdks = proptools.BoolPtr(true)
@@ -490,7 +490,7 @@ func TestPlatformBootclasspath_IncludesRemainingApexJars(t *testing.T) {
	result := android.GroupFixturePreparers(
		prepareForTestWithPlatformBootclasspath,
		prepareForTestWithMyapex,
		java.FixtureConfigureUpdatableBootJars("myapex:foo"),
		java.FixtureConfigureApexBootJars("myapex:foo"),
		android.FixtureWithRootAndroidBp(`
			platform_bootclasspath {
				name: "platform-bootclasspath",
Loading