use init functions to register module types, etc.
Instead of putting all the blueprint registrations in soong_build, put them all in init() functions. This puts the registration next to the implementation. Change-Id: Ide1a749518f5e9d1367a18ab3bb1d91da3310c76
This commit is contained in:
14
java/java.go
14
java/java.go
@@ -26,10 +26,24 @@ import (
|
||||
"github.com/google/blueprint"
|
||||
"github.com/google/blueprint/pathtools"
|
||||
|
||||
"android/soong"
|
||||
"android/soong/common"
|
||||
"android/soong/genrule"
|
||||
)
|
||||
|
||||
func init() {
|
||||
soong.RegisterModuleType("java_library", JavaLibraryFactory)
|
||||
soong.RegisterModuleType("java_library_static", JavaLibraryFactory)
|
||||
soong.RegisterModuleType("java_library_host", JavaLibraryHostFactory)
|
||||
soong.RegisterModuleType("java_binary", JavaBinaryFactory)
|
||||
soong.RegisterModuleType("java_binary_host", JavaBinaryHostFactory)
|
||||
soong.RegisterModuleType("prebuilt_java_library", JavaPrebuiltFactory)
|
||||
soong.RegisterModuleType("prebuilt_sdk", SdkPrebuiltFactory)
|
||||
soong.RegisterModuleType("android_app", AndroidAppFactory)
|
||||
|
||||
soong.RegisterSingletonType("logtags", LogtagsSingleton)
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// Autogenerated files:
|
||||
// Proto
|
||||
|
Reference in New Issue
Block a user