diff --git a/README.md b/README.md index 2c14410..558df84 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ Details: * `aid` attribute - AID (hex) of the package. Recommended - or set to the 5 first bytes of the applet AID if left unspecified. * `output` attribute - path where to save the generated CAP file. Optional, see below for variables. * `export` attribtue - path (folder) where to place the JAR and generated EXP file. Optional. + * `exportmap` attribtue - if set to true, use pre-defined export file. Optional. * `jar` attribute - path where to save the generated archive JAR file. Optional. * `jca` attribute - path where to save the generated JavaCard Assembly (JCA) file. Optional. * `verify` attribute - if set to false, disables verification of the resulting CAP file with offcardeverifier. Optional. diff --git a/task/src/main/java/pro/javacard/ant/JCCap.java b/task/src/main/java/pro/javacard/ant/JCCap.java index 188aa9c..ae0ed3a 100644 --- a/task/src/main/java/pro/javacard/ant/JCCap.java +++ b/task/src/main/java/pro/javacard/ant/JCCap.java @@ -47,6 +47,7 @@ public class JCCap extends Task { private boolean debug = false; private boolean strip = false; private boolean ints = false; + private boolean exportmap = false; public JCCap(String master_jckit_path) { @@ -117,6 +118,10 @@ public void setInts(boolean arg) { ints = arg; } + public void setExportmap(boolean arg) { + exportmap = arg; + } + public void setTargetsdk(String arg) { raw_targetsdk = arg; } @@ -510,6 +515,9 @@ private void convert(Path applet_folder, List exps) { if (ints) { j.createArg().setLine("-i"); } + if (exportmap) { + j.createArg().setLine("-exportmap"); + } // determine output types String outputs = "CAP";