Add argument for updating SL, app toolkit, and Androidx at once
Also remove existing arguments to prevent users from accidentally only updating a subset of them
Bug: 76088091
Test: ./update_prebuilts.py --stx <build_id>
Change-Id: I1436bb43a1cca337a806e64994d3868897760088
diff --git a/update_prebuilts/update_prebuilts.py b/update_prebuilts/update_prebuilts.py
index 4ae177b..86b058e 100755
--- a/update_prebuilts/update_prebuilts.py
+++ b/update_prebuilts/update_prebuilts.py
@@ -836,18 +836,9 @@
'--constraint_x', action="store_true",
help='If specified, updates Constraint Layout X')
parser.add_argument(
- '-s', '--support', action="store_true",
- help='If specified, updates only the Support Library')
-parser.add_argument(
- '-x', '--androidx', action="store_true",
- help='If specified, updates only AndroidX')
-parser.add_argument(
'-j', '--jetifier', action="store_true",
help='If specified, updates only Jetifier')
parser.add_argument(
- '-t', '--toolkit', action="store_true",
- help='If specified, updates only the App Toolkit')
-parser.add_argument(
'-p', '--platform', action="store_true",
help='If specified, updates only the Android Platform')
parser.add_argument(
@@ -857,9 +848,16 @@
'-b', '--buildtools', action="store_true",
help='If specified, updates only the Build Tools')
parser.add_argument(
+ '--stx', action="store_true",
+ help='If specified, updates Support Library, Androidx, and App Toolkit (that is, all artifacts built from frameworks/support)')
+parser.add_argument(
'--commit-first', action="store_true",
help='If specified, then if uncommited changes exist, commit before continuing')
args = parser.parse_args()
+if args.stx:
+ args.support = args.toolkit = args.androidx = True
+else:
+ args.support = args.toolkit = args.androidx = False
args.file = True
if not args.source:
parser.error("You must specify a build ID or local Maven ZIP file")