diff options
Diffstat (limited to 'api')
| -rw-r--r-- | api/Android.bp | 12 | ||||
| -rw-r--r-- | api/api.go | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/api/Android.bp b/api/Android.bp index 20528f2d67ee..4cb52bc2d29a 100644 --- a/api/Android.bp +++ b/api/Android.bp @@ -257,3 +257,15 @@ genrule { out: ["combined-removed-dex.txt"], cmd: "$(location gen_combined_removed_dex.sh) $(location metalava) $(genDir) $(in) > $(out)", } + +java_genrule { + name: "api_fingerprint", + srcs: [ + ":frameworks-base-api-current.txt", + ":frameworks-base-api-system-current.txt", + ":frameworks-base-api-module-lib-current.txt", + ":frameworks-base-api-system-server-current.txt", + ], + out: ["api_fingerprint.txt"], + cmd: "cat $(in) | md5sum | cut -d' ' -f1 > $(out)", +} diff --git a/api/api.go b/api/api.go index 25d97282035e..9876abb8ce36 100644 --- a/api/api.go +++ b/api/api.go @@ -418,7 +418,6 @@ type bazelCombinedApisAttributes struct { // combined_apis bp2build converter func (a *CombinedApis) ConvertWithBp2build(ctx android.TopDownMutatorContext) { basePrefix := "non-updatable" - scopeNames := []string{"public", "system", "module-lib", "system-server"} scopeToSuffix := map[string]string{ "public": "-current.txt", "system": "-system-current.txt", @@ -426,8 +425,7 @@ func (a *CombinedApis) ConvertWithBp2build(ctx android.TopDownMutatorContext) { "system-server": "-system-server-current.txt", } - for _, scopeName := range scopeNames{ - suffix := scopeToSuffix[scopeName] + for scopeName, suffix := range scopeToSuffix{ name := a.Name() + suffix var scope bazel.StringAttribute |