Make some apex properties configurable am: b114234f6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3189224 Change-Id: Ic6414ae157486b4d5b9a5bc31687b2f8524122b6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
13
apex/apex.go
13
apex/apex.go
@@ -86,7 +86,7 @@ type apexBundleProperties struct {
|
|||||||
|
|
||||||
// AndroidManifest.xml file used for the zip container of this APEX bundle. If unspecified,
|
// AndroidManifest.xml file used for the zip container of this APEX bundle. If unspecified,
|
||||||
// a default one is automatically generated.
|
// a default one is automatically generated.
|
||||||
AndroidManifest *string `android:"path"`
|
AndroidManifest proptools.Configurable[string] `android:"path,replace_instead_of_append"`
|
||||||
|
|
||||||
// Determines the file contexts file for setting the security contexts to files in this APEX
|
// Determines the file contexts file for setting the security contexts to files in this APEX
|
||||||
// bundle. For platform APEXes, this should points to a file under /system/sepolicy Default:
|
// bundle. For platform APEXes, this should points to a file under /system/sepolicy Default:
|
||||||
@@ -104,7 +104,7 @@ type apexBundleProperties struct {
|
|||||||
// path_or_glob is a path or glob pattern for a file or set of files,
|
// path_or_glob is a path or glob pattern for a file or set of files,
|
||||||
// uid/gid are numerial values of user ID and group ID, mode is octal value
|
// uid/gid are numerial values of user ID and group ID, mode is octal value
|
||||||
// for the file mode, and cap is hexadecimal value for the capability.
|
// for the file mode, and cap is hexadecimal value for the capability.
|
||||||
Canned_fs_config *string `android:"path"`
|
Canned_fs_config proptools.Configurable[string] `android:"path,replace_instead_of_append"`
|
||||||
|
|
||||||
ApexNativeDependencies
|
ApexNativeDependencies
|
||||||
|
|
||||||
@@ -117,7 +117,8 @@ type apexBundleProperties struct {
|
|||||||
Bootclasspath_fragments []string
|
Bootclasspath_fragments []string
|
||||||
|
|
||||||
// List of systemserverclasspath fragments that are embedded inside this APEX bundle.
|
// List of systemserverclasspath fragments that are embedded inside this APEX bundle.
|
||||||
Systemserverclasspath_fragments []string
|
Systemserverclasspath_fragments proptools.Configurable[[]string]
|
||||||
|
ResolvedSystemserverclasspathFragments []string `blueprint:"mutated"`
|
||||||
|
|
||||||
// List of java libraries that are embedded inside this APEX bundle.
|
// List of java libraries that are embedded inside this APEX bundle.
|
||||||
Java_libs []string
|
Java_libs []string
|
||||||
@@ -840,11 +841,13 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.properties.ResolvedSystemserverclasspathFragments = a.properties.Systemserverclasspath_fragments.GetOrDefault(a.ConfigurableEvaluator(ctx), nil)
|
||||||
|
|
||||||
// Common-arch dependencies come next
|
// Common-arch dependencies come next
|
||||||
commonVariation := ctx.Config().AndroidCommonTarget.Variations()
|
commonVariation := ctx.Config().AndroidCommonTarget.Variations()
|
||||||
ctx.AddFarVariationDependencies(commonVariation, rroTag, a.properties.Rros...)
|
ctx.AddFarVariationDependencies(commonVariation, rroTag, a.properties.Rros...)
|
||||||
ctx.AddFarVariationDependencies(commonVariation, bcpfTag, a.properties.Bootclasspath_fragments...)
|
ctx.AddFarVariationDependencies(commonVariation, bcpfTag, a.properties.Bootclasspath_fragments...)
|
||||||
ctx.AddFarVariationDependencies(commonVariation, sscpfTag, a.properties.Systemserverclasspath_fragments...)
|
ctx.AddFarVariationDependencies(commonVariation, sscpfTag, a.properties.ResolvedSystemserverclasspathFragments...)
|
||||||
ctx.AddFarVariationDependencies(commonVariation, javaLibTag, a.properties.Java_libs...)
|
ctx.AddFarVariationDependencies(commonVariation, javaLibTag, a.properties.Java_libs...)
|
||||||
ctx.AddFarVariationDependencies(commonVariation, fsTag, a.properties.Filesystems...)
|
ctx.AddFarVariationDependencies(commonVariation, fsTag, a.properties.Filesystems...)
|
||||||
ctx.AddFarVariationDependencies(commonVariation, compatConfigTag, a.properties.Compat_configs...)
|
ctx.AddFarVariationDependencies(commonVariation, compatConfigTag, a.properties.Compat_configs...)
|
||||||
@@ -2806,7 +2809,7 @@ func isStaticExecutableAllowed(apex string, exec string) bool {
|
|||||||
func (a *apexBundle) IDEInfo(dpInfo *android.IdeInfo) {
|
func (a *apexBundle) IDEInfo(dpInfo *android.IdeInfo) {
|
||||||
dpInfo.Deps = append(dpInfo.Deps, a.properties.Java_libs...)
|
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.Bootclasspath_fragments...)
|
||||||
dpInfo.Deps = append(dpInfo.Deps, a.properties.Systemserverclasspath_fragments...)
|
dpInfo.Deps = append(dpInfo.Deps, a.properties.ResolvedSystemserverclasspathFragments...)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@@ -704,8 +704,9 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) {
|
|||||||
optFlags = append(optFlags, "--override_apk_package_name "+manifestPackageName)
|
optFlags = append(optFlags, "--override_apk_package_name "+manifestPackageName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if a.properties.AndroidManifest != nil {
|
androidManifest := a.properties.AndroidManifest.GetOrDefault(a.ConfigurableEvaluator(ctx), "")
|
||||||
androidManifestFile := android.PathForModuleSrc(ctx, proptools.String(a.properties.AndroidManifest))
|
if androidManifest != "" {
|
||||||
|
androidManifestFile := android.PathForModuleSrc(ctx, androidManifest)
|
||||||
|
|
||||||
if a.testApex {
|
if a.testApex {
|
||||||
androidManifestFile = markManifestTestOnly(ctx, androidManifestFile)
|
androidManifestFile = markManifestTestOnly(ctx, androidManifestFile)
|
||||||
@@ -1195,8 +1196,9 @@ func (a *apexBundle) buildCannedFsConfig(ctx android.ModuleContext, defaultReadO
|
|||||||
}
|
}
|
||||||
// Custom fs_config is "appended" to the last so that entries from the file are preferred
|
// Custom fs_config is "appended" to the last so that entries from the file are preferred
|
||||||
// over default ones set above.
|
// over default ones set above.
|
||||||
if a.properties.Canned_fs_config != nil {
|
customFsConfig := a.properties.Canned_fs_config.GetOrDefault(a.ConfigurableEvaluator(ctx), "")
|
||||||
cmd.Text("cat").Input(android.PathForModuleSrc(ctx, *a.properties.Canned_fs_config))
|
if customFsConfig != "" {
|
||||||
|
cmd.Text("cat").Input(android.PathForModuleSrc(ctx, customFsConfig))
|
||||||
}
|
}
|
||||||
cmd.Text(")").FlagWithOutput("> ", cannedFsConfig)
|
cmd.Text(")").FlagWithOutput("> ", cannedFsConfig)
|
||||||
builder.Build("generateFsConfig", fmt.Sprintf("Generating canned fs config for %s", a.BaseModuleName()))
|
builder.Build("generateFsConfig", fmt.Sprintf("Generating canned fs config for %s", a.BaseModuleName()))
|
||||||
|
Reference in New Issue
Block a user