diff options
| author | 2021-06-04 16:20:25 +0100 | |
|---|---|---|
| committer | 2021-06-07 16:04:46 +0100 | |
| commit | 556e8149cb7781cbe01ea01a8b8a05eb1b018f1a (patch) | |
| tree | 6e2e6cbd89fa231522117fe1cfcdefab106dac6e /java | |
| parent | edd61643be3096af46d1f6aea1091897f668c66b (diff) | |
Remove sourcepath argument from metalava invocations
This is no longer required to find package.html files, so remove it.
Bug: 153703940
Test: m checkapi
Change-Id: I80ec219cb9ef8922094336a5d45652c8e59aa113
Diffstat (limited to 'java')
| -rw-r--r-- | java/droidstubs.go | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/java/droidstubs.go b/java/droidstubs.go index 3607082ef..d348b5556 100644 --- a/java/droidstubs.go +++ b/java/droidstubs.go @@ -392,22 +392,11 @@ func (d *Droidstubs) apiLevelsAnnotationsFlags(ctx android.ModuleContext, cmd *a } func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersion javaVersion, srcs android.Paths, - srcJarList android.Path, bootclasspath, classpath classpath, sourcepaths android.Paths, - homeDir android.WritablePath) *android.RuleBuilderCommand { + srcJarList android.Path, bootclasspath, classpath classpath, homeDir android.WritablePath) *android.RuleBuilderCommand { rule.Command().Text("rm -rf").Flag(homeDir.String()) rule.Command().Text("mkdir -p").Flag(homeDir.String()) - var cmd *android.RuleBuilderCommand - if len(sourcepaths) > 0 { - // We are passing the sourcepaths as an argument to metalava below, but the directories may - // not exist already (if they do not contain any listed inputs for metalava). Note that this - // is in a rule.SboxInputs()rule, so we are not modifying the actual source tree by creating - // these directories. - cmd = rule.Command() - cmd.Text("mkdir -p").Flags(cmd.PathsForInputs(sourcepaths)) - } - - cmd = rule.Command() + cmd := rule.Command() cmd.FlagWithArg("ANDROID_PREFS_ROOT=", homeDir.String()) if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_METALAVA") { @@ -440,13 +429,6 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi cmd.FlagWithInputList("-classpath ", classpath.Paths(), ":") } - if len(sourcepaths) > 0 { - // TODO(b/153703940): Pass .html files to metalava and remove this argument. - cmd.FlagWithList("-sourcepath ", sourcepaths.Strings(), ":") - } else { - cmd.FlagWithArg("-sourcepath ", `""`) - } - cmd.Flag("--no-banner"). Flag("--color"). Flag("--quiet"). @@ -490,7 +472,7 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) { homeDir := android.PathForModuleOut(ctx, "metalava", "home") cmd := metalavaCmd(ctx, rule, javaVersion, d.Javadoc.srcFiles, srcJarList, - deps.bootClasspath, deps.classpath, d.Javadoc.sourcepaths, homeDir) + deps.bootClasspath, deps.classpath, homeDir) cmd.Implicits(d.Javadoc.implicits) d.stubsFlags(ctx, cmd, stubsDir) |