summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2022-12-15 16:01:03 -0500
committerAlan Viverette <alanv@google.com>2022-12-15 21:24:36 +0000
commit98f24c38aef5ae66dfd9e0c175efd4a5fcd1c545 (patch)
tree2f723c7aaa7736f71a6ae4acfa17d5254ccffab5
parente8461275281cc257e5120e1549bb9de12e36d764 (diff)
downloadsdk-98f24c38aef5ae66dfd9e0c175efd4a5fcd1c545.tar.gz
Don't write pom2bp invocation arguments to AndroidX output
Fixes: 246630004 Test: ./update_prebuilts.py -x <build-id> Merged-In: I12fa92bb38d572d8571e9a7bf4096fa54f34650e Change-Id: I12fa92bb38d572d8571e9a7bf4096fa54f34650e
-rwxr-xr-xupdate_prebuilts/update_prebuilts.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/update_prebuilts/update_prebuilts.py b/update_prebuilts/update_prebuilts.py
index e444068c1..2b0b2be9e 100755
--- a/update_prebuilts/update_prebuilts.py
+++ b/update_prebuilts/update_prebuilts.py
@@ -442,7 +442,8 @@ def detect_artifacts(maven_repo_dirs):
def transform_maven_repos(maven_repo_dirs, transformed_dir, extract_res=True,
- include_static_deps=True, include=None, exclude=None, prepend=None):
+ write_pom2bp_cmd=True, include_static_deps=True, include=None,
+ exclude=None, prepend=None):
"""Transforms a standard Maven repository to be compatible with the Android build system.
When using the include argument by itself, all other libraries will be excluded. When using the
@@ -453,6 +454,7 @@ def transform_maven_repos(maven_repo_dirs, transformed_dir, extract_res=True,
maven_repo_dirs: path to local Maven repository
transformed_dir: relative path for output, ex. androidx
extract_res: whether to extract Android resources like AndroidManifest.xml from AARs
+ write_pom2bp_cmd: whether pom2bp should write its own invocation arguments to output
include_static_deps: whether to pass --static-deps to pom2bp
include: list of Maven groupIds or unversioned artifact coordinates to include for
updates, ex. androidx.core or androidx.core:core
@@ -528,6 +530,8 @@ def transform_maven_repos(maven_repo_dirs, transformed_dir, extract_res=True,
args = ['pom2bp']
args.extend(['-sdk-version', '31'])
args.extend(['-default-min-sdk-version', '24'])
+ if not write_pom2bp_cmd:
+ args.extend(['-write-cmd=false'])
if include_static_deps:
args.append('-static-deps')
if prepend:
@@ -705,8 +709,9 @@ def update_androidx(target, build_id, local_file, include, exclude, beyond_corp)
prepend_path = os.path.relpath('update_prebuilts/prepend_androidx_license', start=temp_dir)
# Transform the repo archive into a Makefile-compatible format.
- if not transform_maven_repos([repo_dir], androidx_dir, extract_res=False, include=include,
- exclude=exclude, prepend=prepend_path):
+ if not transform_maven_repos([repo_dir], androidx_dir, write_pom2bp_cmd=False,
+ extract_res=False, include=include, exclude=exclude,
+ prepend=prepend_path):
return False
# Import JavaPlugins.bp in Android.bp.