summaryrefslogtreecommitdiff
path: root/android/sdk.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2022-11-25 12:48:20 +0000
committer Paul Duffin <paulduffin@google.com> 2022-12-12 17:33:06 +0000
commit2178762a8aa11aee7705723b12e98c3cead8204e (patch)
treefd47e16e9dec3cd5f053c51f6ee7b0ad5f2dba3a /android/sdk.go
parent458a15bd8af649af4f2d3752ba2e6d0d5c61350b (diff)
Remove SdkAware.SdkMemberComponentName
That method was provided to allow a java_sdk_library_import that was part of a versioned sdk snapshot to create the name of its component modules consistent with the way in which modules were named within the sdk snapshot. As versioned sdk snapshots have all been removed this is no longer necessary. Bug: 260237150 Test: m nothing Change-Id: Iee35abd6d210d9a33dfd8ef2f9c77a53329fda24
Diffstat (limited to 'android/sdk.go')
-rw-r--r--android/sdk.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/android/sdk.go b/android/sdk.go
index 5459a8aa0..b94217dfe 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -25,36 +25,6 @@ import (
// sdkAwareWithoutModule is provided simply to improve code navigation with the IDE.
type sdkAwareWithoutModule interface {
- // SdkMemberComponentName will return the name to use for a component of this module based on the
- // base name of this module.
- //
- // The baseName is the name returned by ModuleBase.BaseModuleName(), i.e. the name specified in
- // the name property in the .bp file so will not include the prebuilt_ prefix.
- //
- // The componentNameCreator is a func for creating the name of a component from the base name of
- // the module, e.g. it could just append ".component" to the name passed in.
- //
- // This is intended to be called by prebuilt modules that create component models. It is because
- // prebuilt module base names come in a variety of different forms:
- // * unversioned - this is the same as the source module.
- // * internal to an sdk - this is the unversioned name prefixed by the base name of the sdk
- // module.
- // * versioned - this is the same as the internal with the addition of an "@<version>" suffix.
- //
- // While this can be called from a source module in that case it will behave the same way as the
- // unversioned name and return the result of calling the componentNameCreator func on the supplied
- // base name.
- //
- // e.g. Assuming the componentNameCreator func simply appends ".component" to the name passed in
- // then this will work as follows:
- // * An unversioned name of "foo" will return "foo.component".
- // * An internal to the sdk name of "sdk_foo" will return "sdk_foo.component".
- // * A versioned name of "sdk_foo@current" will return "sdk_foo.component@current".
- //
- // Note that in the latter case the ".component" suffix is added before the version. Adding it
- // after would change the version.
- SdkMemberComponentName(baseName string, componentNameCreator func(string) string) string
-
sdkBase() *SdkBase
MakeMemberOf(sdk SdkRef)
IsInAnySdk() bool
@@ -168,18 +138,6 @@ func (s *SdkBase) sdkBase() *SdkBase {
return s
}
-func (s *SdkBase) SdkMemberComponentName(baseName string, componentNameCreator func(string) string) string {
- if s.MemberName() == "" {
- return componentNameCreator(baseName)
- } else {
- index := strings.LastIndex(baseName, "@")
- unversionedName := baseName[:index]
- unversionedComponentName := componentNameCreator(unversionedName)
- versionSuffix := baseName[index:]
- return unversionedComponentName + versionSuffix
- }
-}
-
// MakeMemberOf sets this module to be a member of a specific SDK
func (s *SdkBase) MakeMemberOf(sdk SdkRef) {
s.properties.ContainingSdk = &sdk