Loading java/sdk_library.go +30 −2 Original line number Diff line number Diff line Loading @@ -471,8 +471,9 @@ func (paths *scopePaths) extractStubsSourceAndApiInfoFromApiStubsProvider(dep an type commonToSdkLibraryAndImportProperties struct { // The naming scheme to use for the components that this module creates. // // If not specified then it defaults to "default", which is currently the only // allowable value. // If not specified then it defaults to "default". The other allowable value is // "framework-modules" which matches the scheme currently used by framework modules // for the equivalent components represented as separate Soong modules. // // This is a temporary mechanism to simplify conversion from separate modules for each // component that follow a different naming pattern to the default one. Loading Loading @@ -503,6 +504,8 @@ func (c *commonToSdkLibraryAndImport) initCommonAfterDefaultsApplied(ctx android switch schemeProperty { case "default": c.namingScheme = &defaultNamingScheme{} case "framework-modules": c.namingScheme = &frameworkModulesNamingScheme{} default: ctx.PropertyErrorf("naming_scheme", "expected 'default' but was %q", schemeProperty) return false Loading Loading @@ -1198,6 +1201,31 @@ func (s *defaultNamingScheme) apiModuleName(scope *apiScope, baseName string) st var _ sdkLibraryComponentNamingScheme = (*defaultNamingScheme)(nil) type frameworkModulesNamingScheme struct { } func (s *frameworkModulesNamingScheme) moduleSuffix(scope *apiScope) string { suffix := scope.name if scope == apiScopeModuleLib { suffix = "module_libs_" } return suffix } func (s *frameworkModulesNamingScheme) stubsLibraryModuleName(scope *apiScope, baseName string) string { return fmt.Sprintf("%s-stubs-%sapi", baseName, s.moduleSuffix(scope)) } func (s *frameworkModulesNamingScheme) stubsSourceModuleName(scope *apiScope, baseName string) string { return fmt.Sprintf("%s-stubs-srcs-%sapi", baseName, s.moduleSuffix(scope)) } func (s *frameworkModulesNamingScheme) apiModuleName(scope *apiScope, baseName string) string { return fmt.Sprintf("%s-api-%sapi", baseName, s.moduleSuffix(scope)) } var _ sdkLibraryComponentNamingScheme = (*frameworkModulesNamingScheme)(nil) // java_sdk_library is a special Java library that provides optional platform APIs to apps. // In practice, it can be viewed as a combination of several modules: 1) stubs library that clients // are linked against to, 2) droiddoc module that internally generates API stubs source files, Loading Loading
java/sdk_library.go +30 −2 Original line number Diff line number Diff line Loading @@ -471,8 +471,9 @@ func (paths *scopePaths) extractStubsSourceAndApiInfoFromApiStubsProvider(dep an type commonToSdkLibraryAndImportProperties struct { // The naming scheme to use for the components that this module creates. // // If not specified then it defaults to "default", which is currently the only // allowable value. // If not specified then it defaults to "default". The other allowable value is // "framework-modules" which matches the scheme currently used by framework modules // for the equivalent components represented as separate Soong modules. // // This is a temporary mechanism to simplify conversion from separate modules for each // component that follow a different naming pattern to the default one. Loading Loading @@ -503,6 +504,8 @@ func (c *commonToSdkLibraryAndImport) initCommonAfterDefaultsApplied(ctx android switch schemeProperty { case "default": c.namingScheme = &defaultNamingScheme{} case "framework-modules": c.namingScheme = &frameworkModulesNamingScheme{} default: ctx.PropertyErrorf("naming_scheme", "expected 'default' but was %q", schemeProperty) return false Loading Loading @@ -1198,6 +1201,31 @@ func (s *defaultNamingScheme) apiModuleName(scope *apiScope, baseName string) st var _ sdkLibraryComponentNamingScheme = (*defaultNamingScheme)(nil) type frameworkModulesNamingScheme struct { } func (s *frameworkModulesNamingScheme) moduleSuffix(scope *apiScope) string { suffix := scope.name if scope == apiScopeModuleLib { suffix = "module_libs_" } return suffix } func (s *frameworkModulesNamingScheme) stubsLibraryModuleName(scope *apiScope, baseName string) string { return fmt.Sprintf("%s-stubs-%sapi", baseName, s.moduleSuffix(scope)) } func (s *frameworkModulesNamingScheme) stubsSourceModuleName(scope *apiScope, baseName string) string { return fmt.Sprintf("%s-stubs-srcs-%sapi", baseName, s.moduleSuffix(scope)) } func (s *frameworkModulesNamingScheme) apiModuleName(scope *apiScope, baseName string) string { return fmt.Sprintf("%s-api-%sapi", baseName, s.moduleSuffix(scope)) } var _ sdkLibraryComponentNamingScheme = (*frameworkModulesNamingScheme)(nil) // java_sdk_library is a special Java library that provides optional platform APIs to apps. // In practice, it can be viewed as a combination of several modules: 1) stubs library that clients // are linked against to, 2) droiddoc module that internally generates API stubs source files, Loading