diff options
| author | 2024-08-06 19:36:03 +0000 | |
|---|---|---|
| committer | 2024-08-06 19:36:03 +0000 | |
| commit | f5bf74f35db2c81023b33f6d0e3d929c8c77be6f (patch) | |
| tree | 2876c83384af811c1faa69f3505d34b5d7efa7d3 /java/sdk_library.go | |
| parent | 4f18cfdd7d1b1b5ad2130e4cf2a2c5c87ba33fb6 (diff) | |
| parent | d9279cd4769fefd74a737d5a712c61d01cbf4897 (diff) | |
Merge "Remove unused tagSplitter function" into main
Diffstat (limited to 'java/sdk_library.go')
| -rw-r--r-- | java/sdk_library.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index b45341ab4..a8cc1b81f 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -20,7 +20,6 @@ import ( "path" "path/filepath" "reflect" - "regexp" "sort" "strings" "sync" @@ -1046,28 +1045,6 @@ const ( annotationsComponentName = "annotations.zip" ) -// A regular expression to match tags that reference a specific stubs component. -// -// It will only match if given a valid scope and a valid component. It is verfy strict -// to ensure it does not accidentally match a similar looking tag that should be processed -// by the embedded Library. -var tagSplitter = func() *regexp.Regexp { - // Given a list of literal string items returns a regular expression that will - // match any one of the items. - choice := func(items ...string) string { - return `\Q` + strings.Join(items, `\E|\Q`) + `\E` - } - - // Regular expression to match one of the scopes. - scopesRegexp := choice(allScopeNames...) - - // Regular expression to match one of the components. - componentsRegexp := choice(stubsSourceComponentName, apiTxtComponentName, removedApiTxtComponentName, annotationsComponentName) - - // Regular expression to match any combination of one scope and one component. - return regexp.MustCompile(fmt.Sprintf(`^\.(%s)\.(%s)$`, scopesRegexp, componentsRegexp)) -}() - func (module *commonToSdkLibraryAndImport) setOutputFiles(ctx android.ModuleContext) { if module.doctagPaths != nil { ctx.SetOutputFiles(module.doctagPaths, ".doctags") |