summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-03-20 00:40:44 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-03-20 00:40:44 +0000
commit99edb2411a92ba72826d7f732c400d205806eec9 (patch)
tree743b6a513ce0cb83fe92289b100b78d100971652
parent3d825cd1accea97e05fed63bc49b2d2dc20d33c4 (diff)
parent53018f41ebbe9baf992981c88cedea81c0331241 (diff)
downloadinternal-99edb2411a92ba72826d7f732c400d205806eec9.tar.gz
Merge "Change removal of <type>aar</type> to only check pom files in androidx/" into androidx-master-dev
-rwxr-xr-ximport_release_prebuilts.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/import_release_prebuilts.py b/import_release_prebuilts.py
index 5ad88dddca..d498531ee6 100755
--- a/import_release_prebuilts.py
+++ b/import_release_prebuilts.py
@@ -118,20 +118,22 @@ def fetch_and_extract(target, build_id, file, artifact_path=None):
return None
return extract_artifact(artifact_path)
-def remove_type_aar_from_pom_files():
+def remove_type_aar_from_pom_files(repo_dir):
+ # Only search pom files to in <repo_dir>
print("Removing <type>aar</type> from the pom files...", end = '')
try:
# Comment out <type>aar</type> in our pom files
# This is being done as a workaround for b/118385540
# TODO: Remove this method once https://github.com/gradle/gradle/issues/7594 is fixed
- subprocess.check_output("find -name *.pom | xargs sed 's|^ <type>aar</type>$| <!--<type>aar</type>-->|' -i", shell=True)
+ subprocess.check_output("find " + repo_dir + " -name *.pom | xargs sed 's|^ <type>aar</type>$| <!--<type>aar</type>-->|' -i", shell=True)
except subprocess.CalledProcessError:
print("failed!")
print_e("FAIL: Failed to remove <type>aar</type> from the pom files")
summary_log.append("FAILED to remove <type>aar</type> from the pom files")
- return
+ return False
print("Successful")
summary_log.append("<type>aar</type> was removed from the pom files")
+ return True
def update_new_artifacts(group_id_file_path, groupId_ver_map, artifactId_ver_map, groupId):
# Finds each new library having groupId <groupId> under <group_id_file_path> and
@@ -301,6 +303,7 @@ def update_androidx(target, build_id, local_file, update_all_prebuilts):
print_e('Failed to copy and merge AndroidX repository')
return False
print("Copy and merge artifacts... Successful")
+ remove_type_aar_from_pom_files("androidx")
if not args.skip_publishdocrules:
if not update_publish_doc_rules():
print_e('Failed to update PublicDocRules.kt')
@@ -411,6 +414,5 @@ else:
if not commit_prebuilts(): sys.exit(1)
commit_publish_docs_rules()
-remove_type_aar_from_pom_files()
print_change_summary()
print("Test and check these changes before uploading to Gerrit") \ No newline at end of file