Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2119)

Unified Diff: build/android/gyp/unpack_aar.py

Issue 2069273002: [NOT FOR COMMIT] Added GN support for Android .AAR packaged libraries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trying a different route from editing build configs Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/android/rules.gni » ('j') | build/config/android/rules.gni » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/unpack_aar.py
diff --git a/build/android/gyp/unpack_aar.py b/build/android/gyp/unpack_aar.py
new file mode 100755
index 0000000000000000000000000000000000000000..dea72fbe0425b0ae99ad77336ec682917a9b154f
--- /dev/null
+++ b/build/android/gyp/unpack_aar.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Upacks the contents of an Android AAR."""
+
+import os
+import shutil
+import sys
+#import zipfile
+
+from util import build_utils
+
+
+def main():
+ if len(sys.argv) != 3:
+ print 'Usage: %s <aar_file> <output_dir>' % sys.argv[0]
+ sys.exit(1)
+
+ aar_file = sys.argv[1] # e.g. library.aar
+ output_dir = sys.argv[2] # e.g. path/to/output
+
+ # Clear previously extracted versions of the AAR
+ shutil.rmtree(output_dir, True)
+
+ build_utils.ExtractAll(aar_file, path=output_dir)
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « no previous file | build/config/android/rules.gni » ('j') | build/config/android/rules.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698