diff options
| author | 2020-02-21 16:55:46 -0800 | |
|---|---|---|
| committer | 2020-02-28 18:16:56 +0000 | |
| commit | 2a2e0db2a2ebc75d5f8dea674c84c2019530a543 (patch) | |
| tree | e4cd2cbc84e6ced67ad1095597551b44e97532fd /java | |
| parent | da71eda20dd26b507cea4e7f886011ed74c067ab (diff) | |
Add an order-only dependency on the build number file
Remote execution and other tools can be confused by references to
build_number.txt without a dependency. Add an order-only dependency,
which maintains the current behavior.
Test: BUILD_NUMBER=1 && m aapt && aapt version # shows 1
BUILD_NUMBER=2 && m aapt && aapt version # shows 1
rm out/soong/.intermediates/frameworks/base/tools/aapt/aapt/linux_glibc_x86_64/aapt
BUILD_NUMBER=2 && m aapt && aapt version # shows 2
Change-Id: Icfa98d6840b1dc2e273ba29c33011635d1cf93b1
Diffstat (limited to 'java')
| -rw-r--r-- | java/droiddoc.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/droiddoc.go b/java/droiddoc.go index fd4b90df3..543749983 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -773,6 +773,7 @@ func (d *Droiddoc) DepsMutator(ctx android.BottomUpMutatorContext) { } func (d *Droiddoc) doclavaDocsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand, docletPath classpath) { + buildNumberFile := ctx.Config().BuildNumberFile(ctx) // Droiddoc always gets "-source 1.8" because it doesn't support 1.9 sources. For modules with 1.9 // sources, droiddoc will get sources produced by metalava which will have already stripped out the // 1.9 language features. @@ -782,7 +783,7 @@ func (d *Droiddoc) doclavaDocsFlags(ctx android.ModuleContext, cmd *android.Rule Flag("-XDignore.symbol.file"). FlagWithArg("-doclet ", "com.google.doclava.Doclava"). FlagWithInputList("-docletpath ", docletPath.Paths(), ":"). - FlagWithArg("-hdf page.build ", ctx.Config().BuildId()+"-"+ctx.Config().BuildNumberFromFile()). + FlagWithArg("-hdf page.build ", ctx.Config().BuildId()+"-$(cat "+buildNumberFile.String()+")").OrderOnly(buildNumberFile). FlagWithArg("-hdf page.now ", `"$(date -d @$(cat `+ctx.Config().Getenv("BUILD_DATETIME_FILE")+`) "+%d %b %Y %k:%M")" `) if String(d.properties.Custom_template) == "" { |