Merge "Update droidstubs build target"
This commit is contained in:
@@ -534,6 +534,9 @@ func (dstubs *Droidstubs) AndroidMkEntries() android.AndroidMkEntries {
|
|||||||
if dstubs.jdiffDocZip != nil {
|
if dstubs.jdiffDocZip != nil {
|
||||||
entries.SetPath("LOCAL_DROIDDOC_JDIFF_DOC_ZIP", dstubs.jdiffDocZip)
|
entries.SetPath("LOCAL_DROIDDOC_JDIFF_DOC_ZIP", dstubs.jdiffDocZip)
|
||||||
}
|
}
|
||||||
|
if dstubs.metadataZip != nil {
|
||||||
|
entries.SetPath("LOCAL_DROIDDOC_METADATA_ZIP", dstubs.metadataZip)
|
||||||
|
}
|
||||||
apiFilePrefix := "INTERNAL_PLATFORM_"
|
apiFilePrefix := "INTERNAL_PLATFORM_"
|
||||||
if String(dstubs.properties.Api_tag_name) != "" {
|
if String(dstubs.properties.Api_tag_name) != "" {
|
||||||
apiFilePrefix += String(dstubs.properties.Api_tag_name) + "_"
|
apiFilePrefix += String(dstubs.properties.Api_tag_name) + "_"
|
||||||
|
@@ -1193,6 +1193,9 @@ type Droidstubs struct {
|
|||||||
|
|
||||||
jdiffDocZip android.WritablePath
|
jdiffDocZip android.WritablePath
|
||||||
jdiffStubsSrcJar android.WritablePath
|
jdiffStubsSrcJar android.WritablePath
|
||||||
|
|
||||||
|
metadataZip android.WritablePath
|
||||||
|
metadataDir android.WritablePath
|
||||||
}
|
}
|
||||||
|
|
||||||
// droidstubs passes sources files through Metalava to generate stub .java files that only contain the API to be
|
// droidstubs passes sources files through Metalava to generate stub .java files that only contain the API to be
|
||||||
@@ -1304,7 +1307,8 @@ func (d *Droidstubs) stubsFlags(ctx android.ModuleContext, cmd *android.RuleBuil
|
|||||||
}
|
}
|
||||||
|
|
||||||
if Bool(d.properties.Write_sdk_values) {
|
if Bool(d.properties.Write_sdk_values) {
|
||||||
cmd.FlagWithArg("--sdk-values ", android.PathForModuleOut(ctx, "out").String())
|
d.metadataDir = android.PathForModuleOut(ctx, "metadata")
|
||||||
|
cmd.FlagWithArg("--sdk-values ", d.metadataDir.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
if Bool(d.properties.Create_doc_stubs) {
|
if Bool(d.properties.Create_doc_stubs) {
|
||||||
@@ -1511,6 +1515,18 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
FlagWithOutput("-o ", d.Javadoc.stubsSrcJar).
|
FlagWithOutput("-o ", d.Javadoc.stubsSrcJar).
|
||||||
FlagWithArg("-C ", stubsDir.String()).
|
FlagWithArg("-C ", stubsDir.String()).
|
||||||
FlagWithArg("-D ", stubsDir.String())
|
FlagWithArg("-D ", stubsDir.String())
|
||||||
|
|
||||||
|
if Bool(d.properties.Write_sdk_values) {
|
||||||
|
d.metadataZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"-metadata.zip")
|
||||||
|
rule.Command().
|
||||||
|
BuiltTool(ctx, "soong_zip").
|
||||||
|
Flag("-write_if_changed").
|
||||||
|
Flag("-d").
|
||||||
|
FlagWithOutput("-o ", d.metadataZip).
|
||||||
|
FlagWithArg("-C ", d.metadataDir.String()).
|
||||||
|
FlagWithArg("-D ", d.metadataDir.String())
|
||||||
|
}
|
||||||
|
|
||||||
rule.Restat()
|
rule.Restat()
|
||||||
|
|
||||||
zipSyncCleanupCmd(rule, srcJarDir)
|
zipSyncCleanupCmd(rule, srcJarDir)
|
||||||
|
Reference in New Issue
Block a user