Loading apex/apex.go +31 −14 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ type apexBundleProperties struct { // List of prebuilt files that are embedded inside this APEX bundle. Prebuilts []string // List of platform_compat_config files that are embedded inside this APEX bundle. Compat_configs []string // List of BPF programs inside this APEX bundle. Bpfs []string Loading Loading @@ -555,6 +558,7 @@ var ( executableTag = dependencyTag{name: "executable", payload: true} fsTag = dependencyTag{name: "filesystem", payload: true} bootImageTag = dependencyTag{name: "bootImage", payload: true} compatConfigsTag = dependencyTag{name: "compatConfig", payload: true} javaLibTag = dependencyTag{name: "javaLib", payload: true} jniLibTag = dependencyTag{name: "jniLib", payload: true} keyTag = dependencyTag{name: "key"} Loading Loading @@ -731,6 +735,13 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) { {Mutator: "arch", Variation: archForPrebuiltEtc.String()}, }, prebuiltTag, a.properties.Prebuilts...) // Add dependency on platform_compat_configs. // TODO(b/182816033) - make this common-arch once all usages have been migrated. ctx.AddFarVariationDependencies([]blueprint.Variation{ {Mutator: "os", Variation: ctx.Os().String()}, {Mutator: "arch", Variation: archForPrebuiltEtc.String()}, }, compatConfigsTag, a.properties.Compat_configs...) // Common-arch dependencies come next commonVariation := ctx.Config().AndroidCommonTarget.Variations() ctx.AddFarVariationDependencies(commonVariation, bootImageTag, a.properties.Boot_images...) Loading Loading @@ -1740,6 +1751,12 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { } else { ctx.PropertyErrorf("prebuilts", "%q is not a prebuilt_etc and not a platform_compat_config module", depName) } case compatConfigsTag: if compatConfig, ok := child.(java.PlatformCompatConfigIntf); ok { filesInfo = append(filesInfo, apexFileForCompatConfig(ctx, compatConfig, depName)) } else { ctx.PropertyErrorf("compat_configs", "%q is not a platform_compat_config module", depName) } case testTag: if ccTest, ok := child.(*cc.Module); ok { if ccTest.IsTestPerSrcAllTestsVariation() { Loading apex/apex_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -5995,7 +5995,7 @@ func TestCompatConfig(t *testing.T) { apex { name: "myapex", key: "myapex.key", prebuilts: ["myjar-platform-compat-config"], compat_configs: ["myjar-platform-compat-config"], java_libs: ["myjar"], updatable: false, } Loading Loading
apex/apex.go +31 −14 Original line number Diff line number Diff line Loading @@ -102,6 +102,9 @@ type apexBundleProperties struct { // List of prebuilt files that are embedded inside this APEX bundle. Prebuilts []string // List of platform_compat_config files that are embedded inside this APEX bundle. Compat_configs []string // List of BPF programs inside this APEX bundle. Bpfs []string Loading Loading @@ -555,6 +558,7 @@ var ( executableTag = dependencyTag{name: "executable", payload: true} fsTag = dependencyTag{name: "filesystem", payload: true} bootImageTag = dependencyTag{name: "bootImage", payload: true} compatConfigsTag = dependencyTag{name: "compatConfig", payload: true} javaLibTag = dependencyTag{name: "javaLib", payload: true} jniLibTag = dependencyTag{name: "jniLib", payload: true} keyTag = dependencyTag{name: "key"} Loading Loading @@ -731,6 +735,13 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) { {Mutator: "arch", Variation: archForPrebuiltEtc.String()}, }, prebuiltTag, a.properties.Prebuilts...) // Add dependency on platform_compat_configs. // TODO(b/182816033) - make this common-arch once all usages have been migrated. ctx.AddFarVariationDependencies([]blueprint.Variation{ {Mutator: "os", Variation: ctx.Os().String()}, {Mutator: "arch", Variation: archForPrebuiltEtc.String()}, }, compatConfigsTag, a.properties.Compat_configs...) // Common-arch dependencies come next commonVariation := ctx.Config().AndroidCommonTarget.Variations() ctx.AddFarVariationDependencies(commonVariation, bootImageTag, a.properties.Boot_images...) Loading Loading @@ -1740,6 +1751,12 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { } else { ctx.PropertyErrorf("prebuilts", "%q is not a prebuilt_etc and not a platform_compat_config module", depName) } case compatConfigsTag: if compatConfig, ok := child.(java.PlatformCompatConfigIntf); ok { filesInfo = append(filesInfo, apexFileForCompatConfig(ctx, compatConfig, depName)) } else { ctx.PropertyErrorf("compat_configs", "%q is not a platform_compat_config module", depName) } case testTag: if ccTest, ok := child.(*cc.Module); ok { if ccTest.IsTestPerSrcAllTestsVariation() { Loading
apex/apex_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -5995,7 +5995,7 @@ func TestCompatConfig(t *testing.T) { apex { name: "myapex", key: "myapex.key", prebuilts: ["myjar-platform-compat-config"], compat_configs: ["myjar-platform-compat-config"], java_libs: ["myjar"], updatable: false, } Loading