Fix the build breakage for droiddoc
Removed the additional "-source $javaVersion" arg in javadoc rule otherwise javadoc will report error: javadoc: error - The -source option may be specified no more than once. Test: m -j ahat-docs Bug: b/70351683 Change-Id: I7f92236884154075fb4b20cd9a363419b1ecd3f5
This commit is contained in:
@@ -30,7 +30,7 @@ var (
|
|||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `rm -rf "$outDir" "$srcJarDir" "$stubsDir" && mkdir -p "$outDir" "$srcJarDir" "$stubsDir" && ` +
|
Command: `rm -rf "$outDir" "$srcJarDir" "$stubsDir" && mkdir -p "$outDir" "$srcJarDir" "$stubsDir" && ` +
|
||||||
`${config.ZipSyncCmd} -d $srcJarDir -l $srcJarDir/list -f "*.java" $srcJars && ` +
|
`${config.ZipSyncCmd} -d $srcJarDir -l $srcJarDir/list -f "*.java" $srcJars && ` +
|
||||||
`${config.JavadocCmd} -source $javaVersion -encoding UTF-8 @$out.rsp @$srcJarDir/list ` +
|
`${config.JavadocCmd} -encoding UTF-8 @$out.rsp @$srcJarDir/list ` +
|
||||||
`$opts $bootclasspathArgs $classpathArgs -sourcepath $sourcepath ` +
|
`$opts $bootclasspathArgs $classpathArgs -sourcepath $sourcepath ` +
|
||||||
`-d $outDir -quiet && ` +
|
`-d $outDir -quiet && ` +
|
||||||
`${config.SoongZipCmd} -write_if_changed -d -o $docZip -C $outDir -D $outDir && ` +
|
`${config.SoongZipCmd} -write_if_changed -d -o $docZip -C $outDir -D $outDir && ` +
|
||||||
@@ -44,7 +44,7 @@ var (
|
|||||||
RspfileContent: "$in",
|
RspfileContent: "$in",
|
||||||
Restat: true,
|
Restat: true,
|
||||||
},
|
},
|
||||||
"outDir", "srcJarDir", "stubsDir", "javaVersion", "srcJars", "opts",
|
"outDir", "srcJarDir", "stubsDir", "srcJars", "opts",
|
||||||
"bootclasspathArgs", "classpathArgs", "sourcepath", "docZip")
|
"bootclasspathArgs", "classpathArgs", "sourcepath", "docZip")
|
||||||
|
|
||||||
apiCheck = pctx.AndroidStaticRule("apiCheck",
|
apiCheck = pctx.AndroidStaticRule("apiCheck",
|
||||||
@@ -550,7 +550,7 @@ func (j *Javadoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
|
|
||||||
implicits = append(implicits, j.srcJars...)
|
implicits = append(implicits, j.srcJars...)
|
||||||
|
|
||||||
opts := "-J-Xmx1024m -XDignore.symbol.file -Xdoclint:none"
|
opts := "-source " + javaVersion + " -J-Xmx1024m -XDignore.symbol.file -Xdoclint:none"
|
||||||
|
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: javadoc,
|
Rule: javadoc,
|
||||||
@@ -563,7 +563,6 @@ func (j *Javadoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
"outDir": android.PathForModuleOut(ctx, "docs", "out").String(),
|
"outDir": android.PathForModuleOut(ctx, "docs", "out").String(),
|
||||||
"srcJarDir": android.PathForModuleOut(ctx, "docs", "srcjars").String(),
|
"srcJarDir": android.PathForModuleOut(ctx, "docs", "srcjars").String(),
|
||||||
"stubsDir": android.PathForModuleOut(ctx, "docs", "stubsDir").String(),
|
"stubsDir": android.PathForModuleOut(ctx, "docs", "stubsDir").String(),
|
||||||
"javaVersion": javaVersion,
|
|
||||||
"srcJars": strings.Join(j.srcJars.Strings(), " "),
|
"srcJars": strings.Join(j.srcJars.Strings(), " "),
|
||||||
"opts": opts,
|
"opts": opts,
|
||||||
"bootclasspathArgs": bootClasspathArgs,
|
"bootclasspathArgs": bootClasspathArgs,
|
||||||
@@ -868,7 +867,6 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
"srcJarDir": android.PathForModuleOut(ctx, "docs", "srcjars").String(),
|
"srcJarDir": android.PathForModuleOut(ctx, "docs", "srcjars").String(),
|
||||||
"stubsDir": android.PathForModuleOut(ctx, "docs", "stubsDir").String(),
|
"stubsDir": android.PathForModuleOut(ctx, "docs", "stubsDir").String(),
|
||||||
"srcJars": strings.Join(d.Javadoc.srcJars.Strings(), " "),
|
"srcJars": strings.Join(d.Javadoc.srcJars.Strings(), " "),
|
||||||
"javaVersion": javaVersion,
|
|
||||||
"opts": opts,
|
"opts": opts,
|
||||||
"bootclasspathArgs": bootClasspathArgs,
|
"bootclasspathArgs": bootClasspathArgs,
|
||||||
"classpathArgs": classpathArgs,
|
"classpathArgs": classpathArgs,
|
||||||
|
Reference in New Issue
Block a user