Allow specifying a build variant
Test: multiproduct_kati --variant userdebug Change-Id: I6548889caf868cad6270110c038753d029247572
This commit is contained in:
parent
a4e43a77d8
commit
5ed900be48
|
@ -51,6 +51,8 @@ var outDir = flag.String("out", "", "path to store output directories (defaults
|
|||
var onlyConfig = flag.Bool("only-config", false, "Only run product config (not Soong or Kati)")
|
||||
var onlySoong = flag.Bool("only-soong", false, "Only run product config and Soong (not Kati)")
|
||||
|
||||
var buildVariant = flag.String("variant", "eng", "build variant to use")
|
||||
|
||||
type Product struct {
|
||||
ctx build.Context
|
||||
config build.Config
|
||||
|
@ -225,7 +227,7 @@ func main() {
|
|||
|
||||
productConfig := build.NewConfig(productCtx)
|
||||
productConfig.Environment().Set("OUT_DIR", productOutDir)
|
||||
productConfig.Lunch(productCtx, product, "eng")
|
||||
productConfig.Lunch(productCtx, product, *buildVariant)
|
||||
|
||||
build.Build(productCtx, productConfig, build.BuildProductConfig)
|
||||
productConfigs <- Product{productCtx, productConfig}
|
||||
|
|
Loading…
Reference in New Issue