Rename output stubs jar file in java_api_library
When generating framework.aidl, `android_*_stubs_current` are converted to .aidl files (and created as targets) by replacing the extension from `.jar` to `.aidl`. Thus, when replacing `android_*_stubs_current` to java_api_library modules, generating `android.jar` files leads to ninja error(multiple rules for generating */android.aidl error). Prevent this error by renaming the name of the artifact jar file as the module name so that distinct-named ninja targets can be created. Test: m Change-Id: Iaa7248996d7bf5e7f98e1d1e2919870c3cccf5a6
This commit is contained in:
@@ -1782,7 +1782,7 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
rule.Build("metalava", "metalava merged")
|
||||
compiledStubs := android.PathForModuleOut(ctx, ctx.ModuleName(), "stubs.jar")
|
||||
al.stubsJar = android.PathForModuleOut(ctx, ctx.ModuleName(), "android.jar")
|
||||
al.stubsJar = android.PathForModuleOut(ctx, ctx.ModuleName(), fmt.Sprintf("%s.jar", ctx.ModuleName()))
|
||||
|
||||
var flags javaBuilderFlags
|
||||
flags.javaVersion = getStubsJavaVersion()
|
||||
|
Reference in New Issue
Block a user