Utilize from text core platform api surface jar in build

Use JavaApiLibraryName function to redirect the usage
of core platform api stubs from .txt files based on config.

Test: m --build-from-text-stub
Change-Id: I926a0a455fed301ba4ff9dfa509d4dbbbd076029
This commit is contained in:
Jihoon Kang
2023-03-29 23:25:49 +00:00
parent 7bfe443875
commit b507831b71
6 changed files with 27 additions and 10 deletions

View File

@@ -100,6 +100,15 @@ func JavaApiLibraryName(c Config, name string) string {
return name
}
// JavaApiLibraryNames applies JavaApiLibraryName to the list of java_library names.
func JavaApiLibraryNames(c Config, names []string) []string {
apiLibs := make([]string, len(names))
for i, name := range names {
apiLibs[i] = JavaApiLibraryName(c, name)
}
return apiLibs
}
func (k SdkKind) DefaultJavaLibraryName() string {
switch k {
case SdkPublic: