Merge "Use a presingleton to create hiddenapi singleton paths early"
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
android.RegisterPreSingletonType("pre-hiddenapi", hiddenAPIPreSingletonFactory)
|
||||||
android.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory)
|
android.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,6 +44,18 @@ func hiddenAPISingletonPaths(ctx android.PathContext) hiddenAPISingletonPathsStr
|
|||||||
}).(hiddenAPISingletonPathsStruct)
|
}).(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 {
|
func hiddenAPISingletonFactory() android.Singleton {
|
||||||
return hiddenAPISingleton{}
|
return hiddenAPISingleton{}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user