Lines Matching refs:d

783 func (d *Droiddoc) ApiFilePath() android.Path {
784 return d.apiFilePath
787 func (d *Droiddoc) DepsMutator(ctx android.BottomUpMutatorContext) {
788 d.Javadoc.addDeps(ctx)
790 if Bool(d.properties.Check_api.Ignore_missing_latest_api) {
791 ignoreMissingModules(ctx, &d.properties.Check_api.Last_released)
794 if String(d.properties.Custom_template) != "" {
795 ctx.AddDependency(ctx.Module(), droiddocTemplateTag, String(d.properties.Custom_template))
799 func (d *Droiddoc) doclavaDocsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand, doc…
811 …ge.now ", `"$(date -d @$(cat `+ctx.Config().Getenv("BUILD_DATETIME_FILE")+`) "+%d %b %Y %k:%M")" `)
813 if String(d.properties.Custom_template) == "" {
826 if len(d.properties.Html_dirs) > 0 {
827 htmlDir := android.PathForModuleSrc(ctx, d.properties.Html_dirs[0])
829 …Implicits(android.PathsForModuleSrc(ctx, []string{filepath.Join(d.properties.Html_dirs[0], "**/*")…
832 if len(d.properties.Html_dirs) > 1 {
833 htmlDir2 := android.PathForModuleSrc(ctx, d.properties.Html_dirs[1])
835 …Implicits(android.PathsForModuleSrc(ctx, []string{filepath.Join(d.properties.Html_dirs[1], "**/*")…
838 if len(d.properties.Html_dirs) > 2 {
842 knownTags := android.PathsForModuleSrc(ctx, d.properties.Knowntags)
845 cmd.FlagForEachArg("-hdf ", d.properties.Hdf)
847 if String(d.properties.Proofread_file) != "" {
848 proofreadFile := android.PathForModuleOut(ctx, String(d.properties.Proofread_file))
852 if String(d.properties.Todo_file) != "" {
856 cmd.FlagWithArg("-todo ", String(d.properties.Todo_file)).
857 ImplicitOutput(android.PathForModuleOut(ctx, String(d.properties.Todo_file)))
860 if String(d.properties.Resourcesdir) != "" {
863 resourcesDir := android.PathForModuleSrc(ctx, String(d.properties.Resourcesdir))
867 if String(d.properties.Resourcesoutdir) != "" {
869 cmd.FlagWithArg("-resourcesoutdir ", String(d.properties.Resourcesoutdir))
873 func (d *Droiddoc) createStubs() bool {
874 return BoolDefault(d.properties.Create_stubs, false)
877 func (d *Droiddoc) stubsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand, stubsDir …
878 if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") ||
879 apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") ||
880 String(d.properties.Api_filename) != "" {
882 d.apiFile = android.PathForModuleOut(ctx, ctx.ModuleName()+"_api.txt")
883 cmd.FlagWithOutput("-api ", d.apiFile)
884 d.apiFilePath = d.apiFile
887 if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") ||
888 apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") ||
889 String(d.properties.Removed_api_filename) != "" {
890 d.removedApiFile = android.PathForModuleOut(ctx, ctx.ModuleName()+"_removed.txt")
891 cmd.FlagWithOutput("-removedApi ", d.removedApiFile)
894 if String(d.properties.Removed_dex_api_filename) != "" {
895 d.removedDexApiFile = android.PathForModuleOut(ctx, String(d.properties.Removed_dex_api_filename))
896 cmd.FlagWithOutput("-removedDexApi ", d.removedDexApiFile)
899 if d.createStubs() {
903 if Bool(d.properties.Write_sdk_values) {
908 func (d *Droiddoc) postDoclavaCmds(ctx android.ModuleContext, rule *android.RuleBuilder) {
909 if String(d.properties.Static_doc_index_redirect) != "" {
910 …staticDocIndexRedirect := android.PathForModuleSrc(ctx, String(d.properties.Static_doc_index_redir…
916 if String(d.properties.Static_doc_properties) != "" {
917 staticDocProperties := android.PathForModuleSrc(ctx, String(d.properties.Static_doc_properties))
1006 func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
1007 deps := d.Javadoc.collectDeps(ctx)
1009 d.Javadoc.docZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"-"+"docs.zip")
1010 d.Javadoc.stubsSrcJar = android.PathForModuleOut(ctx, ctx.ModuleName()+"-"+"stubs.srcjar")
1026 srcJarList := zipSyncCmd(ctx, rule, srcJarDir, d.Javadoc.srcJars)
1029 if Bool(d.properties.Dokka_enabled) {
1032 cmd = javadocBootclasspathCmd(ctx, rule, d.Javadoc.srcFiles, outDir, srcJarDir, srcJarList,
1033 deps.bootClasspath, deps.classpath, d.Javadoc.sourcepaths)
1036 d.stubsFlags(ctx, cmd, stubsDir)
1038 cmd.Flag(strings.Join(d.Javadoc.args, " ")).Implicits(d.Javadoc.argFiles)
1040 if d.properties.Compat_config != nil {
1041 compatConfig := android.PathForModuleSrc(ctx, String(d.properties.Compat_config))
1046 if Bool(d.properties.Dokka_enabled) {
1049 d.doclavaDocsFlags(ctx, cmd, classpath{jsilver, doclava})
1051 for _, o := range d.Javadoc.properties.Out {
1055 d.postDoclavaCmds(ctx, rule)
1063 FlagWithOutput("-o ", d.docZip).
1071 FlagWithOutput("-o ", d.stubsSrcJar).
1081 if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") &&
1084 apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Api_file))
1085 …removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Removed_api_…
1087 d.checkCurrentApiTimestamp = android.PathForModuleOut(ctx, "check_current_api.timestamp")
1097 OptionalFlag(d.properties.Check_api.Current.Args).
1099 Input(d.apiFile).
1101 Input(d.removedApiFile)
1115 Text("touch").Output(d.checkCurrentApiTimestamp).
1123 d.updateCurrentApiTimestamp = android.PathForModuleOut(ctx, "update_current_api.timestamp")
1132 Input(d.apiFile).Flag(apiFile.String())
1136 Input(d.removedApiFile).Flag(removedApiFile.String())
1141 Text("touch").Output(d.updateCurrentApiTimestamp).
1150 if apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") &&
1153 apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Api_file))
1154 …removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Remove…
1156d.checkLastReleasedApiTimestamp = android.PathForModuleOut(ctx, "check_last_released_api.timestamp…
1165 OptionalFlag(d.properties.Check_api.Last_released.Args).
1167 Input(d.apiFile).
1169 Input(d.removedApiFile)
1177 Text("touch").Output(d.checkLastReleasedApiTimestamp).
1251 func (d *Droidstubs) OutputFiles(tag string) (android.Paths, error) {
1254 return android.Paths{d.stubsSrcJar}, nil
1256 return android.Paths{d.docZip}, nil
1258 return android.Paths{d.annotationsZip}, nil
1260 return android.Paths{d.apiVersionsXml}, nil
1266 func (d *Droidstubs) ApiFilePath() android.Path {
1267 return d.apiFilePath
1270 func (d *Droidstubs) RemovedApiFilePath() android.Path {
1271 return d.removedApiFile
1274 func (d *Droidstubs) StubsSrcJar() android.Path {
1275 return d.stubsSrcJar
1278 func (d *Droidstubs) DepsMutator(ctx android.BottomUpMutatorContext) {
1279 d.Javadoc.addDeps(ctx)
1283 if Bool(d.properties.Check_api.Ignore_missing_latest_api) {
1284 ignoreMissingModules(ctx, &d.properties.Check_api.Last_released)
1288 newSinceSrc := d.properties.Check_api.Api_lint.New_since
1291 d.properties.Check_api.Api_lint.New_since = nil
1295 if len(d.properties.Merge_annotations_dirs) != 0 {
1296 for _, mergeAnnotationsDir := range d.properties.Merge_annotations_dirs {
1301 if len(d.properties.Merge_inclusion_annotations_dirs) != 0 {
1302 for _, mergeInclusionAnnotationsDir := range d.properties.Merge_inclusion_annotations_dirs {
1307 if len(d.properties.Api_levels_annotations_dirs) != 0 {
1308 for _, apiLevelsAnnotationsDir := range d.properties.Api_levels_annotations_dirs {
1314 func (d *Droidstubs) stubsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand, stubsDi…
1315 if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") ||
1316 apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") ||
1317 String(d.properties.Api_filename) != "" {
1318 d.apiFile = android.PathForModuleOut(ctx, ctx.ModuleName()+"_api.txt")
1319 cmd.FlagWithOutput("--api ", d.apiFile)
1320 d.apiFilePath = d.apiFile
1323 if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") ||
1324 apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") ||
1325 String(d.properties.Removed_api_filename) != "" {
1326 d.removedApiFile = android.PathForModuleOut(ctx, ctx.ModuleName()+"_removed.txt")
1327 cmd.FlagWithOutput("--removed-api ", d.removedApiFile)
1330 if String(d.properties.Removed_dex_api_filename) != "" {
1331 d.removedDexApiFile = android.PathForModuleOut(ctx, String(d.properties.Removed_dex_api_filename))
1332 cmd.FlagWithOutput("--removed-dex-api ", d.removedDexApiFile)
1335 if Bool(d.properties.Write_sdk_values) {
1336 d.metadataDir = android.PathForModuleOut(ctx, "metadata")
1337 cmd.FlagWithArg("--sdk-values ", d.metadataDir.String())
1341 if Bool(d.properties.Create_doc_stubs) {
1350 func (d *Droidstubs) annotationsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand) {
1351 if Bool(d.properties.Annotations_enabled) {
1355 android.InList("--validate-nullability-from-merged-stubs", d.Javadoc.args) ||
1356 String(d.properties.Validate_nullability_from_list) != ""
1358 migratingNullability := String(d.properties.Previous_api) != ""
1360 previousApi := android.PathForModuleSrc(ctx, String(d.properties.Previous_api))
1364 if s := String(d.properties.Validate_nullability_from_list); s != "" {
1369d.nullabilityWarningsFile = android.PathForModuleOut(ctx, ctx.ModuleName()+"_nullability_warnings.…
1370 cmd.FlagWithOutput("--nullability-warnings-txt ", d.nullabilityWarningsFile)
1373 d.annotationsZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"_annotations.zip")
1374 cmd.FlagWithOutput("--extract-annotations ", d.annotationsZip)
1376 if len(d.properties.Merge_annotations_dirs) != 0 {
1377 d.mergeAnnoDirFlags(ctx, cmd)
1387 func (d *Droidstubs) mergeAnnoDirFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand) {
1398 func (d *Droidstubs) inclusionAnnotationsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderC…
1409 func (d *Droidstubs) apiLevelsAnnotationsFlags(ctx android.ModuleContext, cmd *android.RuleBuilderC…
1410 if Bool(d.properties.Api_levels_annotations_enabled) {
1411 d.apiVersionsXml = android.PathForModuleOut(ctx, "api-versions.xml")
1413 if len(d.properties.Api_levels_annotations_dirs) == 0 {
1418 cmd.FlagWithOutput("--generate-api-levels ", d.apiVersionsXml)
1419 cmd.FlagWithInput("--apply-api-levels ", d.apiVersionsXml)
1440 func (d *Droidstubs) apiToXmlFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand) {
1441 if Bool(d.properties.Jdiff_enabled) && !ctx.Config().IsPdkBuild() && d.apiFile != nil {
1442 if d.apiFile.String() == "" {
1446 d.apiXmlFile = android.PathForModuleOut(ctx, ctx.ModuleName()+"_api.xml")
1447 cmd.FlagWithOutput("--api-xml ", d.apiXmlFile)
1449 if String(d.properties.Check_api.Last_released.Api_file) == "" {
1454 …lastReleasedApi := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Api_f…
1455d.lastReleasedApiXmlFile = android.PathForModuleOut(ctx, ctx.ModuleName()+"_last_released_api.xml")
1456 cmd.FlagWithInput("--convert-to-jdiff ", lastReleasedApi).Output(d.lastReleasedApiXmlFile)
1533 func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
1534 deps := d.Javadoc.collectDeps(ctx)
1536 javaVersion := getJavaVersion(ctx, String(d.Javadoc.properties.Java_version), sdkContext(d))
1544 generateStubs := BoolDefault(d.properties.Generate_stubs, true)
1547 d.Javadoc.stubsSrcJar = android.PathForModuleOut(ctx, ctx.ModuleName()+"-"+"stubs.srcjar")
1553 srcJarList := zipSyncCmd(ctx, rule, srcJarDir, d.Javadoc.srcJars)
1557 cmd := metalavaCmd(ctx, rule, javaVersion, d.Javadoc.srcFiles, srcJarList,
1558 deps.bootClasspath, deps.classpath, d.Javadoc.sourcepaths, implicitsRsp,
1559 Bool(d.Javadoc.properties.Sandbox))
1560 cmd.Implicits(d.Javadoc.implicits)
1562 d.stubsFlags(ctx, cmd, stubsDir)
1564 d.annotationsFlags(ctx, cmd)
1565 d.inclusionAnnotationsFlags(ctx, cmd)
1566 d.apiLevelsAnnotationsFlags(ctx, cmd)
1567 d.apiToXmlFlags(ctx, cmd)
1569 if android.InList("--generate-documentation", d.Javadoc.args) {
1573 d.Javadoc.args = append(d.Javadoc.args, "-nodocs")
1576 cmd.Flag(strings.Join(d.Javadoc.args, " ")).Implicits(d.Javadoc.argFiles)
1577 for _, o := range d.Javadoc.properties.Out {
1589 if BoolDefault(d.properties.Check_api.Api_lint.Enabled, false) && !ctx.Config().IsPdkBuild() {
1592 newSince := android.OptionalPathForModuleSrc(ctx, d.properties.Check_api.Api_lint.New_since)
1598 d.apiLintReport = android.PathForModuleOut(ctx, "api_lint_report.txt")
1599 …cmd.FlagWithOutput("--report-even-if-suppressed ", d.apiLintReport) // TODO: Change to ":api-lint"
1601 …baselineFile := android.OptionalPathForModuleSrc(ctx, d.properties.Check_api.Api_lint.Baseline_fil…
1603 d.apiLintTimestamp = android.PathForModuleOut(ctx, "api_lint.timestamp")
1647 if apiCheckEnabled(ctx, d.properties.Check_api.Last_released, "last_released") &&
1651 if len(d.Javadoc.properties.Out) > 0 {
1655 apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Api_file))
1656 …removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Last_released.Remove…
1657 …baselineFile := android.OptionalPathForModuleSrc(ctx, d.properties.Check_api.Last_released.Baselin…
1660d.checkLastReleasedApiTimestamp = android.PathForModuleOut(ctx, "check_last_released_api.timestamp…
1694 FlagWithOutput("-o ", d.Javadoc.stubsSrcJar).
1699 if Bool(d.properties.Write_sdk_values) {
1700 d.metadataZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"-metadata.zip")
1705 FlagWithOutput("-o ", d.metadataZip).
1706 FlagWithArg("-C ", d.metadataDir.String()).
1707 FlagWithArg("-D ", d.metadataDir.String())
1713 rule.Command().Text("touch").Output(d.apiLintTimestamp)
1716 rule.Command().Text("touch").Output(d.checkLastReleasedApiTimestamp)
1725 if apiCheckEnabled(ctx, d.properties.Check_api.Current, "current") &&
1728 if len(d.Javadoc.properties.Out) > 0 {
1732 apiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Api_file))
1733 …removedApiFile := android.PathForModuleSrc(ctx, String(d.properties.Check_api.Current.Removed_api_…
1734 …baselineFile := android.OptionalPathForModuleSrc(ctx, d.properties.Check_api.Current.Baseline_file)
1740 d.checkCurrentApiTimestamp = android.PathForModuleOut(ctx, "check_current_api.timestamp")
1752 Input(apiFile).Input(d.apiFile)
1756 Input(removedApiFile).Input(d.removedApiFile)
1770 Text("touch").Output(d.checkCurrentApiTimestamp).
1778 d.updateCurrentApiTimestamp = android.PathForModuleOut(ctx, "update_current_api.timestamp")
1787 Input(d.apiFile).Flag(apiFile.String())
1791 Input(d.removedApiFile).Flag(removedApiFile.String())
1796 Text("touch").Output(d.updateCurrentApiTimestamp).
1805 if String(d.properties.Check_nullability_warnings) != "" {
1806 if d.nullabilityWarningsFile == nil {
1811 …checkNullabilityWarnings := android.PathForModuleSrc(ctx, String(d.properties.Check_nullability_wa…
1813d.checkNullabilityWarningsTimestamp = android.PathForModuleOut(ctx, "check_nullability_warnings.ti…
1823 d.nullabilityWarningsFile, checkNullabilityWarnings)
1829 Text("diff").Input(checkNullabilityWarnings).Input(d.nullabilityWarningsFile).
1831 Text("touch").Output(d.checkNullabilityWarningsTimestamp).
1840 if Bool(d.properties.Jdiff_enabled) && !ctx.Config().IsPdkBuild() {
1841 if len(d.Javadoc.properties.Out) > 0 {
1854 d.jdiffDocZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"-"+"jdiff-docs.zip")
1855 d.jdiffStubsSrcJar = android.PathForModuleOut(ctx, ctx.ModuleName()+"-"+"jdiff-stubs.srcjar")
1862 srcJarList := zipSyncCmd(ctx, rule, srcJarDir, d.Javadoc.srcJars)
1864 cmd := javadocBootclasspathCmd(ctx, rule, d.Javadoc.srcFiles, outDir, srcJarDir, srcJarList,
1865 deps.bootClasspath, deps.classpath, d.sourcepaths)
1873 if d.apiXmlFile != nil {
1874 cmd.FlagWithArg("-newapi ", strings.TrimSuffix(d.apiXmlFile.Base(), d.apiXmlFile.Ext())).
1875 FlagWithArg("-newapidir ", filepath.Dir(d.apiXmlFile.String())).
1876 Implicit(d.apiXmlFile)
1879 if d.lastReleasedApiXmlFile != nil {
1880 …cmd.FlagWithArg("-oldapi ", strings.TrimSuffix(d.lastReleasedApiXmlFile.Base(), d.lastReleasedApiX…
1881 FlagWithArg("-oldapidir ", filepath.Dir(d.lastReleasedApiXmlFile.String())).
1882 Implicit(d.lastReleasedApiXmlFile)
1889 FlagWithOutput("-o ", d.jdiffDocZip).
1897 FlagWithOutput("-o ", d.jdiffStubsSrcJar).
1939 func (d *ExportedDroiddocDir) DepsMutator(android.BottomUpMutatorContext) {}
1941 func (d *ExportedDroiddocDir) GenerateAndroidBuildActions(ctx android.ModuleContext) {
1942 path := String(d.properties.Path)
1943 d.dir = android.PathForModuleSrc(ctx, path)
1944 d.deps = android.PathsForModuleSrc(ctx, []string{filepath.Join(path, "**/*")})
2031 func (d *PrebuiltStubsSources) StubsSrcJar() android.Path {
2032 return d.stubsSrcJar
2047 for _, d := range p.srcDirs {
2048 dir := d.String()
2051 FlagWithInput("-D ", d)