Merge "Add phony rule for java_api_library module type" am: c05902cff9 am: a30b3145c7

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321693

Change-Id: Ieb88442620943271c2137bbfd9b6d4d3aa50f6e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jihoon Kang 2022-11-30 18:12:52 +00:00 committed by Automerger Merge Worker
commit ad5ec862df

View file

@ -1662,7 +1662,7 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
var srcFiles []android.Path
ctx.VisitDirectDepsWithTag(javaApiContributionTag, func(dep android.Module) {
provider := ctx.OtherModuleProvider(dep, JavaApiImportProvider).(JavaApiImportInfo)
srcFiles = append(srcFiles, android.PathForModuleSrc(ctx, provider.ApiFile.String()))
srcFiles = append(srcFiles, android.PathForSource(ctx, provider.ApiFile.String()))
})
cmd := metalavaStubCmd(ctx, rule, srcFiles, homeDir)
@ -1687,6 +1687,8 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
TransformJavaToClasses(ctx, al.stubsJar, 0, android.Paths{},
android.Paths{al.stubsSrcJar}, flags, android.Paths{})
ctx.Phony(ctx.ModuleName(), al.stubsJar)
}
//