Merge "Use a presingleton to create hiddenapi singleton paths early" am: 17c85f098a

am: a0e1404cf9

Change-Id: I59970ce9b09d16b24b3f68c9741cae4a18f1e9a6
This commit is contained in:
Colin Cross 2019-02-07 12:15:06 -08:00 committed by android-build-merger
commit 9e43bcb7ec

View file

@ -19,6 +19,7 @@ import (
)
func init() {
android.RegisterPreSingletonType("pre-hiddenapi", hiddenAPIPreSingletonFactory)
android.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory)
}
@ -43,6 +44,18 @@ func hiddenAPISingletonPaths(ctx android.PathContext) hiddenAPISingletonPathsStr
}).(hiddenAPISingletonPathsStruct)
}
func hiddenAPIPreSingletonFactory() android.Singleton {
return hiddenAPIPreSingleton{}
}
type hiddenAPIPreSingleton struct{}
// hiddenAPI pre-singleton rules to ensure paths are always generated before
// makevars
func (hiddenAPIPreSingleton) GenerateBuildActions(ctx android.SingletonContext) {
hiddenAPISingletonPaths(ctx)
}
func hiddenAPISingletonFactory() android.Singleton {
return hiddenAPISingleton{}
}