Loading android/sdk_version.go +3 −3 Original line number Diff line number Diff line Loading @@ -87,13 +87,13 @@ func (k SdkKind) String() string { // JavaLibraryName returns the soong module containing the Java APIs of that API surface. func (k SdkKind) JavaLibraryName(c Config) string { name := k.defaultJavaLibraryName() return JavaLibraryNameFromText(c, name) return JavaApiLibraryName(c, name) } // JavaLibraryNameFromText returns the name of .txt equivalent of a java_library, but does // JavaApiLibraryName returns the name of .txt equivalent of a java_library, but does // not check if either module exists. // TODO: Return .txt (single-tree or multi-tree equivalents) based on config func JavaLibraryNameFromText(c Config, name string) string { func JavaApiLibraryName(c Config, name string) string { if c.BuildFromTextStub() { return name + ".from-text" } Loading java/bootclasspath_fragment.go +2 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,8 @@ func (b *BootclasspathFragmentModule) DepsMutator(ctx android.BottomUpMutatorCon for _, apiScope := range hiddenAPISdkLibrarySupportedScopes { // Add a dependency onto a possibly scope specific stub library. scopeSpecificDependency := apiScope.scopeSpecificStubModule(ctx, additionalStubModule) // Use JavaApiLibraryName function to be redirected to stubs generated from .txt if applicable scopeSpecificDependency = android.JavaApiLibraryName(ctx.Config(), scopeSpecificDependency) tag := hiddenAPIStubsDependencyTag{apiScope: apiScope, fromAdditionalDependency: true} ctx.AddVariationDependencies(nil, tag, scopeSpecificDependency) } Loading java/sdk_library.go +4 −1 Original line number Diff line number Diff line Loading @@ -1267,7 +1267,10 @@ var implLibraryTag = sdkLibraryComponentTag{name: "impl-library"} func (module *SdkLibrary) ComponentDepsMutator(ctx android.BottomUpMutatorContext) { for _, apiScope := range module.getGeneratedApiScopes(ctx) { // Add dependencies to the stubs library ctx.AddVariationDependencies(nil, apiScope.stubsTag, module.stubsLibraryModuleName(apiScope)) stubModuleName := module.stubsLibraryModuleName(apiScope) // Use JavaApiLibraryName function to be redirected to stubs generated from .txt if applicable stubModuleName = android.JavaApiLibraryName(ctx.Config(), stubModuleName) ctx.AddVariationDependencies(nil, apiScope.stubsTag, stubModuleName) // Add a dependency on the stubs source in order to access both stubs source and api information. ctx.AddVariationDependencies(nil, apiScope.stubsSourceAndApiTag, module.stubsSourceModuleName(apiScope)) Loading Loading
android/sdk_version.go +3 −3 Original line number Diff line number Diff line Loading @@ -87,13 +87,13 @@ func (k SdkKind) String() string { // JavaLibraryName returns the soong module containing the Java APIs of that API surface. func (k SdkKind) JavaLibraryName(c Config) string { name := k.defaultJavaLibraryName() return JavaLibraryNameFromText(c, name) return JavaApiLibraryName(c, name) } // JavaLibraryNameFromText returns the name of .txt equivalent of a java_library, but does // JavaApiLibraryName returns the name of .txt equivalent of a java_library, but does // not check if either module exists. // TODO: Return .txt (single-tree or multi-tree equivalents) based on config func JavaLibraryNameFromText(c Config, name string) string { func JavaApiLibraryName(c Config, name string) string { if c.BuildFromTextStub() { return name + ".from-text" } Loading
java/bootclasspath_fragment.go +2 −0 Original line number Diff line number Diff line Loading @@ -499,6 +499,8 @@ func (b *BootclasspathFragmentModule) DepsMutator(ctx android.BottomUpMutatorCon for _, apiScope := range hiddenAPISdkLibrarySupportedScopes { // Add a dependency onto a possibly scope specific stub library. scopeSpecificDependency := apiScope.scopeSpecificStubModule(ctx, additionalStubModule) // Use JavaApiLibraryName function to be redirected to stubs generated from .txt if applicable scopeSpecificDependency = android.JavaApiLibraryName(ctx.Config(), scopeSpecificDependency) tag := hiddenAPIStubsDependencyTag{apiScope: apiScope, fromAdditionalDependency: true} ctx.AddVariationDependencies(nil, tag, scopeSpecificDependency) } Loading
java/sdk_library.go +4 −1 Original line number Diff line number Diff line Loading @@ -1267,7 +1267,10 @@ var implLibraryTag = sdkLibraryComponentTag{name: "impl-library"} func (module *SdkLibrary) ComponentDepsMutator(ctx android.BottomUpMutatorContext) { for _, apiScope := range module.getGeneratedApiScopes(ctx) { // Add dependencies to the stubs library ctx.AddVariationDependencies(nil, apiScope.stubsTag, module.stubsLibraryModuleName(apiScope)) stubModuleName := module.stubsLibraryModuleName(apiScope) // Use JavaApiLibraryName function to be redirected to stubs generated from .txt if applicable stubModuleName = android.JavaApiLibraryName(ctx.Config(), stubModuleName) ctx.AddVariationDependencies(nil, apiScope.stubsTag, stubModuleName) // Add a dependency on the stubs source in order to access both stubs source and api information. ctx.AddVariationDependencies(nil, apiScope.stubsSourceAndApiTag, module.stubsSourceModuleName(apiScope)) Loading