Merge "Fix mistake in disting of api txt" am: 89ee3e6394
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2059568 Change-Id: I62a1cc51023fc5f7441f0a9de4596015304d30af Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
53
api/api.go
53
api/api.go
@@ -27,6 +27,7 @@ import (
|
|||||||
const art = "art.module.public.api"
|
const art = "art.module.public.api"
|
||||||
const conscrypt = "conscrypt.module.public.api"
|
const conscrypt = "conscrypt.module.public.api"
|
||||||
const i18n = "i18n.module.public.api"
|
const i18n = "i18n.module.public.api"
|
||||||
|
|
||||||
var core_libraries_modules = []string{art, conscrypt, i18n}
|
var core_libraries_modules = []string{art, conscrypt, i18n}
|
||||||
|
|
||||||
// The intention behind this soong plugin is to generate a number of "merged"
|
// The intention behind this soong plugin is to generate a number of "merged"
|
||||||
@@ -92,6 +93,8 @@ type fgProps struct {
|
|||||||
type MergedTxtDefinition struct {
|
type MergedTxtDefinition struct {
|
||||||
// "current.txt" or "removed.txt"
|
// "current.txt" or "removed.txt"
|
||||||
TxtFilename string
|
TxtFilename string
|
||||||
|
// Filename in the new dist dir. "android.txt" or "android-removed.txt"
|
||||||
|
DistFilename string
|
||||||
// The module for the non-updatable / non-module part of the api.
|
// The module for the non-updatable / non-module part of the api.
|
||||||
BaseTxt string
|
BaseTxt string
|
||||||
// The list of modules that are relevant for this merged txt.
|
// The list of modules that are relevant for this merged txt.
|
||||||
@@ -112,7 +115,6 @@ func createMergedTxt(ctx android.LoadHookContext, txt MergedTxtDefinition) {
|
|||||||
if txt.Scope != "public" {
|
if txt.Scope != "public" {
|
||||||
filename = txt.Scope + "-" + filename
|
filename = txt.Scope + "-" + filename
|
||||||
}
|
}
|
||||||
|
|
||||||
props := genruleProps{}
|
props := genruleProps{}
|
||||||
props.Name = proptools.StringPtr(ctx.ModuleName() + "-" + filename)
|
props.Name = proptools.StringPtr(ctx.ModuleName() + "-" + filename)
|
||||||
props.Tools = []string{"metalava"}
|
props.Tools = []string{"metalava"}
|
||||||
@@ -126,9 +128,9 @@ func createMergedTxt(ctx android.LoadHookContext, txt MergedTxtDefinition) {
|
|||||||
Dest: proptools.StringPtr(filename),
|
Dest: proptools.StringPtr(filename),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Targets: []string{"sdk"},
|
Targets: []string{"api_txt", "sdk"},
|
||||||
Dir: proptools.StringPtr("apistubs/android/" + txt.Scope + "/api"),
|
Dir: proptools.StringPtr("apistubs/android/" + txt.Scope + "/api"),
|
||||||
Dest: proptools.StringPtr(txt.TxtFilename),
|
Dest: proptools.StringPtr(txt.DistFilename),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
props.Visibility = []string{"//visibility:public"}
|
props.Visibility = []string{"//visibility:public"}
|
||||||
@@ -242,34 +244,39 @@ func createMergedTxts(ctx android.LoadHookContext, bootclasspath, system_server_
|
|||||||
var textFiles []MergedTxtDefinition
|
var textFiles []MergedTxtDefinition
|
||||||
|
|
||||||
tagSuffix := []string{".api.txt}", ".removed-api.txt}"}
|
tagSuffix := []string{".api.txt}", ".removed-api.txt}"}
|
||||||
|
distFilename := []string{"android.txt", "android-removed.txt"}
|
||||||
for i, f := range []string{"current.txt", "removed.txt"} {
|
for i, f := range []string{"current.txt", "removed.txt"} {
|
||||||
textFiles = append(textFiles, MergedTxtDefinition{
|
textFiles = append(textFiles, MergedTxtDefinition{
|
||||||
TxtFilename: f,
|
TxtFilename: f,
|
||||||
BaseTxt: ":non-updatable-" + f,
|
DistFilename: distFilename[i],
|
||||||
Modules: bootclasspath,
|
BaseTxt: ":non-updatable-" + f,
|
||||||
ModuleTag: "{.public" + tagSuffix[i],
|
Modules: bootclasspath,
|
||||||
Scope: "public",
|
ModuleTag: "{.public" + tagSuffix[i],
|
||||||
|
Scope: "public",
|
||||||
})
|
})
|
||||||
textFiles = append(textFiles, MergedTxtDefinition{
|
textFiles = append(textFiles, MergedTxtDefinition{
|
||||||
TxtFilename: f,
|
TxtFilename: f,
|
||||||
BaseTxt: ":non-updatable-system-" + f,
|
DistFilename: distFilename[i],
|
||||||
Modules: bootclasspath,
|
BaseTxt: ":non-updatable-system-" + f,
|
||||||
ModuleTag: "{.system" + tagSuffix[i],
|
Modules: bootclasspath,
|
||||||
Scope: "system",
|
ModuleTag: "{.system" + tagSuffix[i],
|
||||||
|
Scope: "system",
|
||||||
})
|
})
|
||||||
textFiles = append(textFiles, MergedTxtDefinition{
|
textFiles = append(textFiles, MergedTxtDefinition{
|
||||||
TxtFilename: f,
|
TxtFilename: f,
|
||||||
BaseTxt: ":non-updatable-module-lib-" + f,
|
DistFilename: distFilename[i],
|
||||||
Modules: bootclasspath,
|
BaseTxt: ":non-updatable-module-lib-" + f,
|
||||||
ModuleTag: "{.module-lib" + tagSuffix[i],
|
Modules: bootclasspath,
|
||||||
Scope: "module-lib",
|
ModuleTag: "{.module-lib" + tagSuffix[i],
|
||||||
|
Scope: "module-lib",
|
||||||
})
|
})
|
||||||
textFiles = append(textFiles, MergedTxtDefinition{
|
textFiles = append(textFiles, MergedTxtDefinition{
|
||||||
TxtFilename: f,
|
TxtFilename: f,
|
||||||
BaseTxt: ":non-updatable-system-server-" + f,
|
DistFilename: distFilename[i],
|
||||||
Modules: system_server_classpath,
|
BaseTxt: ":non-updatable-system-server-" + f,
|
||||||
ModuleTag: "{.system-server" + tagSuffix[i],
|
Modules: system_server_classpath,
|
||||||
Scope: "system-server",
|
ModuleTag: "{.system-server" + tagSuffix[i],
|
||||||
|
Scope: "system-server",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
for _, txt := range textFiles {
|
for _, txt := range textFiles {
|
||||||
|
|||||||
Reference in New Issue
Block a user