Add gantry_mode flag to finalize_sdk script.

Add a new flag to detect that the script is being executed by Gantry.
The following changes are made when executed via Gantry -
1. The artifacts are fetched in /tmp/ directory, so that they can be
directly used to raise gerrit changes via google3.
2. Since it is an automated execution, no need to check if the script
is executed for Android root.
3. Since google3 does not have repo initialized and the git projects
does not exist in google3, do not use repo and git commit commands.
4. The prebuilts/sdk/extensions/README.md file update will be handled
explicitly in google3, and hence does not require update via finalize
sdk script.

Bug: 321970705
Test: packages/modules/common/tools/finalize_sdk.py -f 14 -b 256848771 -c mainline -r 'Finalization Test' -m com.google.android.adservices 11609273

Change-Id: I9a4fe78dd2fd628e155c2bbd9b3d4bf539396dfb
1 file changed
tree: 87689e7b61f6cf8b3609912587d36bcfbd745b20
  1. build/
  2. java/
  3. javatests/
  4. proguard/
  5. proto/
  6. sdk/
  7. tools/
  8. Android.bp
  9. MODULES_OWNERS
  10. OWNERS
  11. PREBUILTS_MODULE_OWNERS
  12. PREUPLOAD.cfg
  13. README.md
README.md

packages/modules/common

This project includes mainline build and other utility code. Any library code intended for use by modules should go in frameworks/libs/modules-utils instead.

java code

This project uses a single source path for java code. All java code should go in the java directory with subdirectories corresponding to the java package. Android.bp files should go alongside the java source files, and should only include java source for a single java package to encourage good code hygiene.

Tests for java code should go in the javatests directory and follow the same structure.