Use soong_zip -srcjar for proto and aidl srcjars
IntelliJ's indexer is unhappy with the full paths in the proto and aidl srcjars. Use the -srcjar argument to soong_zip, which causes it to extract the correct filename for .java files based on the package statement in the file. Bug: 176209347 Test: manual Change-Id: I63d9d4f6ba670e3b851835d719519d675ae54c7f
This commit is contained in:
@@ -78,10 +78,7 @@ func genAidl(ctx android.ModuleContext, aidlFiles android.Paths, aidlFlags strin
|
|||||||
|
|
||||||
rule.Command().
|
rule.Command().
|
||||||
Tool(ctx.Config().HostToolPath(ctx, "soong_zip")).
|
Tool(ctx.Config().HostToolPath(ctx, "soong_zip")).
|
||||||
// TODO(b/124333557): this can't use -srcjar for now, aidl on parcelables generates java files
|
Flag("-srcjar").
|
||||||
// without a package statement, which causes -srcjar to put them in the top level of the zip file.
|
|
||||||
// Once aidl skips parcelables we can use -srcjar.
|
|
||||||
//Flag("-srcjar").
|
|
||||||
Flag("-write_if_changed").
|
Flag("-write_if_changed").
|
||||||
FlagWithOutput("-o ", srcJarFile).
|
FlagWithOutput("-o ", srcJarFile).
|
||||||
FlagWithArg("-C ", outDir.String()).
|
FlagWithArg("-C ", outDir.String()).
|
||||||
|
@@ -49,7 +49,7 @@ func genProto(ctx android.ModuleContext, protoFiles android.Paths, flags android
|
|||||||
// into a srcjar.
|
// into a srcjar.
|
||||||
rule.Command().
|
rule.Command().
|
||||||
BuiltTool("soong_zip").
|
BuiltTool("soong_zip").
|
||||||
Flag("-jar").
|
Flag("-srcjar").
|
||||||
Flag("-write_if_changed").
|
Flag("-write_if_changed").
|
||||||
FlagWithOutput("-o ", srcJarFile).
|
FlagWithOutput("-o ", srcJarFile).
|
||||||
FlagWithArg("-C ", outDir.String()).
|
FlagWithArg("-C ", outDir.String()).
|
||||||
|
Reference in New Issue
Block a user