Use PathForSource instead of PathsForSource

This reapplies If1690a708393964d3030cb908beaf7b6897c0084.

PathForSource does the AllowMissingDependencies check now, use it
instead of PathsForSource.

Test: m checkbuild
Change-Id: I84868c92ee43779f9b5c8b285dac92f5f87b018c
This commit is contained in:
Colin Cross 2018-02-22 14:39:17 -08:00
parent 192e97a95c
commit 480cd76672
1 changed files with 3 additions and 5 deletions

View File

@ -374,10 +374,8 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
// templateDir (maybe missing) is relative to top of the source tree instead of current module.
templateDir := android.PathsForSource(ctx, []string{String(d.properties.Custom_template_dir)})
if len(templateDir) > 0 {
implicits = append(implicits, ctx.GlobFiles(filepath.Join(templateDir[0].String(), "**/*"), nil)...)
}
templateDir := android.PathForSource(ctx, String(d.properties.Custom_template_dir)).String()
implicits = append(implicits, ctx.GlobFiles(filepath.Join(templateDir, "**/*"), nil)...)
var htmlDirArgs string
if len(d.properties.Html_dirs) > 0 {
@ -420,7 +418,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
opts := "-source 1.8 -J-Xmx1600m -J-XX:-OmitStackTraceInFastThrow -XDignore.symbol.file " +
"-doclet com.google.doclava.Doclava -docletpath ${config.JsilverJar}:${config.DoclavaJar} " +
"-templatedir " + String(d.properties.Custom_template_dir) + " " + htmlDirArgs + " " + htmlDir2Args + " " +
"-templatedir " + templateDir + " " + htmlDirArgs + " " + htmlDir2Args + " " +
"-hdf page.build " + ctx.Config().BuildId() + "-" + ctx.Config().BuildNumberFromFile() + " " +
"-hdf page.now " + `"$$(date -d @$$(cat ` + ctx.Config().Getenv("BUILD_DATETIME_FILE") + `) "+%d %b %Y %k:%M")"` + " " +
args + " -stubs " + android.PathForModuleOut(ctx, "docs", "stubsDir").String()