Merge "Fix build breakages when WITHOUT_CHECK_API=true" into rvc-dev am: 4c21463f04
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11931085 Change-Id: Ibf4d31078a4a206c7296241aef8c06cfa7b0becb
This commit is contained in:
@@ -1419,7 +1419,7 @@ func (d *Droidstubs) apiLevelsAnnotationsFlags(ctx android.ModuleContext, cmd *a
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Droidstubs) apiToXmlFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand) {
|
func (d *Droidstubs) apiToXmlFlags(ctx android.ModuleContext, cmd *android.RuleBuilderCommand) {
|
||||||
if Bool(d.properties.Jdiff_enabled) && !ctx.Config().IsPdkBuild() {
|
if Bool(d.properties.Jdiff_enabled) && !ctx.Config().IsPdkBuild() && d.apiFile != nil {
|
||||||
if d.apiFile.String() == "" {
|
if d.apiFile.String() == "" {
|
||||||
ctx.ModuleErrorf("API signature file has to be specified in Metalava when jdiff is enabled.")
|
ctx.ModuleErrorf("API signature file has to be specified in Metalava when jdiff is enabled.")
|
||||||
}
|
}
|
||||||
@@ -1856,13 +1856,19 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
Flag("-XDignore.symbol.file").
|
Flag("-XDignore.symbol.file").
|
||||||
FlagWithArg("-doclet ", "jdiff.JDiff").
|
FlagWithArg("-doclet ", "jdiff.JDiff").
|
||||||
FlagWithInput("-docletpath ", jdiff).
|
FlagWithInput("-docletpath ", jdiff).
|
||||||
Flag("-quiet").
|
Flag("-quiet")
|
||||||
FlagWithArg("-newapi ", strings.TrimSuffix(d.apiXmlFile.Base(), d.apiXmlFile.Ext())).
|
|
||||||
|
if d.apiXmlFile != nil {
|
||||||
|
cmd.FlagWithArg("-newapi ", strings.TrimSuffix(d.apiXmlFile.Base(), d.apiXmlFile.Ext())).
|
||||||
FlagWithArg("-newapidir ", filepath.Dir(d.apiXmlFile.String())).
|
FlagWithArg("-newapidir ", filepath.Dir(d.apiXmlFile.String())).
|
||||||
Implicit(d.apiXmlFile).
|
Implicit(d.apiXmlFile)
|
||||||
FlagWithArg("-oldapi ", strings.TrimSuffix(d.lastReleasedApiXmlFile.Base(), d.lastReleasedApiXmlFile.Ext())).
|
}
|
||||||
|
|
||||||
|
if d.lastReleasedApiXmlFile != nil {
|
||||||
|
cmd.FlagWithArg("-oldapi ", strings.TrimSuffix(d.lastReleasedApiXmlFile.Base(), d.lastReleasedApiXmlFile.Ext())).
|
||||||
FlagWithArg("-oldapidir ", filepath.Dir(d.lastReleasedApiXmlFile.String())).
|
FlagWithArg("-oldapidir ", filepath.Dir(d.lastReleasedApiXmlFile.String())).
|
||||||
Implicit(d.lastReleasedApiXmlFile)
|
Implicit(d.lastReleasedApiXmlFile)
|
||||||
|
}
|
||||||
|
|
||||||
rule.Command().
|
rule.Command().
|
||||||
BuiltTool(ctx, "soong_zip").
|
BuiltTool(ctx, "soong_zip").
|
||||||
|
@@ -2203,8 +2203,12 @@ func (s *sdkLibrarySdkMemberProperties) PopulateFromVariant(ctx android.SdkMembe
|
|||||||
properties.Jars = jars
|
properties.Jars = jars
|
||||||
properties.SdkVersion = sdk.sdkVersionForStubsLibrary(ctx.SdkModuleContext(), apiScope)
|
properties.SdkVersion = sdk.sdkVersionForStubsLibrary(ctx.SdkModuleContext(), apiScope)
|
||||||
properties.StubsSrcJar = paths.stubsSrcJar.Path()
|
properties.StubsSrcJar = paths.stubsSrcJar.Path()
|
||||||
|
if paths.currentApiFilePath.Valid() {
|
||||||
properties.CurrentApiFile = paths.currentApiFilePath.Path()
|
properties.CurrentApiFile = paths.currentApiFilePath.Path()
|
||||||
|
}
|
||||||
|
if paths.removedApiFilePath.Valid() {
|
||||||
properties.RemovedApiFile = paths.removedApiFilePath.Path()
|
properties.RemovedApiFile = paths.removedApiFilePath.Path()
|
||||||
|
}
|
||||||
s.Scopes[apiScope] = properties
|
s.Scopes[apiScope] = properties
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user