Merge "Revert "Revert "Switch to use new Doclava"""

This commit is contained in:
Sorin Basca 2023-03-01 17:15:25 +00:00 committed by Gerrit Code Review
commit a05f0437fe

View file

@ -603,12 +603,10 @@ func (d *Droiddoc) doclavaDocsFlags(ctx android.ModuleContext, cmd *android.Rule
Flag("-J-XX:-OmitStackTraceInFastThrow").
Flag("-XDignore.symbol.file").
Flag("--ignore-source-errors").
// b/240421555: use a stub doclet until Doclava works with JDK 17
//FlagWithArg("-doclet ", "com.google.doclava.Doclava").
FlagWithArg("-doclet ", "com.google.stubdoclet.StubDoclet").
FlagWithArg("-doclet ", "com.google.doclava.Doclava").
FlagWithInputList("-docletpath ", docletPath.Paths(), ":").
FlagWithArg("-Xmaxerrs ", "1").
FlagWithArg("-Xmaxwarns ", "1").
FlagWithArg("-Xmaxerrs ", "10").
FlagWithArg("-Xmaxwarns ", "10").
Flag("-J--add-exports=jdk.javadoc/jdk.javadoc.internal.doclets.formats.html=ALL-UNNAMED").
Flag("-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED").
FlagWithArg("-hdf page.build ", ctx.Config().BuildId()+"-$(cat "+buildNumberFile.String()+")").OrderOnly(buildNumberFile).
@ -780,8 +778,6 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
jsilver := ctx.Config().HostJavaToolPath(ctx, "jsilver.jar")
doclava := ctx.Config().HostJavaToolPath(ctx, "doclava.jar")
// b/240421555: use a stub doclet until Doclava works with JDK 17
stubdoclet := ctx.Config().HostJavaToolPath(ctx, "stubdoclet.jar")
outDir := android.PathForModuleOut(ctx, "out")
srcJarDir := android.PathForModuleOut(ctx, "srcjars")
@ -809,8 +805,7 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
if Bool(d.properties.Dokka_enabled) {
desc = "dokka"
} else {
// b/240421555: use a stub doclet until Doclava works with JDK 17
d.doclavaDocsFlags(ctx, cmd, classpath{jsilver, doclava, stubdoclet})
d.doclavaDocsFlags(ctx, cmd, classpath{jsilver, doclava})
for _, o := range d.Javadoc.properties.Out {
cmd.ImplicitOutput(android.PathForModuleGen(ctx, o))
@ -828,9 +823,9 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
FlagWithArg("-C ", outDir.String()).
FlagWithArg("-D ", outDir.String())
// rule.Restat()
rule.Restat()
// zipSyncCleanupCmd(rule, srcJarDir)
zipSyncCleanupCmd(rule, srcJarDir)
rule.Build("javadoc", desc)
}