blob: 8fd5a785ac7e5a88f86a4c7f266d01b16f395868 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Ant XML for out of band building the applet. -->
<project basedir="." default="avb_storage" name="applet build">
<!-- Grab the sdk. -->
<get src="https://github.com/martinpaljak/oracle_javacard_sdks/archive/master.zip"
dest="javacard_sdks.zip" skipexisting="true"/>
<unzip src="javacard_sdks.zip" dest="." stripAbsolutePathSpec="true">
<patternset>
<include name="**/jc303_kit/**"/>
</patternset>
<cutdirsmapper dirs="1" />
</unzip>
<!-- Grab the awesome ant helper. -->
<get src="https://github.com/martinpaljak/ant-javacard/releases/download/v1.7/ant-javacard.jar" dest="." skipexisting="true"/>
<taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ant-javacard.jar"/>
<target name="shared_interfaces">
<javacard jckit="jc303_kit">
<!-- Build the JCOPX jar file. AID and cap file are not used. exps either. -->
<cap aid="A000000FFFFFFFFFFFFFFFFFFFFFFF" package="com.nxp.id.jcopx.security" version="0.1"
output="jcopx-security.cap" sources="jcopx/src/com/nxp/id/jcopx/security" export="export-jcopx/security">
<!-- Only use the exports for dummy cap creation -->
<import exps="export-jcopx/security"/>
</cap>
<cap aid="A000000FFFFFFFFFFFFFFFFFFFFFFF" package="com.nxp.id.jcopx.util" version="0.1"
output="jcopx-util.cap" sources="jcopx/src/com/nxp/id/jcopx/util" export="export-jcopx/util">
<!-- Only use the exports for dummy cap creation -->
<import exps="export-jcopx/util"/>
<import exps="export-jcopx/security" jar="export-jcopx/security.jar"/>
</cap>
<!-- CallbackInterface -->
<cap aid="A000000476424F4F54525354300000" package="com.android.verifiedboot.globalstate.callback" version="0.1"
output="globalstate-callback.cap" sources="src/com/android/verifiedboot/globalstate/callback" export="export/callback">
<import exps="export/callback"/>
</cap>
<!-- OwnerInterface -->
<cap aid="A000000476424F4F54524547300000" package="com.android.verifiedboot.globalstate.owner" version="0.1"
output="globalstate-owner.cap" sources="src/com/android/verifiedboot/globalstate/owner" export="export/owner">
<import exps="export/owner"/>
</cap>
</javacard>
</target>
<target name="avb_storage" depends="shared_interfaces">
<javacard jckit="jc303_kit">
<!-- CallbackInterface -->
<cap aid="A0000004765049584C424F4F54000100" package="com.android.verifiedboot.storage" version="0.1"
output="avb_storage.cap" sources="src/com/android/verifiedboot" export="export">
<!-- Use supplied exp and build interface jar. -->
<import exps="jcopx" jar="export-jcopx/util/util.jar"/>
<!-- Requires ls_library to be on the device already. -->
<import exps="loaderservice" jar="loaderservice/ls_library_v02.00.jar"/>
<!-- Grab the other interfaces from export/ -->
<import exps="export/owner" jar="export/owner/owner.jar" />
<import exps="export/callback" jar="export/callback/callback.jar" />
<applet class="com.android.verifiedboot.storage.Storage" aid="A0000004765049584C424F4F54000101"/>
<import exps="export/avb_storage"/>
</cap>
</javacard>
</target>
</project>