diff options
| author | 2019-09-25 11:33:01 -0700 | |
|---|---|---|
| committer | 2019-09-26 17:19:26 +0000 | |
| commit | 84dfc3d33138470a9fbf624eaeda977b9f48e571 (patch) | |
| tree | 40330c7947de9ecbe5a7a15ae8ded0442f2097e6 /java/sdk_library.go | |
| parent | 505bcb88ed57676208353ba89c329d7edce1c814 (diff) | |
Make CreateModule take an android.ModuleFactory
Reduce the boilerplate required to call CreateModule by taking an
android.ModuleFactory instead of a blueprint.ModuleFactory.
Test: m checkbuild
Change-Id: I1259d2dd3f7893b5319c333bc180727ac40f9e91
Diffstat (limited to 'java/sdk_library.go')
| -rw-r--r-- | java/sdk_library.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/java/sdk_library.go b/java/sdk_library.go index 30fd1c4e2..cc7256b1b 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -422,7 +422,7 @@ func (module *SdkLibrary) createStubsLibrary(mctx android.LoadHookContext, apiSc props.Product_specific = proptools.BoolPtr(true) } - mctx.CreateModule(android.ModuleFactoryAdaptor(LibraryFactory), &props) + mctx.CreateModule(LibraryFactory, &props) } // Creates a droiddoc module that creates stubs source files from the given full source @@ -522,7 +522,7 @@ func (module *SdkLibrary) createDocs(mctx android.LoadHookContext, apiScope apiS module.latestRemovedApiFilegroupName(apiScope)) props.Check_api.Ignore_missing_latest_api = proptools.BoolPtr(true) - mctx.CreateModule(android.ModuleFactoryAdaptor(DroidstubsFactory), &props) + mctx.CreateModule(DroidstubsFactory, &props) } // Creates the xml file that publicizes the runtime library @@ -560,7 +560,7 @@ func (module *SdkLibrary) createXmlFile(mctx android.LoadHookContext) { genruleProps.Name = proptools.StringPtr(module.xmlFileName() + "-gen") genruleProps.Cmd = proptools.StringPtr("echo '" + xmlContent + "' > $(out)") genruleProps.Out = []string{module.xmlFileName()} - mctx.CreateModule(android.ModuleFactoryAdaptor(genrule.GenRuleFactory), &genruleProps) + mctx.CreateModule(genrule.GenRuleFactory, &genruleProps) // creates a prebuilt_etc module to actually place the xml file under // <partition>/etc/permissions @@ -582,7 +582,7 @@ func (module *SdkLibrary) createXmlFile(mctx android.LoadHookContext) { } else if module.ProductSpecific() { etcProps.Product_specific = proptools.BoolPtr(true) } - mctx.CreateModule(android.ModuleFactoryAdaptor(android.PrebuiltEtcFactory), &etcProps) + mctx.CreateModule(android.PrebuiltEtcFactory, &etcProps) } func (module *SdkLibrary) PrebuiltJars(ctx android.BaseModuleContext, sdkVersion string) android.Paths { @@ -815,7 +815,7 @@ func (module *sdkLibraryImport) createInternalModules(mctx android.LoadHookConte props.Product_specific = proptools.BoolPtr(true) } - mctx.CreateModule(android.ModuleFactoryAdaptor(ImportFactory), &props, &module.properties) + mctx.CreateModule(ImportFactory, &props, &module.properties) javaSdkLibraries := javaSdkLibraries(mctx.Config()) javaSdkLibrariesLock.Lock() |