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:
@@ -15,6 +15,7 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"android/soong"
|
||||
"android/soong/env"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
@@ -27,6 +28,10 @@ import (
|
||||
// compare the contents of the environment variables, rewriting the file if necessary to cause
|
||||
// a manifest regeneration.
|
||||
|
||||
func init() {
|
||||
soong.RegisterSingletonType("env", EnvSingleton)
|
||||
}
|
||||
|
||||
func EnvSingleton() blueprint.Singleton {
|
||||
return &envSingleton{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user