summaryrefslogtreecommitdiff
path: root/apexer/apexer.py
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2019-02-27 14:07:49 -0800
committerAlex Light <allight@google.com>2019-02-27 15:09:57 -0800
commit9e6a2e696a23105bcf586b037b9360a31a8fb577 (patch)
treef588d3706af80e4c2f3433d9d6ef3180820908b3 /apexer/apexer.py
parent2f6936c9b33bdf1544639c442cba90ce78661143 (diff)
Add support for specifying the android.jar to link against
In order to run this tool outside of the build system we need to be able to use something other than a hardcoded location for the current sdks android.jar. Test: m com.android.runtime.debug Bug: 119332365 Bug: 119332362 Change-Id: I8f7f3cc39a91e96b4de727e906f253ba451f7806
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r--apexer/apexer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py
index ba5a8f0..fc580bc 100644
--- a/apexer/apexer.py
+++ b/apexer/apexer.py
@@ -80,6 +80,9 @@ def ParseArgs(argv):
help='type of APEX payload being built "zip" or "image"')
parser.add_argument('--override_apk_package_name', required=False,
help='package name of the APK container. Default is the apex name in --manifest.')
+ parser.add_argument('--android_jar_path', required=False,
+ default="prebuilts/sdk/current/public/android.jar",
+ help='path to use as the source of the android API.')
return parser.parse_args(argv)
def FindBinaryPath(binary):
@@ -361,7 +364,7 @@ def CreateApex(args, work_dir):
# specified in AndroidManifest.xml
cmd.extend(['--version-code', str(manifest_apex.version)])
cmd.extend(['-o', apk_file])
- cmd.extend(['-I', "prebuilts/sdk/current/public/android.jar"])
+ cmd.extend(['-I', args.android_jar_path])
RunCommand(cmd, args.verbose)
zip_file = os.path.join(work_dir, 'apex.zip')