diff options
author | 2019-02-07 20:00:20 +0000 | |
---|---|---|
committer | 2019-02-07 20:00:20 +0000 | |
commit | 17c85f098af453781438f9383dbfe1968b8f861f (patch) | |
tree | 136b88600f26fd78d6905e1881e8b69a35e4e506 | |
parent | 30ca9379e6d515bd176945dd92a1930cc35d47fe (diff) | |
parent | 76e3e1f55461869fc66403b1c643dccde3e02c9f (diff) |
Merge "Use a presingleton to create hiddenapi singleton paths early"
-rw-r--r-- | java/hiddenapi_singleton.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index 96de755ca..d43e276ac 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -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{} } |