OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # |
| 3 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 """Upacks the contents of an Android AAR.""" |
| 8 |
| 9 import os |
| 10 import shutil |
| 11 import sys |
| 12 #import zipfile |
| 13 |
| 14 from util import build_utils |
| 15 |
| 16 |
| 17 def main(): |
| 18 if len(sys.argv) != 3: |
| 19 print 'Usage: %s <aar_file> <output_dir>' % sys.argv[0] |
| 20 sys.exit(1) |
| 21 |
| 22 aar_file = sys.argv[1] # e.g. library.aar |
| 23 output_dir = sys.argv[2] # e.g. path/to/output |
| 24 |
| 25 # Clear previously extracted versions of the AAR |
| 26 shutil.rmtree(output_dir, True) |
| 27 |
| 28 build_utils.ExtractAll(aar_file, path=output_dir) |
| 29 |
| 30 |
| 31 if __name__ == '__main__': |
| 32 sys.exit(main()) |
OLD | NEW |