From 3ea6467c1ce974f2569bfa2ed196f879b3b90d58 Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Fri, 3 Nov 2023 00:40:26 +0000 Subject: [PATCH] Update checkapi error message to provide more guidance With from-text stub feature, checkapi is also used for checking the sanity of the stubs. Therefore, this change adds more explanatory message about how the user can rebuild the target when their build failed with stub validation after local API change. Test: m nothing Bug: 309027703 Change-Id: If7c9c287266f3da82edde663619b9f08ee05530d --- java/droidstubs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/java/droidstubs.go b/java/droidstubs.go index c000ac382..180ba92cf 100644 --- a/java/droidstubs.go +++ b/java/droidstubs.go @@ -775,6 +775,11 @@ func (d *Droidstubs) GenerateAndroidBuildActions(ctx android.ModuleContext) { ` m %s-update-current-api\n\n`+ ` To submit the revised current.txt to the main Android repository,\n`+ ` you will need approval.\n`+ + `If your build failed due to stub validation, you can resolve the errors with\n`+ + `either of the two choices above and try re-building the target.\n`+ + `If the mismatch between the stubs and the current.txt is intended,\n`+ + `you can try re-building the target by executing the following command:\n`+ + `m DISABLE_STUB_VALIDATION=true \n`+ `******************************\n`, ctx.ModuleName()) rule.Command().