Rename apiScope.stubsTag

The different roles of stubs (e.g. dependency to java modules,
hiddenapi, dist to sdk snapshot) are now split to different set of stubs
(everything, exportable and eventually runtime), while a single set of
stubs are responsible for all roles for the prebuilt stubs. Thus, the
stubs from source are depending different stubs tag (e.g.
everythingStubsTag, exportableStubsTag), while the prebuilt stubs
utilize stubsTag. Given that this tag is only used for the prebuilt
stubs, it can be renamed to `stubsTag`.

Test: m nothing --no-skip-soong-tests
Bug: 319162970
Change-Id: Iacdf434fab6a403482fd2f1de24e6f260ad80756
This commit is contained in:
Jihoon Kang
2024-01-22 19:40:08 +00:00
parent 4509f502e5
commit b743155a26

View File

@@ -104,9 +104,8 @@ type apiScope struct {
// The name of the property in the java_sdk_library_import // The name of the property in the java_sdk_library_import
propertyName string propertyName string
// The tag to use to depend on the stubs library module if the parent module // The tag to use to depend on the prebuilt stubs library module
// does not differentiate everything and exportable stubs (e.g. sdk_library_import). prebuiltStubsTag scopeDependencyTag
stubsTag scopeDependencyTag
// The tag to use to depend on the everything stubs library module. // The tag to use to depend on the everything stubs library module.
everythingStubsTag scopeDependencyTag everythingStubsTag scopeDependencyTag
@@ -174,7 +173,7 @@ func initApiScope(scope *apiScope) *apiScope {
allScopeNames = append(allScopeNames, name) allScopeNames = append(allScopeNames, name)
scope.propertyName = strings.ReplaceAll(name, "-", "_") scope.propertyName = strings.ReplaceAll(name, "-", "_")
scope.fieldName = proptools.FieldNameForProperty(scope.propertyName) scope.fieldName = proptools.FieldNameForProperty(scope.propertyName)
scope.stubsTag = scopeDependencyTag{ scope.prebuiltStubsTag = scopeDependencyTag{
name: name + "-stubs", name: name + "-stubs",
apiScope: scope, apiScope: scope,
depInfoExtractor: (*scopePaths).extractStubsLibraryInfoFromDependency, depInfoExtractor: (*scopePaths).extractStubsLibraryInfoFromDependency,
@@ -2739,7 +2738,7 @@ func (module *SdkLibraryImport) ComponentDepsMutator(ctx android.BottomUpMutator
} }
// Add dependencies to the prebuilt stubs library // Add dependencies to the prebuilt stubs library
ctx.AddVariationDependencies(nil, apiScope.stubsTag, android.PrebuiltNameFromSource(module.stubsLibraryModuleName(apiScope))) ctx.AddVariationDependencies(nil, apiScope.prebuiltStubsTag, android.PrebuiltNameFromSource(module.stubsLibraryModuleName(apiScope)))
if len(scopeProperties.Stub_srcs) > 0 { if len(scopeProperties.Stub_srcs) > 0 {
// Add dependencies to the prebuilt stubs source library // Add dependencies to the prebuilt stubs source library