aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-12 02:23:27 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-12 02:23:27 +0000
commitbb5f46c02683d770b66dc4a6384dd382cc2d217e (patch)
tree9a1b9465c5e708af4b2c8c8040330f1c2365d304
parent181372588167f9fbc84955905b1147f14df19279 (diff)
parent2ea38b806edf0288f749e1f71c07a4123ca15295 (diff)
downloadaidl-android14-qpr2-s1-release.tar.gz
Change-Id: I054ddbd56bfc803326c082129cb3bbd4e5854e98
-rw-r--r--build/Android.bp2
-rw-r--r--build/aidl_gen_rule.go18
-rw-r--r--build/aidl_interface.go278
-rw-r--r--build/aidl_interface_backends.go58
-rw-r--r--build/aidl_interface_bp2build_test.go560
-rw-r--r--build/go.mod2
-rw-r--r--build/go.work2
-rw-r--r--build/properties.go8
-rw-r--r--build/tests_bp2build/Android.bp92
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash1
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash1
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash1
-rw-r--r--build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl37
-rw-r--r--build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl37
-rw-r--r--build/tests_bp2build/src/a/b/AB.aidl21
-rw-r--r--build/tests_bp2build/src/a/b/AB2.aidl21
-rw-r--r--build/tests_bp2build/src/android/Test.java23
-rw-r--r--build/tests_bp2build/src/c/d/CD.aidl24
-rw-r--r--build/tests_bp2build/src/c/d/CD2.aidl24
24 files changed, 9 insertions, 1391 deletions
diff --git a/build/Android.bp b/build/Android.bp
index 8cad7cd9..836a7763 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -29,7 +29,6 @@ bootstrap_go_package {
"soong",
"soong-android",
"soong-aidl-library",
- "soong-bp2build",
"soong-cc",
"soong-genrule",
"soong-phony",
@@ -50,7 +49,6 @@ bootstrap_go_package {
],
testSrcs: [
"aidl_test.go",
- "aidl_interface_bp2build_test.go",
],
pluginFor: ["soong_build"],
}
diff --git a/build/aidl_gen_rule.go b/build/aidl_gen_rule.go
index 32605d1e..ae329509 100644
--- a/build/aidl_gen_rule.go
+++ b/build/aidl_gen_rule.go
@@ -17,8 +17,6 @@ package aidl
import (
"android/soong/android"
"android/soong/genrule"
- "android/soong/ui/metrics/bp2build_metrics_proto"
- "fmt"
"strconv"
"path/filepath"
@@ -98,7 +96,6 @@ type aidlGenProperties struct {
type aidlGenRule struct {
android.ModuleBase
- android.BazelModuleBase
properties aidlGenProperties
@@ -375,24 +372,9 @@ func (g *aidlGenRule) GeneratedHeaderDirs() android.Paths {
func (g *aidlGenRule) DepsMutator(ctx android.BottomUpMutatorContext) {
ctx.AddReverseDependency(ctx.Module(), nil, aidlMetadataSingletonName)
}
-
-func (g *aidlGenRule) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
- aidlLang := g.properties.Lang
- switch aidlLang {
- case langCpp, langNdk:
- panic(fmt.Errorf("Conversion of %q is handled via macros in Bazel", ctx.ModuleName()))
- case langJava:
- // TODO: b/285574832 - re-enable Java backend
- fallthrough
- default:
- ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, fmt.Sprintf("Lang: %q", aidlLang))
- }
-}
-
func aidlGenFactory() android.Module {
g := &aidlGenRule{}
g.AddProperties(&g.properties)
android.InitAndroidModule(g)
- android.InitBazelModule(g)
return g
}
diff --git a/build/aidl_interface.go b/build/aidl_interface.go
index c3f0b832..5a2a227b 100644
--- a/build/aidl_interface.go
+++ b/build/aidl_interface.go
@@ -16,11 +16,9 @@ package aidl
import (
"android/soong/android"
- "android/soong/bazel"
"android/soong/cc"
"android/soong/java"
"android/soong/rust"
- "android/soong/ui/metrics/bp2build_metrics_proto"
"fmt"
"path/filepath"
@@ -60,7 +58,6 @@ func init() {
pctx.SourcePathVariable("aidlRustGlueCmd", "system/tools/aidl/build/aidl_rust_glue.py")
android.RegisterModuleType("aidl_interface", AidlInterfaceFactory)
android.PreArchMutators(registerPreArchMutators)
- android.PreArchBp2BuildMutators(registerPreArchMutators)
android.PostDepsMutators(registerPostDepsMutators)
}
@@ -448,7 +445,6 @@ type aidlInterfaceProperties struct {
type aidlInterface struct {
android.ModuleBase
- android.BazelModuleBase
android.DefaultableModuleBase
properties aidlInterfaceProperties
@@ -977,29 +973,20 @@ func aidlInterfaceHook(mctx android.DefaultableHookContext, i *aidlInterface) {
shouldGenerateLangBackendMap[langNdkPlatform] = i.shouldGenerateNdkBackend()
}
- var bp2build bool
- // TODO: b/295566168 - this will need to change once build files are checked in to account for
- // checked in modules in mixed builds
- if b, ok := mctx.Module().(android.Bazelable); ok {
- bp2build = b.ShouldConvertWithBp2build(mctx)
- } else {
- panic(fmt.Errorf("aidlInterface must support Bazelable"))
- }
-
for lang, shouldGenerate := range shouldGenerateLangBackendMap {
if !shouldGenerate {
continue
}
- libs = append(libs, addLibrary(mctx, i, nextVersion, lang, requireFrozenVersion, requireFrozenReason, bp2build))
+ libs = append(libs, addLibrary(mctx, i, nextVersion, lang, requireFrozenVersion, requireFrozenReason))
for _, version := range versions {
- libs = append(libs, addLibrary(mctx, i, version, lang, false, "this is a known frozen version", bp2build))
+ libs = append(libs, addLibrary(mctx, i, version, lang, false, "this is a known frozen version"))
}
}
// In the future, we may want to force the -cpp backend to be on host,
// and limit its visibility, even if it's not created normally
if i.shouldGenerateCppBackend() && len(i.properties.Imports) == 0 {
- libs = append(libs, addLibrary(mctx, i, nextVersion, langCppAnalyzer, false, "analysis always uses latest version even if frozen", bp2build))
+ libs = append(libs, addLibrary(mctx, i, nextVersion, langCppAnalyzer, false, "analysis always uses latest version even if frozen"))
}
if unstable {
@@ -1013,14 +1000,12 @@ func aidlInterfaceHook(mctx android.DefaultableHookContext, i *aidlInterface) {
addApiModule(mctx, i)
}
- // Reserve this module name for future use, and make it responsible for
- // generating a Bazel definition.
+ // Reserve this module name for future use.
factoryFunc := func() android.Module {
result := &phonyAidlInterface{
origin: i,
}
android.InitAndroidModule(result)
- android.InitBazelModule(result)
return result
}
mctx.CreateModule(factoryFunc, &phonyProperties{
@@ -1036,7 +1021,6 @@ func (p *phonyAidlInterface) GenerateAndroidBuildActions(_ android.ModuleContext
type phonyAidlInterface struct {
android.ModuleBase
- android.BazelModuleBase
origin *aidlInterface
}
@@ -1160,260 +1144,6 @@ func AidlInterfaceFactory() android.Module {
i.AddProperties(&i.properties)
android.InitAndroidModule(i)
android.InitDefaultableModule(i)
- android.InitBazelModule(i)
- android.AddBazelHandcraftedHook(i, func(ctx android.LoadHookContext) string {
- return strings.TrimSuffix(i.Name(), "_interface")
- })
i.SetDefaultableHook(func(ctx android.DefaultableHookContext) { aidlInterfaceHook(ctx, i) })
return i
}
-
-type aidlInterfaceAttributes struct {
- aidlLibraryAttributes
- Stability *string
- Versions_with_info []versionWithInfoAttribute
- Java_config *javaConfigAttributes
- Cpp_config *cppConfigAttributes
- Ndk_config *ndkConfigAttributes
- // Backend_Configs backendConfigAttributes
- Unstable *bool
- Frozen *bool
-}
-
-type javaConfigAttributes struct {
- commonBackendAttributes
-}
-type cppConfigAttributes struct {
- commonNativeBackendAttributes
-}
-type ndkConfigAttributes struct {
- commonNativeBackendAttributes
-}
-
-type commonBackendAttributes struct {
- Enabled bool
- Min_sdk_version *string
- Tags []string
-}
-
-type commonNativeBackendAttributes struct {
- commonBackendAttributes
- Additional_dynamic_deps bazel.LabelListAttribute
-}
-
-type versionWithInfoAttribute struct {
- Version string
- // Versions_with_info.Deps in Bazel is analogous to Versions_with_info.Imports in Soong.
- // Deps is chosen to be consistent with other Bazel rules/macros for AIDL
- Deps bazel.LabelListAttribute
-}
-
-type aidlLibraryAttributes struct {
- Srcs bazel.LabelListAttribute
- Hdrs bazel.LabelListAttribute
- Deps bazel.LabelListAttribute
- Strip_import_prefix *string
- Flags []string
-}
-
-// getBazelLabelListForImports returns a bazel label list converted from
-// aidl_interface.imports or aidl_interface.versions_with_info.imports prop
-func getBazelLabelListForImports(ctx android.Bp2buildMutatorContext, imports []string) bazel.LabelList {
- type nameAndVersion struct {
- name string
- version string
- }
- // An aidl_interface with a version designation doesn't correspond to a specific
- // module, but rather just imforms Soong on which collection of sources to provide
- // from a particular interface module.
- // However in Bazel, we will be creating an aidl_library for each version, so we can
- // depend directly on a "versioned" module. But, we must look up the "unversioned"
- // module name in BazelLabelForModuleDeps and then re-attach the version information.
- namesAndVersions := make([]nameAndVersion, len(imports))
- names := make([]string, len(imports))
- for i, dep := range imports {
- // Split dep into two parts
- name, version := parseModuleWithVersion(dep)
- if version == "" {
- version = "-latest"
- } else {
- version = "-V" + version
- }
- namesAndVersions[i] = nameAndVersion{
- name: name,
- version: version,
- }
- names[i] = name
- }
- // Look up bazel label by name without version
- bazelLabels := android.BazelLabelForModuleDeps(ctx, names)
- for i := range bazelLabels.Includes {
- // Re-attach the version to the name
- bazelLabels.Includes[i].Label = bazelLabels.Includes[i].Label + namesAndVersions[i].version
- }
- return bazelLabels
-}
-
-func (p *aidlInterface) ConvertWithBp2build(_ android.Bp2buildMutatorContext) {
- // aidlInterface should have a label set by its load hook; modules it creates
- // are responsible for generating the actual definition.
- panic("aidlInterface should always appear to have an existing label")
-}
-
-func (p *phonyAidlInterface) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) {
- i := p.origin
- var javaConfig *javaConfigAttributes
- var cppConfig *cppConfigAttributes
- var ndkConfig *ndkConfigAttributes
- var deps bazel.LabelListAttribute
-
- if i.shouldGenerateJavaBackend() {
- javaConfig = &javaConfigAttributes{}
- javaConfig.Enabled = true
- javaConfig.Min_sdk_version = i.minSdkVersion(langJava)
- javaConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, i.properties.Backend.Java.Apex_available)
- }
- if i.shouldGenerateCppBackend() {
- cppConfig = &cppConfigAttributes{}
- cppConfig.Enabled = true
- cppConfig.Min_sdk_version = i.minSdkVersion(langCpp)
- apexAvailable := i.properties.Backend.Cpp.Apex_available
- cppConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, apexAvailable)
- cppConfig.Additional_dynamic_deps = bazel.LabelListAttribute{}
- additionalSharedLabels := android.BazelLabelForModuleDeps(ctx, i.properties.Backend.Cpp.Additional_shared_libraries)
- for _, l := range additionalSharedLabels.Includes {
- dep, _ := ctx.ModuleFromName(l.OriginalModuleName)
- if c, ok := dep.(*cc.Module); !ok || !c.HasStubsVariants() {
- cppConfig.Additional_dynamic_deps.Add(bazel.MakeLabelAttribute(l.Label))
- }
- }
- cc.SetStubsForDynamicDeps(
- ctx,
- bazel.NoConfigAxis,
- "",
- apexAvailable,
- additionalSharedLabels,
- &cppConfig.Additional_dynamic_deps,
- &deps,
- 0,
- false,
- )
- }
- if i.shouldGenerateNdkBackend() {
- ndkConfig = &ndkConfigAttributes{}
- ndkConfig.Enabled = true
- ndkConfig.Min_sdk_version = i.minSdkVersion(langNdk)
- apexAvailable := i.properties.Backend.Ndk.Apex_available
- ndkConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, apexAvailable)
- ndkConfig.Additional_dynamic_deps = bazel.LabelListAttribute{}
- additionalSharedLabels := android.BazelLabelForModuleDeps(ctx, i.properties.Backend.Ndk.Additional_shared_libraries)
- for _, l := range additionalSharedLabels.Includes {
- dep, _ := ctx.ModuleFromName(l.OriginalModuleName)
- if c, ok := dep.(*cc.Module); !ok || !c.HasStubsVariants() {
- ndkConfig.Additional_dynamic_deps.Add(bazel.MakeLabelAttribute(l.Label))
- }
- }
- cc.SetStubsForDynamicDeps(
- ctx,
- bazel.NoConfigAxis,
- "",
- apexAvailable,
- additionalSharedLabels,
- &ndkConfig.Additional_dynamic_deps,
- &deps,
- 0,
- false,
- )
- }
-
- imports := getBazelLabelListForImports(ctx, i.properties.Imports)
-
- var versionsWithInfos []versionWithInfoAttribute
-
- if len(i.properties.Versions_with_info) > 0 {
- for _, versionWithInfo := range i.properties.Versions_with_info {
- versionedImports := getBazelLabelListForImports(ctx, versionWithInfo.Imports)
- if !versionedImports.IsEmpty() {
- versionsWithInfos = append(
- versionsWithInfos,
- versionWithInfoAttribute{
- Version: versionWithInfo.Version,
- Deps: bazel.MakeLabelListAttribute(versionedImports),
- },
- )
- } else {
- versionsWithInfos = append(
- versionsWithInfos,
- versionWithInfoAttribute{
- Version: versionWithInfo.Version,
- },
- )
- }
- }
- } else if len(i.properties.Versions) > 0 {
- for _, version := range i.properties.Versions {
- if !imports.IsEmpty() {
- versionsWithInfos = append(
- versionsWithInfos,
- versionWithInfoAttribute{
- Version: version,
- Deps: bazel.MakeLabelListAttribute(imports),
- },
- )
- } else {
- versionsWithInfos = append(
- versionsWithInfos,
- versionWithInfoAttribute{
- Version: version,
- },
- )
- }
- }
- }
-
- if len(i.properties.Srcs) > 0 && !imports.IsEmpty() {
- // imports is only needed for (non-frozen) srcs
- // frozen verions use imports in versions_with_info
- deps = bazel.MakeLabelListAttribute(imports)
- }
-
- srcsAttr := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, i.properties.Srcs))
- var stripImportPrefixAttr *string = nil
- if i.properties.Local_include_dir != "" && !srcsAttr.IsEmpty() {
- stripImportPrefixAttr = &i.properties.Local_include_dir
- }
-
- if len(i.properties.Include_dirs) != 0 {
- // TODO(b/298246873) remove include_dirs property from aidl_interface
- ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "include_dirs not supported")
- return
- }
-
- attrs := &aidlInterfaceAttributes{
- aidlLibraryAttributes: aidlLibraryAttributes{
- Srcs: srcsAttr,
- Flags: i.properties.Flags,
- Deps: deps,
- Hdrs: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, i.properties.Headers)),
- Strip_import_prefix: stripImportPrefixAttr,
- },
- Stability: i.properties.Stability,
- Versions_with_info: versionsWithInfos,
- Java_config: javaConfig,
- Cpp_config: cppConfig,
- Ndk_config: ndkConfig,
- Unstable: i.properties.Unstable,
- Frozen: i.properties.Frozen,
- }
-
- interfaceName := strings.TrimSuffix(i.Name(), "_interface")
-
- ctx.CreateBazelTargetModule(
- bazel.BazelTargetModuleProperties{
- Rule_class: "aidl_interface",
- Bzl_load_location: "//build/bazel/rules/aidl:aidl_interface.bzl",
- },
- android.CommonAttributes{Name: interfaceName},
- attrs,
- )
-}
diff --git a/build/aidl_interface_backends.go b/build/aidl_interface_backends.go
index b3cae3fa..a7653d68 100644
--- a/build/aidl_interface_backends.go
+++ b/build/aidl_interface_backends.go
@@ -27,21 +27,21 @@ import (
"github.com/google/blueprint/proptools"
)
-func addLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang string, notFrozen bool, requireFrozenReason string, bp2build bool) string {
+func addLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang string, notFrozen bool, requireFrozenReason string) string {
if lang == langJava {
- return addJavaLibrary(mctx, i, version, notFrozen, requireFrozenReason, bp2build)
+ return addJavaLibrary(mctx, i, version, notFrozen, requireFrozenReason)
} else if lang == langRust {
return addRustLibrary(mctx, i, version, notFrozen, requireFrozenReason)
} else if lang == langCppAnalyzer {
return addCppAnalyzerLibrary(mctx, i, version, notFrozen, requireFrozenReason)
} else if lang == langCpp || lang == langNdk || lang == langNdkPlatform {
- return addCppLibrary(mctx, i, version, lang, notFrozen, requireFrozenReason, bp2build)
+ return addCppLibrary(mctx, i, version, lang, notFrozen, requireFrozenReason)
} else {
panic(fmt.Errorf("unsupported language backend %q\n", lang))
}
}
-func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang string, notFrozen bool, requireFrozenReason string, bp2build bool) string {
+func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang string, notFrozen bool, requireFrozenReason string) string {
cppSourceGen := i.versionedName(version) + "-" + lang + "-source"
cppModuleGen := i.versionedName(version) + "-" + lang
@@ -76,15 +76,6 @@ func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versio
genLog := proptools.Bool(commonProperties.Gen_log)
genTrace := i.genTrace(lang)
- var cppGenLabel, cppLabel *string
- var bp2buildAvailable *bool
- if bp2build {
- cppGenLabel = proptools.StringPtr(fmt.Sprintf("//%s:%s", mctx.ModuleDir(), cppSourceGen))
- cppLabel = proptools.StringPtr(fmt.Sprintf("//%s:%s", mctx.ModuleDir(), cppModuleGen))
- } else {
- bp2buildAvailable = proptools.BoolPtr(false)
- }
-
mctx.CreateModule(aidlGenFactory, &nameProperties{
Name: proptools.StringPtr(cppSourceGen),
}, &aidlGenProperties{
@@ -104,12 +95,6 @@ func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versio
RequireFrozenReason: requireFrozenReason,
Flags: i.flagsForAidlGenRule(version),
},
- &bazelProperties{
- &Bazel_module{
- Label: cppGenLabel,
- Bp2build_available: bp2buildAvailable,
- },
- },
)
importExportDependencies := []string{}
@@ -222,17 +207,6 @@ func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versio
}, &i.properties.VndkProperties,
&commonProperties.VndkProperties,
&overrideVndkProperties,
- // the logic to create implementation libraries has been reimplemented
- // in a Bazel macro, so these libraries should not be converted with
- // bp2build
- // TODO(b/237810289) perhaps do something different here so that we aren't
- // also disabling these modules in mixed builds
- &bazelProperties{
- &Bazel_module{
- Label: cppLabel,
- Bp2build_available: bp2buildAvailable,
- },
- },
},
})
@@ -316,12 +290,6 @@ func addCppAnalyzerLibrary(mctx android.DefaultableHookContext, i *aidlInterface
"-clang-analyzer-optin.performance.Padding", // b/253079031
},
},
- // TODO(b/237810289) disable converting -cpp-analyzer module in bp2build
- &bazelProperties{
- &Bazel_module{
- Bp2build_available: proptools.BoolPtr(false),
- },
- },
},
}
@@ -329,7 +297,7 @@ func addCppAnalyzerLibrary(mctx android.DefaultableHookContext, i *aidlInterface
return cppAnalyzerModuleGen
}
-func addJavaLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, notFrozen bool, requireFrozenReason string, bp2build bool) string {
+func addJavaLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, notFrozen bool, requireFrozenReason string) string {
javaSourceGen := i.versionedName(version) + "-java-source"
javaModuleGen := i.versionedName(version) + "-java"
srcs, aidlRoot := i.srcsForVersion(mctx, version)
@@ -371,12 +339,6 @@ func addJavaLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versi
Flags: i.flagsForAidlGenRule(version),
})
- var javaLabel *string
- // TODO: b/285574832 - re-enable Java backend
- if false && bp2build {
- javaLabel = proptools.StringPtr(fmt.Sprintf("//%s:%s", mctx.ModuleDir(), javaModuleGen))
- }
-
mctx.CreateModule(aidlImplementationGeneratorFactory, &nameProperties{
Name: proptools.StringPtr(javaModuleGen + "-generator"),
}, &aidlImplementationGeneratorProperties{
@@ -397,16 +359,6 @@ func addJavaLibrary(mctx android.DefaultableHookContext, i *aidlInterface, versi
Static_libs: i.properties.Backend.Java.Additional_libs,
},
&i.properties.Backend.Java.LintProperties,
- // the logic to create implementation libraries has been reimplemented
- // in a Bazel macro, so these libraries should not be converted with
- // bp2build
- // TODO(b/237810289) perhaps do something different here so that we aren't
- // also disabling these modules in mixed builds
- &bazelProperties{
- &Bazel_module{
- Label: javaLabel,
- },
- },
},
})
diff --git a/build/aidl_interface_bp2build_test.go b/build/aidl_interface_bp2build_test.go
deleted file mode 100644
index 3a84116a..00000000
--- a/build/aidl_interface_bp2build_test.go
+++ /dev/null
@@ -1,560 +0,0 @@
-package aidl
-
-import (
- "testing"
-
- "android/soong/aidl_library"
- "android/soong/android"
- "android/soong/bp2build"
- "android/soong/cc"
-)
-
-func runAidlInterfaceTestCase(t *testing.T, tc bp2build.Bp2buildTestCase) {
- t.Helper()
- tc.ExtraFixturePreparer = android.FixtureModifyContext(func(ctx *android.TestContext) {
- ctx.PreArchBp2BuildMutators(registerPreArchMutators)
- })
- bp2build.RunBp2BuildTestCase(
- t,
- func(ctx android.RegistrationContext) {
- ctx.RegisterModuleType("aidl_interface", AidlInterfaceFactory)
- ctx.RegisterModuleType("aidl_library", aidl_library.AidlLibraryFactory)
- ctx.RegisterModuleType("cc_library_shared", cc.LibrarySharedFactory)
- },
- tc,
- )
-}
-
-func TestAidlInterface(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface with single "latest" aidl_interface import`,
- Blueprint: `
- aidl_library {
- name: "aidl-interface-headers",
- }
- aidl_interface {
- name: "aidl-interface-import",
- versions: [
- "1",
- "2",
- ],
- }
- aidl_interface {
- name: "aidl-interface1",
- flags: ["-Wsomething"],
- imports: [
- "aidl-interface-import-V1",
- ],
- headers: [
- "aidl-interface-headers",
- ],
- versions: [
- "1",
- "2",
- "3",
- ],
- }`,
- ExpectedConvertedModules: []string{"aidl-interface1", "aidl-interface-headers", "aidl-interface-import"},
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_library", "aidl-interface-headers", bp2build.AttrNameToString{
- "tags": `["apex_available=//apex_available:anyapex"]`,
- }),
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface-import", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- "cpp_config": `{
- "enabled": True,
- }`,
- "ndk_config": `{
- "enabled": True,
- }`,
- "versions_with_info": `[
- {
- "version": "1",
- },
- {
- "version": "2",
- },
- ]`,
- }),
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- "cpp_config": `{
- "enabled": True,
- }`,
- "ndk_config": `{
- "enabled": True,
- }`,
- "hdrs": `[":aidl-interface-headers"]`,
- "flags": `["-Wsomething"]`,
- "versions_with_info": `[
- {
- "deps": [":aidl-interface-import-V1"],
- "version": "1",
- },
- {
- "deps": [":aidl-interface-import-V1"],
- "version": "2",
- },
- {
- "deps": [":aidl-interface-import-V1"],
- "version": "3",
- },
- ]`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithIncludeDirsNotGenerated(t *testing.T) {
- runAidlInterfaceTestCase(t,
- bp2build.Bp2buildTestCase{
- Description: `aidl_interface with include_dirs property does not generate a Bazel target`,
- Blueprint: `
- aidl_interface {
- name: "aidl-interface1",
- include_dirs: ["dir1"],
- }
- `,
- ExpectedBazelTargets: []string{},
- },
- )
-}
-
-func TestAidlInterfaceWithNoProperties(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface no properties set`,
- Blueprint: `
- aidl_interface {
- name: "aidl-interface1",
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- "cpp_config": `{
- "enabled": True,
- }`,
- "ndk_config": `{
- "enabled": True,
- }`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithDisabledBackends(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface with some backends disabled`,
- Blueprint: `
- aidl_interface {
- name: "aidl-interface1",
- backend: {
- ndk: {
- enabled: false,
- },
- cpp: {
- enabled: false,
- },
- },
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithVersionImport(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface with version aidl_interface import`,
- Blueprint: `
- aidl_interface {
- name: "aidl-interface-import",
- versions: [
- "1",
- "2",
- ],
- }
- aidl_interface {
- name: "aidl-interface1",
- imports: [
- "aidl-interface-import-V1",
- ],
- versions: [
- "1",
- "2",
- "3",
- ],
- }`,
- ExpectedConvertedModules: []string{"aidl-interface-import", "aidl-interface1"},
- ExpectedHandcraftedModules: []string{"aidl-interface1_interface"},
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface-import", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- "cpp_config": `{
- "enabled": True,
- }`,
- "ndk_config": `{
- "enabled": True,
- }`,
- "versions_with_info": `[
- {
- "version": "1",
- },
- {
- "version": "2",
- },
- ]`,
- }),
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- "cpp_config": `{
- "enabled": True,
- }`,
- "ndk_config": `{
- "enabled": True,
- }`,
- "versions_with_info": `[
- {
- "deps": [":aidl-interface-import-V1"],
- "version": "1",
- },
- {
- "deps": [":aidl-interface-import-V1"],
- "version": "2",
- },
- {
- "deps": [":aidl-interface-import-V1"],
- "version": "3",
- },
- ]`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithVersionedImport(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface with single versioned aidl_interface import`,
- Blueprint: `
- aidl_interface {
- name: "aidl-interface-import",
- versions: [
- "1",
- "2",
- ],
- }
- aidl_interface {
- name: "aidl-interface1",
- imports: [
- "aidl-interface-import-V2",
- ],
- versions: [
- "1",
- "2",
- "3",
- ],
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface-import", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- "cpp_config": `{
- "enabled": True,
- }`,
- "ndk_config": `{
- "enabled": True,
- }`,
- "versions_with_info": `[
- {
- "version": "1",
- },
- {
- "version": "2",
- },
- ]`,
- }),
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "java_config": `{
- "enabled": True,
- }`,
- "cpp_config": `{
- "enabled": True,
- }`,
- "ndk_config": `{
- "enabled": True,
- }`,
- "versions_with_info": `[
- {
- "deps": [":aidl-interface-import-V2"],
- "version": "1",
- },
- {
- "deps": [":aidl-interface-import-V2"],
- "version": "2",
- },
- {
- "deps": [":aidl-interface-import-V2"],
- "version": "3",
- },
- ]`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithCppAndNdkConfigs(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface with cpp and ndk configs`,
- Blueprint: `
- aidl_interface {
- name: "foo",
- backend: {
- java: {
- enabled: false,
- },
- cpp: {
- min_sdk_version: "2",
- },
- ndk: {
- min_sdk_version: "1",
- },
- }
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "foo", bp2build.AttrNameToString{
- "cpp_config": `{
- "enabled": True,
- "min_sdk_version": "2",
- }`,
- "ndk_config": `{
- "enabled": True,
- "min_sdk_version": "1",
- }`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithUnstablePropSet(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface with unstable prop set`,
- Blueprint: `
- aidl_interface {
- name: "foo",
- unstable: true,
- backend: {
- java: {
- enabled: false,
- },
- cpp: {
- enabled: false,
- },
- }
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "foo", bp2build.AttrNameToString{
- "unstable": "True",
- "ndk_config": `{
- "enabled": True,
- }`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithFrozenPropSet(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface with frozen prop set`,
- Blueprint: `
- aidl_interface {
- name: "foo",
- frozen: true,
- versions: ["1"],
- backend: {
- java: {
- enabled: false,
- },
- cpp: {
- enabled: false,
- },
- }
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "foo", bp2build.AttrNameToString{
- "frozen": "True",
- "versions_with_info": `[{
- "version": "1",
- }]`,
- "ndk_config": `{
- "enabled": True,
- }`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithApexAvailable(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface apex_available`,
- Blueprint: `
- aidl_interface {
- name: "aidl-interface1",
- backend: {
- java: {
- enabled: false,
- },
- cpp: {
- enabled: false,
- },
- ndk: {
- enabled: true,
- apex_available: [
- "com.android.abd",
- "//apex_available:platform",
- ],
- },
- }
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "ndk_config": `{
- "enabled": True,
- "tags": [
- "apex_available=com.android.abd",
- "apex_available=//apex_available:platform",
- ],
- }`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithAdditionalDynamicDeps(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface apex_available`,
- StubbedBuildDefinitions: []string{"shared_dep", "shared_stub_dep"},
- Blueprint: `
- cc_library_shared {
- name: "shared_dep",
- }
- cc_library_shared {
- name: "shared_stub_dep",
- stubs: {
- symbol_file: "libnativewindow.map.txt",
- versions: ["29"],
- },
- }
- aidl_interface {
- name: "aidl-interface1",
- backend: {
- java: {
- enabled: false,
- },
- cpp: {
- enabled: true,
- apex_available: ["com.android.myapex"],
- additional_shared_libraries: [
- "shared_dep",
- "shared_stub_dep",
- ],
- },
- ndk: {
- enabled: true,
- apex_available: ["com.android.myapex"],
- additional_shared_libraries: [
- "shared_dep",
- "shared_stub_dep",
- ],
- },
- }
- }`,
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "cpp_config": `{
- "additional_dynamic_deps": [":shared_dep"] + select({
- "//build/bazel/rules/apex:com.android.myapex": ["@api_surfaces//module-libapi/current:shared_stub_dep"],
- "//conditions:default": [":shared_stub_dep"],
- }),
- "enabled": True,
- "tags": ["apex_available=com.android.myapex"],
- }`,
- "ndk_config": `{
- "additional_dynamic_deps": [":shared_dep"] + select({
- "//build/bazel/rules/apex:com.android.myapex": ["@api_surfaces//module-libapi/current:shared_stub_dep"],
- "//conditions:default": [":shared_stub_dep"],
- }),
- "enabled": True,
- "tags": ["apex_available=com.android.myapex"],
- }`,
- }),
- },
- })
-}
-
-func TestAidlInterfaceWithCppBackend(t *testing.T) {
- runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
- Description: `aidl_interface apex_available`,
- Blueprint: `
- cc_library_shared {
- name: "shared_dep",
- }
- cc_library_shared {
- name: "shared_stub_dep",
- stubs: {
- symbol_file: "libnativewindow.map.txt",
- versions: ["29"],
- },
- }
- aidl_interface {
- name: "aidl-interface1",
- srcs: [
- "IFoo.aidl",
- ],
- backend: {
- java: {
- enabled: false,
- },
- cpp: {
- enabled: true,
- apex_available: ["com.android.myapex"],
- additional_shared_libraries: [
- "shared_dep",
- "shared_stub_dep",
- ],
- },
- ndk: {
- enabled: false,
- },
- }
- }`,
- StubbedBuildDefinitions: []string{"shared_dep", "shared_stub_dep"},
- ExpectedHandcraftedModules: []string{"aidl-interface1_interface", "aidl-interface1-V1-cpp"},
- ExpectedBazelTargets: []string{
- bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
- "cpp_config": `{
- "additional_dynamic_deps": [":shared_dep"] + select({
- "//build/bazel/rules/apex:com.android.myapex": ["@api_surfaces//module-libapi/current:shared_stub_dep"],
- "//conditions:default": [":shared_stub_dep"],
- }),
- "enabled": True,
- "tags": ["apex_available=com.android.myapex"],
- }`,
- "srcs": `["IFoo.aidl"]`,
- }),
- },
- })
-}
diff --git a/build/go.mod b/build/go.mod
index f8bb1c01..445a6f4a 100644
--- a/build/go.mod
+++ b/build/go.mod
@@ -6,7 +6,5 @@ require (
android/soong v0.0.0
github.com/google/blueprint v0.0.0
google.golang.org/protobuf v0.0.0
- prebuilts/bazel/common/proto/analysis_v2 v0.0.0
- prebuilts/bazel/common/proto/build v0.0.0
go.starlark.net v0.0.0
)
diff --git a/build/go.work b/build/go.work
index 7e3f386b..51a3347a 100644
--- a/build/go.work
+++ b/build/go.work
@@ -13,7 +13,5 @@ replace (
google.golang.org/protobuf v0.0.0 => ../../../../external/golang-protobuf
github.com/google/blueprint v0.0.0 => ../../../../build/blueprint
github.com/google/go-cmp v0.0.0 => ../../../../external/go-cmp
- prebuilts/bazel/common/proto/analysis_v2 v0.0.0 => ../../../../prebuilts/bazel/common/proto/analysis_v2
- prebuilts/bazel/common/proto/build v0.0.0 => ../../../../prebuilts/bazel/common/proto/build
go.starlark.net v0.0.0 => ../../../../external/starlark-go
)
diff --git a/build/properties.go b/build/properties.go
index 8b444510..1cc78604 100644
--- a/build/properties.go
+++ b/build/properties.go
@@ -107,14 +107,6 @@ type rustProperties struct {
Min_sdk_version *string
}
-type Bazel_module struct {
- Bp2build_available *bool
- Label *string
-}
-type bazelProperties struct {
- *Bazel_module
-}
-
type phonyProperties struct {
Name *string
Required []string
diff --git a/build/tests_bp2build/Android.bp b/build/tests_bp2build/Android.bp
deleted file mode 100644
index 8451a463..00000000
--- a/build/tests_bp2build/Android.bp
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (C) 2022 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "system_tools_aidl_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["system_tools_aidl_license"],
-}
-
-aidl_interface {
- name: "example-dep-aidl-interfaces",
- local_include_dir: "src",
- srcs: [
- "src/a/b/AB.aidl",
- ],
- backend: {
- java: {
- // TODO(b/285574832) reenable aidl tests
- enabled: false,
- min_sdk_version: "29",
- },
- ndk: {
- enabled: false,
- },
- cpp: {
- enabled: false,
- },
- },
- versions: [
- "1",
- ],
-
-}
-
-aidl_interface {
- name: "example-aidl-interfaces",
- local_include_dir: "src",
- srcs: [
- "src/c/d/CD.aidl",
- "src/c/d/CD2.aidl",
- ],
- backend: {
- java: {
- // TODO(b/285574832) reenable aidl tests
- enabled: false,
- min_sdk_version: "29",
- },
- ndk: {
- enabled: false,
- },
- cpp: {
- enabled: false,
- },
- },
- imports: ["example-dep-aidl-interfaces-V1"],
- versions: [
- "1",
- "2",
- ],
-}
-
-// TODO(b/285574832) reenable aidl tests
-//java_library {
-// name: "example-aidl-latest",
-// sdk_version: "system_current",
-// min_sdk_version: "29",
-// static_libs: [
-// "example-aidl-interfaces-V2-java",
-// ],
-//}
-//
-//java_library {
-// name: "example-aidl-test",
-// sdk_version: "system_current",
-// min_sdk_version: "29",
-// srcs: ["src/android/Test.java"],
-// static_libs: ["example-aidl-latest"],
-//}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash b/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash
deleted file mode 100644
index 0dc8683a..00000000
--- a/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash
+++ /dev/null
@@ -1 +0,0 @@
-75e4c4fe9993977f16577571a51e8f40468ab7bf
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl
deleted file mode 100644
index 412a2977..00000000
--- a/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package c.d;
-parcelable CD {
- int cd;
- a.b.AB ab;
-}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash
deleted file mode 100644
index f3406308..00000000
--- a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash
+++ /dev/null
@@ -1 +0,0 @@
-b40733528cd90cf1c4457b08e3be2cc05ea146bd
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl
deleted file mode 100644
index 412a2977..00000000
--- a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package c.d;
-parcelable CD {
- int cd;
- a.b.AB ab;
-}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl
deleted file mode 100644
index 392354c4..00000000
--- a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package c.d;
-parcelable CD2 {
- int cd;
- a.b.AB ab;
-}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl
deleted file mode 100644
index 412a2977..00000000
--- a/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package c.d;
-parcelable CD {
- int cd;
- a.b.AB ab;
-}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl
deleted file mode 100644
index 392354c4..00000000
--- a/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package c.d;
-parcelable CD2 {
- int cd;
- a.b.AB ab;
-}
diff --git a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash
deleted file mode 100644
index f76e0988..00000000
--- a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash
+++ /dev/null
@@ -1 +0,0 @@
-19b952f31738360300aa261bef511d97d6001196
diff --git a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl
deleted file mode 100644
index 52939572..00000000
--- a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package a.b;
-parcelable AB {
- int ab;
-}
diff --git a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl
deleted file mode 100644
index 52939572..00000000
--- a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-// the interface (from the latest frozen version), the build system will
-// prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package a.b;
-parcelable AB {
- int ab;
-}
diff --git a/build/tests_bp2build/src/a/b/AB.aidl b/build/tests_bp2build/src/a/b/AB.aidl
deleted file mode 100644
index 8665cbc4..00000000
--- a/build/tests_bp2build/src/a/b/AB.aidl
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package a.b;
-
-parcelable AB {
- int ab;
-}
diff --git a/build/tests_bp2build/src/a/b/AB2.aidl b/build/tests_bp2build/src/a/b/AB2.aidl
deleted file mode 100644
index 31d0cbc2..00000000
--- a/build/tests_bp2build/src/a/b/AB2.aidl
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package a.b;
-
-parcelable AB2 {
- int ab;
-}
diff --git a/build/tests_bp2build/src/android/Test.java b/build/tests_bp2build/src/android/Test.java
deleted file mode 100644
index 32389778..00000000
--- a/build/tests_bp2build/src/android/Test.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2022 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package android;
-
-import c.d.CD;
-import c.d.CD2;
-
-class Test {
- CD cd;
- CD2 cd2;
-}
diff --git a/build/tests_bp2build/src/c/d/CD.aidl b/build/tests_bp2build/src/c/d/CD.aidl
deleted file mode 100644
index 17a3af4e..00000000
--- a/build/tests_bp2build/src/c/d/CD.aidl
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package c.d;
-
-import a.b.AB;
-
-parcelable CD {
- int cd;
- AB ab;
-}
diff --git a/build/tests_bp2build/src/c/d/CD2.aidl b/build/tests_bp2build/src/c/d/CD2.aidl
deleted file mode 100644
index e10f9590..00000000
--- a/build/tests_bp2build/src/c/d/CD2.aidl
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package c.d;
-
-import a.b.AB;
-
-parcelable CD2 {
- int cd;
- AB ab;
-}