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

Commit 0b1b008a authored by Spandan Das's avatar Spandan Das
Browse files

Make apex.Bootclasspath_fragments configurable

For use in select statements.

This also removes the mutated `ResolvedSystemServerclasspathFragments`
and inlines the results.

Test: m nothing --no-skip-soong-tests
Bug: 377131764
Change-Id: I9efcf689fe52c5c565d2084771b94f314fd4b077
parent 3f630593
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -105,11 +105,10 @@ type apexBundleProperties struct {
	Rros []string

	// List of bootclasspath fragments that are embedded inside this APEX bundle.
	Bootclasspath_fragments []string
	Bootclasspath_fragments proptools.Configurable[[]string]

	// List of systemserverclasspath fragments that are embedded inside this APEX bundle.
	Systemserverclasspath_fragments proptools.Configurable[[]string]
	ResolvedSystemserverclasspathFragments []string `blueprint:"mutated"`

	// List of java libraries that are embedded inside this APEX bundle.
	Java_libs []string
@@ -891,13 +890,11 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
		}
	}

	a.properties.ResolvedSystemserverclasspathFragments = a.properties.Systemserverclasspath_fragments.GetOrDefault(ctx, nil)

	// Common-arch dependencies come next
	commonVariation := ctx.Config().AndroidCommonTarget.Variations()
	ctx.AddFarVariationDependencies(commonVariation, rroTag, a.properties.Rros...)
	ctx.AddFarVariationDependencies(commonVariation, bcpfTag, a.properties.Bootclasspath_fragments...)
	ctx.AddFarVariationDependencies(commonVariation, sscpfTag, a.properties.ResolvedSystemserverclasspathFragments...)
	ctx.AddFarVariationDependencies(commonVariation, bcpfTag, a.properties.Bootclasspath_fragments.GetOrDefault(ctx, nil)...)
	ctx.AddFarVariationDependencies(commonVariation, sscpfTag, a.properties.Systemserverclasspath_fragments.GetOrDefault(ctx, nil)...)
	ctx.AddFarVariationDependencies(commonVariation, javaLibTag, a.properties.Java_libs...)
	ctx.AddFarVariationDependencies(commonVariation, fsTag, a.properties.Filesystems...)
	ctx.AddFarVariationDependencies(commonVariation, compatConfigTag, a.properties.Compat_configs...)
@@ -2776,8 +2773,8 @@ func isStaticExecutableAllowed(apex string, exec string) bool {
// Collect information for opening IDE project files in java/jdeps.go.
func (a *apexBundle) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
	dpInfo.Deps = append(dpInfo.Deps, a.properties.Java_libs...)
	dpInfo.Deps = append(dpInfo.Deps, a.properties.Bootclasspath_fragments...)
	dpInfo.Deps = append(dpInfo.Deps, a.properties.ResolvedSystemserverclasspathFragments...)
	dpInfo.Deps = append(dpInfo.Deps, a.properties.Bootclasspath_fragments.GetOrDefault(ctx, nil)...)
	dpInfo.Deps = append(dpInfo.Deps, a.properties.Systemserverclasspath_fragments.GetOrDefault(ctx, nil)...)
}

func init() {