summaryrefslogtreecommitdiff
path: root/scripts/gen-kotlin-build-file.py
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-07-31 16:54:41 -0700
committer Colin Cross <ccross@android.com> 2024-08-07 14:11:43 -0700
commit1f75cdf980cf2c2553c1329e0f2ac7c9d01c56de (patch)
tree28fc80204d7fe21d116a331d52f4d5fbf3b97141 /scripts/gen-kotlin-build-file.py
parentd1d8f17e9e942d1c42862320f8ab9419336f5b29 (diff)
Use rsp for kotlin classpath
Support long classpaths by passing the classpath in a file to the script that generates build.xml. Bug: 308016794 Test: builds Flag: EXEMPT refactor Change-Id: Ib238a83a26acba7ede8e55298397dbeb9a57a866
Diffstat (limited to 'scripts/gen-kotlin-build-file.py')
-rw-r--r--scripts/gen-kotlin-build-file.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/gen-kotlin-build-file.py b/scripts/gen-kotlin-build-file.py
index 99afdca75..8b7876f64 100644
--- a/scripts/gen-kotlin-build-file.py
+++ b/scripts/gen-kotlin-build-file.py
@@ -37,7 +37,7 @@ def parse_args():
parser.add_argument('--out', dest='out',
help='file to which the module.xml contents will be written.')
parser.add_argument('--classpath', dest='classpath', action='append', default=[],
- help='classpath to pass to kotlinc.')
+ help='file containing classpath to pass to kotlinc.')
parser.add_argument('--name', dest='name',
help='name of the module.')
parser.add_argument('--out_dir', dest='out_dir',
@@ -65,8 +65,8 @@ def main():
f.write(' <module name="%s" type="java-production" outputDir="%s">\n' % (args.name, args.out_dir or ''))
# Print classpath entries
- for c in args.classpath:
- for entry in c.split(':'):
+ for classpath_rsp_file in args.classpath:
+ for entry in NinjaRspFileReader(classpath_rsp_file):
path = os.path.abspath(entry)
f.write(' <classpath path="%s"/>\n' % path)