summaryrefslogtreecommitdiff
path: root/android/defs.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2025-01-28 14:00:12 -0800
committer Colin Cross <ccross@android.com> 2025-02-03 22:19:24 -0800
commit388c6618a8a4a5bedd42ffc4874e2f6663e01289 (patch)
treedc1947fc3a719fcc9bc8824eb963ec004345e878 /android/defs.go
parent90d7df966c7c79a5d0c7380d4d3dc59bd339baad (diff)
Move installation of dexpreopted system server classpath libraries into apex
System server jars in apexes currently use a heuristic to determine whether or not they are the "main" variant in order to create rules that copy their dexpreopt artifacts to the final installed location and their dex jars to a known location for other modules to reference. The heuristic depends on knowing all apexes that depend on the module, which will not be possible when the apex info mutator is rewritten to support future incremental analysis. Instead, export the dexpreopt artifacts and dex jars, and let the apex decide whether or not to install them. Bug: 372543712 Test: all soong tests pass Change-Id: I478bc2edceca4614e08e9a695b05d091e5437ba1
Diffstat (limited to 'android/defs.go')
-rw-r--r--android/defs.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/android/defs.go b/android/defs.go
index 4dd267a89..57fcc9b13 100644
--- a/android/defs.go
+++ b/android/defs.go
@@ -143,3 +143,13 @@ func init() {
return ctx.Config().RBEWrapper()
})
}
+
+// CopyFileRule creates a ninja rule to copy path to outPath.
+func CopyFileRule(ctx ModuleContext, path Path, outPath OutputPath) {
+ ctx.Build(pctx, BuildParams{
+ Rule: Cp,
+ Input: path,
+ Output: outPath,
+ Description: "copy " + outPath.Base(),
+ })
+}