Clean up apiLevelsGenerationFlags deps gathering
Restructures the code a little to make it clear that extensions directories are distinct from dessert release directories. Bug: 337836752 Test: m --no-skip-soong-tests nothing Change-Id: I8ad68f0d112e62f8f1ddda1b6718119fe18eb8a9
This commit is contained in:
@@ -648,16 +648,17 @@ func (d *Droidstubs) apiLevelsGenerationFlags(ctx android.ModuleContext, cmd *an
|
|||||||
// Grab the first extensions_dir and we find while scanning ExportedDroiddocDir.deps;
|
// Grab the first extensions_dir and we find while scanning ExportedDroiddocDir.deps;
|
||||||
// ideally this should be read from prebuiltApis.properties.Extensions_*
|
// ideally this should be read from prebuiltApis.properties.Extensions_*
|
||||||
for _, dep := range t.deps {
|
for _, dep := range t.deps {
|
||||||
|
// Check to see if it matches an extension first.
|
||||||
|
depBase := dep.Base()
|
||||||
if extRegex.MatchString(dep.String()) && d.properties.Extensions_info_file != nil {
|
if extRegex.MatchString(dep.String()) && d.properties.Extensions_info_file != nil {
|
||||||
if extensions_dir == "" {
|
if extensions_dir == "" {
|
||||||
extensions_dir = t.dir.String() + "/extensions"
|
extensions_dir = t.dir.String() + "/extensions"
|
||||||
}
|
}
|
||||||
cmd.Implicit(dep)
|
cmd.Implicit(dep)
|
||||||
}
|
} else if depBase == filename {
|
||||||
if dep.Base() == filename {
|
// Check to see if it matches a dessert release for an SDK, e.g. Android, Car, Wear, etc..
|
||||||
cmd.Implicit(dep)
|
cmd.Implicit(dep)
|
||||||
}
|
} else if filename != "android.jar" && depBase == "android.jar" {
|
||||||
if filename != "android.jar" && dep.Base() == "android.jar" {
|
|
||||||
// Metalava implicitly searches these patterns:
|
// Metalava implicitly searches these patterns:
|
||||||
// prebuilts/tools/common/api-versions/android-%/android.jar
|
// prebuilts/tools/common/api-versions/android-%/android.jar
|
||||||
// prebuilts/sdk/%/public/android.jar
|
// prebuilts/sdk/%/public/android.jar
|
||||||
|
Reference in New Issue
Block a user