Merge "Call PackageFile for dexpreopt files of APEX bundles." into main
diff --git a/etc/prebuilt_etc.go b/etc/prebuilt_etc.go
index c1a0b9c..c17594b 100644
--- a/etc/prebuilt_etc.go
+++ b/etc/prebuilt_etc.go
@@ -268,17 +268,6 @@
return p.outputFilePaths[0]
}
-var _ android.OutputFileProducer = (*PrebuiltEtc)(nil)
-
-func (p *PrebuiltEtc) OutputFiles(tag string) (android.Paths, error) {
- switch tag {
- case "":
- return p.outputFilePaths.Paths(), nil
- default:
- return nil, fmt.Errorf("unsupported module reference tag %q", tag)
- }
-}
-
func (p *PrebuiltEtc) SubDir() string {
if subDir := proptools.String(p.subdirProperties.Sub_dir); subDir != "" {
return subDir
@@ -420,6 +409,8 @@
for _, ip := range installs {
ip.addInstallRules(ctx)
}
+
+ ctx.SetOutputFiles(p.outputFilePaths.Paths(), "")
}
type installProperties struct {
diff --git a/ui/build/build.go b/ui/build/build.go
index 9a9eccd..03d8392 100644
--- a/ui/build/build.go
+++ b/ui/build/build.go
@@ -21,7 +21,6 @@
"path/filepath"
"sync"
"text/template"
- "time"
"android/soong/ui/metrics"
)
@@ -66,9 +65,12 @@
// (to allow for source control that uses something other than numbers),
// but must be a single word and a valid file name.
//
- // If no BUILD_NUMBER is set, create a useful "I am an engineering build
- // from this date/time" value. Make it start with a non-digit so that
- // anyone trying to parse it as an integer will probably get "0".
+ // If no BUILD_NUMBER is set, create a useful "I am an engineering build"
+ // value. Make it start with a non-digit so that anyone trying to parse
+ // it as an integer will probably get "0". This value used to contain
+ // a timestamp, but now that more dependencies are tracked in order to
+ // reduce the importance of `m installclean`, changing it every build
+ // causes unnecessary rebuilds for local development.
buildNumber, ok := config.environ.Get("BUILD_NUMBER")
if ok {
writeValueIfChanged(ctx, config, config.OutDir(), "file_name_tag.txt", buildNumber)
@@ -77,7 +79,7 @@
if username, ok = config.environ.Get("BUILD_USERNAME"); !ok {
ctx.Fatalln("Missing BUILD_USERNAME")
}
- buildNumber = fmt.Sprintf("eng.%.6s.%s", username, time.Now().Format("20060102.150405" /* YYYYMMDD.HHMMSS */))
+ buildNumber = fmt.Sprintf("eng.%.6s.00000000.000000", username)
writeValueIfChanged(ctx, config, config.OutDir(), "file_name_tag.txt", username)
}
// Write the build number to a file so it can be read back in