Also archive src jar.
R=ricow@google.com
Change-Id: I6913fbd2af395cdaee04751574b02964cfccf3ef
diff --git a/tools/archive.py b/tools/archive.py
index 90fd446..0844eea 100755
--- a/tools/archive.py
+++ b/tools/archive.py
@@ -69,7 +69,7 @@
create_maven_release.main(["--out", utils.LIBS])
# Generate and copy the build that exclude dependencies.
- gradle.RunGradleExcludeDeps([utils.R8])
+ gradle.RunGradleExcludeDeps([utils.R8, utils.R8_SRC])
shutil.copyfile(utils.R8_JAR, utils.R8_EXCLUDE_DEPS_JAR)
# Ensure all archived artifacts has been built before archiving.
@@ -91,6 +91,7 @@
for file in [utils.D8_JAR,
utils.R8_JAR,
+ utils.R8_SRC_JAR,
utils.R8_EXCLUDE_DEPS_JAR,
utils.COMPATDX_JAR,
utils.COMPATPROGUARD_JAR,
@@ -99,7 +100,7 @@
file_name = os.path.basename(file)
tagged_jar = os.path.join(temp, file_name)
shutil.copyfile(file, tagged_jar)
- if file_name.endswith('.jar'):
+ if file_name.endswith('.jar') and not file_name.endswith('-src.jar'):
with zipfile.ZipFile(tagged_jar, 'a') as zip:
zip.write(version_file, os.path.basename(version_file))
destination = GetUploadDestination(version, file_name, is_master)
diff --git a/tools/utils.py b/tools/utils.py
index 62936db..4b9600b 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -25,11 +25,13 @@
D8 = 'd8'
R8 = 'r8'
+R8_SRC = 'sourceJar'
COMPATDX = 'compatdx'
COMPATPROGUARD = 'compatproguard'
D8_JAR = os.path.join(LIBS, 'd8.jar')
R8_JAR = os.path.join(LIBS, 'r8.jar')
+R8_SRC_JAR = os.path.join(LIBS, 'r8-src.jar')
R8_EXCLUDE_DEPS_JAR = os.path.join(LIBS, 'r8-exclude-deps.jar')
COMPATDX_JAR = os.path.join(LIBS, 'compatdx.jar')
COMPATPROGUARD_JAR = os.path.join(LIBS, 'compatproguard.jar')