Add UnsupportedAppUsage to java_aconfig_library dependency

Generated flag requires UnsupportedAppUsage annotation to expose the
flag to CTS tests.

Bug: 301272559
Test: presubit
Ignore-AOSP-First: Need to commit with changes in internal main. This
change will be cherry picked to AOSP once merged in main
Change-Id: I90c87596ca80766ece429ddee1b45723b01d2760
This commit is contained in:
Zhi Dou 2023-10-06 07:21:52 +00:00
parent a54231425c
commit ea769bc5ec
2 changed files with 3 additions and 0 deletions

View file

@ -58,6 +58,8 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) DepsMutator(module *ja
// Add aconfig-annotations-lib as a dependency for the optimization / code stripping annotations
module.AddSharedLibrary("aconfig-annotations-lib")
// TODO(b/303773055): Remove the annotation after access issue is resolved.
module.AddSharedLibrary("unsupportedappusage")
}
func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(module *java.GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path {

View file

@ -410,6 +410,7 @@ func gatherRequiredDepsForTest() string {
"stub-annotations",
"aconfig-annotations-lib",
"unsupportedappusage",
}
for _, extra := range extraModules {