mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #2430 from collinjackson/cmd_size_limit
Support for jars with large numbers of classes
This commit is contained in:
commit
a24a4eab08
@ -73,13 +73,15 @@ def ExtractToc(disassembled_classes):
|
||||
|
||||
def UpdateToc(jar_path, toc_path):
|
||||
classes = GetClassesInZipFile(zipfile.ZipFile(jar_path))
|
||||
toc = ''
|
||||
if len(classes) != 0:
|
||||
javap_output = CallJavap(classpath=jar_path, classes=classes)
|
||||
toc = ExtractToc(javap_output)
|
||||
toc = []
|
||||
|
||||
limit = 1000 # Split into multiple calls to stay under command size limit
|
||||
for i in xrange(0, len(classes), limit):
|
||||
javap_output = CallJavap(classpath=jar_path, classes=classes[i:i+limit])
|
||||
toc.append(ExtractToc(javap_output))
|
||||
|
||||
with open(toc_path, 'w') as tocfile:
|
||||
tocfile.write(toc)
|
||||
tocfile.write(''.join(toc))
|
||||
|
||||
|
||||
def DoJarToc(options):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user