gradle_dependencies: python3

This commit is contained in:
blshkv 2020-11-03 10:20:19 +08:00
parent e899ca3427
commit 0b89fcefb1
No known key found for this signature in database
GPG key ID: 32BDCED870788F04

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@ -29,7 +29,7 @@ def main(argv):
temp_home = os.path.join(project_dir, ".gradle_home")
if not os.path.isdir(temp_home):
os.makedirs(temp_home)
subprocess.call(["gradle-5.2.1", "-g", temp_home, "-Dbuild.network_access=allow"])
subprocess.call(["gradle-6.3", "-g", temp_home, "-Dbuild.network_access=allow", "build"])
cache_files = os.path.join(temp_home, "caches/modules-*/files-*")
for cache_dir in glob.glob(cache_files):
for cache_group_id in os.listdir(cache_dir):
@ -47,7 +47,7 @@ def main(argv):
for cache_item in glob.glob(cache_items):
cache_item_name = os.path.basename(cache_item)
repo_item_path = os.path.join(repo_version_dir, cache_item_name)
print "%s:%s:%s (%s)" % (cache_group_id, cache_artifact_id, cache_version_id, cache_item_name)
print("%s:%s:%s (%s)" % (cache_group_id, cache_artifact_id, cache_version_id, cache_item_name))
shutil.copyfile(cache_item, repo_item_path)
shutil.rmtree(temp_home)
return 0