Use OutputFilesProvider on JavaDoc and Droiddoc
In the context of incremental soong, the output files inter-module-communication will be through OutputFilesProvider. The OutputFileProducer interface will be deprecated. Test: CI Bug: 339477385 Change-Id: If3d501a0dde0f1f00508c4e4e73ce42918b7e610
This commit is contained in:
@@ -223,17 +223,6 @@ type Javadoc struct {
|
||||
exportableStubsSrcJar android.WritablePath
|
||||
}
|
||||
|
||||
func (j *Javadoc) OutputFiles(tag string) (android.Paths, error) {
|
||||
switch tag {
|
||||
case "":
|
||||
return android.Paths{j.stubsSrcJar}, nil
|
||||
case ".docs.zip":
|
||||
return android.Paths{j.docZip}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
|
||||
}
|
||||
}
|
||||
|
||||
// javadoc converts .java source files to documentation using javadoc.
|
||||
func JavadocFactory() android.Module {
|
||||
module := &Javadoc{}
|
||||
@@ -254,8 +243,6 @@ func JavadocHostFactory() android.Module {
|
||||
return module
|
||||
}
|
||||
|
||||
var _ android.OutputFileProducer = (*Javadoc)(nil)
|
||||
|
||||
func (j *Javadoc) SdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
|
||||
return android.SdkSpecFrom(ctx, String(j.properties.Sdk_version))
|
||||
}
|
||||
@@ -585,6 +572,9 @@ func (j *Javadoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
zipSyncCleanupCmd(rule, srcJarDir)
|
||||
|
||||
rule.Build("javadoc", "javadoc")
|
||||
|
||||
ctx.SetOutputFiles(android.Paths{j.stubsSrcJar}, "")
|
||||
ctx.SetOutputFiles(android.Paths{j.docZip}, ".docs.zip")
|
||||
}
|
||||
|
||||
// Droiddoc
|
||||
@@ -616,15 +606,6 @@ func DroiddocHostFactory() android.Module {
|
||||
return module
|
||||
}
|
||||
|
||||
func (d *Droiddoc) OutputFiles(tag string) (android.Paths, error) {
|
||||
switch tag {
|
||||
case "", ".docs.zip":
|
||||
return android.Paths{d.Javadoc.docZip}, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
|
||||
}
|
||||
}
|
||||
|
||||
func (d *Droiddoc) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
d.Javadoc.addDeps(ctx)
|
||||
|
||||
@@ -876,6 +857,9 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
zipSyncCleanupCmd(rule, srcJarDir)
|
||||
|
||||
rule.Build("javadoc", desc)
|
||||
|
||||
ctx.SetOutputFiles(android.Paths{d.Javadoc.docZip}, "")
|
||||
ctx.SetOutputFiles(android.Paths{d.Javadoc.docZip}, ".docs.zip")
|
||||
}
|
||||
|
||||
// Exported Droiddoc Directory
|
||||
|
Reference in New Issue
Block a user