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
This commit is contained in:
Colin Cross
2020-02-21 16:55:46 -08:00
parent da71eda20d
commit 2a2e0db2a2
4 changed files with 12 additions and 10 deletions

View File

@@ -570,8 +570,8 @@ func (c *config) BuildId() string {
return String(c.productVariables.BuildId)
}
func (c *config) BuildNumberFromFile() string {
return String(c.productVariables.BuildNumberFromFile)
func (c *config) BuildNumberFile(ctx PathContext) Path {
return PathForOutput(ctx, String(c.productVariables.BuildNumberFile))
}
// DeviceName returns the name of the current device target