Add option to disable VTS backend. am: 9f7c29700a am: e2c6f08e11
am: 36159585aa
Change-Id: If74f35d78cd4866b533a9324f743112024c13a03
diff --git a/build/hidl_interface.go b/build/hidl_interface.go
index 5b67d9a..0139a99 100644
--- a/build/hidl_interface.go
+++ b/build/hidl_interface.go
@@ -266,6 +266,9 @@
// expressed by @export annotations in the hal files.
Gen_java_constants bool
+ // Whether to generate VTS-related testing libraries.
+ Gen_vts *bool
+
// example: -randroid.hardware:hardware/interfaces
Full_root_option string `blueprint:"mutated"`
}
@@ -408,9 +411,9 @@
shouldGenerateLibrary := !isCorePackage(name.string())
// explicitly true if not specified to give early warning to devs
- shouldGenerateJava := i.properties.Gen_java == nil || *i.properties.Gen_java
+ shouldGenerateJava := proptools.BoolDefault(i.properties.Gen_java, true)
shouldGenerateJavaConstants := i.properties.Gen_java_constants
- shouldGenerateVts := shouldGenerateLibrary
+ shouldGenerateVts := shouldGenerateLibrary && proptools.BoolDefault(i.properties.Gen_vts, true)
var libraryIfExists []string
if shouldGenerateLibrary {