Loading java/droiddoc.go +11 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,12 @@ type Droiddoc struct { checkLastReleasedApiTimestamp android.WritablePath annotationsZip android.WritablePath apiFilePath android.Path } type ApiFilePath interface { ApiFilePath() android.Path } func InitDroiddocModule(module android.DefaultableModule, hod android.HostOrDeviceSupported) { Loading Loading @@ -813,6 +819,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) { args = args + " -api " + d.apiFile.String() metalavaArgs = metalavaArgs + " --api " + d.apiFile.String() implicitOutputs = append(implicitOutputs, d.apiFile) d.apiFilePath = d.apiFile } if d.checkCurrentApi() || d.checkLastReleasedApi() || String(d.properties.Removed_api_filename) != "" { Loading Loading @@ -1091,6 +1098,10 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) { } } func (d *Droiddoc) ApiFilePath() android.Path { return d.apiFilePath } var droiddocTemplateTag = dependencyTag{name: "droiddoc-template"} type DroiddocTemplateProperties struct { Loading java/sdk_library.go +41 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ var ( systemApiStubsTag = dependencyTag{name: "system"} testApiStubsTag = dependencyTag{name: "test"} implLibTag = dependencyTag{name: "platform"} publicApiFileTag = dependencyTag{name: "publicApi"} systemApiFileTag = dependencyTag{name: "systemApi"} testApiFileTag = dependencyTag{name: "testApi"} ) type apiScope int Loading Loading @@ -134,6 +137,10 @@ type sdkLibrary struct { systemApiStubsImplPath android.Paths testApiStubsImplPath android.Paths implLibImplPath android.Paths publicApiFilePath android.Path systemApiFilePath android.Path testApiFilePath android.Path } func (module *sdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) { Loading @@ -142,6 +149,10 @@ func (module *sdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) { ctx.AddDependency(ctx.Module(), systemApiStubsTag, module.stubsName(apiScopeSystem)) ctx.AddDependency(ctx.Module(), testApiStubsTag, module.stubsName(apiScopeTest)) ctx.AddDependency(ctx.Module(), implLibTag, module.implName()) ctx.AddDependency(ctx.Module(), publicApiFileTag, module.docsName(apiScopePublic)) ctx.AddDependency(ctx.Module(), systemApiFileTag, module.docsName(apiScopeSystem)) ctx.AddDependency(ctx.Module(), testApiFileTag, module.docsName(apiScopeTest)) } func (module *sdkLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { Loading Loading @@ -170,6 +181,18 @@ func (module *sdkLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) ctx.ModuleErrorf("depends on module %q of unknown tag %q", otherName, tag) } } if doc, ok := to.(ApiFilePath); ok { switch tag { case publicApiFileTag: module.publicApiFilePath = doc.ApiFilePath() case systemApiFileTag: module.systemApiFilePath = doc.ApiFilePath() case testApiFileTag: module.testApiFilePath = doc.ApiFilePath() default: ctx.ModuleErrorf("depends on module %q of unknown tag %q", otherName, tag) } } }) } Loading Loading @@ -199,6 +222,24 @@ func (module *sdkLibrary) AndroidMk() android.AndroidMkData { module.testApiStubsPath.Strings()[0]+ ":"+path.Join("apistubs", "test", module.BaseModuleName()+".jar")+")") } if module.publicApiFilePath != nil { fmt.Fprintln(w, "$(call dist-for-goals,sdk win_sdk,"+ module.publicApiFilePath.String()+ ":"+path.Join("apistubs", "public", "api", module.BaseModuleName()+".txt")+")") } if module.systemApiFilePath != nil { fmt.Fprintln(w, "$(call dist-for-goals,sdk win_sdk,"+ module.systemApiFilePath.String()+ ":"+path.Join("apistubs", "system", "api", module.BaseModuleName()+".txt")+")") } if module.testApiFilePath != nil { fmt.Fprintln(w, "$(call dist-for-goals,sdk win_sdk,"+ module.testApiFilePath.String()+ ":"+path.Join("apistubs", "test", "api", module.BaseModuleName()+".txt")+")") } }, } } Loading Loading
java/droiddoc.go +11 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,12 @@ type Droiddoc struct { checkLastReleasedApiTimestamp android.WritablePath annotationsZip android.WritablePath apiFilePath android.Path } type ApiFilePath interface { ApiFilePath() android.Path } func InitDroiddocModule(module android.DefaultableModule, hod android.HostOrDeviceSupported) { Loading Loading @@ -813,6 +819,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) { args = args + " -api " + d.apiFile.String() metalavaArgs = metalavaArgs + " --api " + d.apiFile.String() implicitOutputs = append(implicitOutputs, d.apiFile) d.apiFilePath = d.apiFile } if d.checkCurrentApi() || d.checkLastReleasedApi() || String(d.properties.Removed_api_filename) != "" { Loading Loading @@ -1091,6 +1098,10 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) { } } func (d *Droiddoc) ApiFilePath() android.Path { return d.apiFilePath } var droiddocTemplateTag = dependencyTag{name: "droiddoc-template"} type DroiddocTemplateProperties struct { Loading
java/sdk_library.go +41 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ var ( systemApiStubsTag = dependencyTag{name: "system"} testApiStubsTag = dependencyTag{name: "test"} implLibTag = dependencyTag{name: "platform"} publicApiFileTag = dependencyTag{name: "publicApi"} systemApiFileTag = dependencyTag{name: "systemApi"} testApiFileTag = dependencyTag{name: "testApi"} ) type apiScope int Loading Loading @@ -134,6 +137,10 @@ type sdkLibrary struct { systemApiStubsImplPath android.Paths testApiStubsImplPath android.Paths implLibImplPath android.Paths publicApiFilePath android.Path systemApiFilePath android.Path testApiFilePath android.Path } func (module *sdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) { Loading @@ -142,6 +149,10 @@ func (module *sdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) { ctx.AddDependency(ctx.Module(), systemApiStubsTag, module.stubsName(apiScopeSystem)) ctx.AddDependency(ctx.Module(), testApiStubsTag, module.stubsName(apiScopeTest)) ctx.AddDependency(ctx.Module(), implLibTag, module.implName()) ctx.AddDependency(ctx.Module(), publicApiFileTag, module.docsName(apiScopePublic)) ctx.AddDependency(ctx.Module(), systemApiFileTag, module.docsName(apiScopeSystem)) ctx.AddDependency(ctx.Module(), testApiFileTag, module.docsName(apiScopeTest)) } func (module *sdkLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { Loading Loading @@ -170,6 +181,18 @@ func (module *sdkLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) ctx.ModuleErrorf("depends on module %q of unknown tag %q", otherName, tag) } } if doc, ok := to.(ApiFilePath); ok { switch tag { case publicApiFileTag: module.publicApiFilePath = doc.ApiFilePath() case systemApiFileTag: module.systemApiFilePath = doc.ApiFilePath() case testApiFileTag: module.testApiFilePath = doc.ApiFilePath() default: ctx.ModuleErrorf("depends on module %q of unknown tag %q", otherName, tag) } } }) } Loading Loading @@ -199,6 +222,24 @@ func (module *sdkLibrary) AndroidMk() android.AndroidMkData { module.testApiStubsPath.Strings()[0]+ ":"+path.Join("apistubs", "test", module.BaseModuleName()+".jar")+")") } if module.publicApiFilePath != nil { fmt.Fprintln(w, "$(call dist-for-goals,sdk win_sdk,"+ module.publicApiFilePath.String()+ ":"+path.Join("apistubs", "public", "api", module.BaseModuleName()+".txt")+")") } if module.systemApiFilePath != nil { fmt.Fprintln(w, "$(call dist-for-goals,sdk win_sdk,"+ module.systemApiFilePath.String()+ ":"+path.Join("apistubs", "system", "api", module.BaseModuleName()+".txt")+")") } if module.testApiFilePath != nil { fmt.Fprintln(w, "$(call dist-for-goals,sdk win_sdk,"+ module.testApiFilePath.String()+ ":"+path.Join("apistubs", "test", "api", module.BaseModuleName()+".txt")+")") } }, } } Loading