Add build files for Gradle

This commit is contained in:
Dominik Schürmann 2018-05-23 15:32:15 +02:00 committed by Arnaud Fontaine
parent 5022bca0b5
commit 3254c091e6
2 changed files with 41 additions and 0 deletions

View File

@ -179,6 +179,13 @@ resource consumption by tweaking the following variables:
- Execute `ant` with no parameter will produce the CAP file in
`build/fr/anssi/smartpgp/javacard/smartpgp.cap`.
## Building the CAP file with Gradle
- Set path to the JavaCard Development Kit:
`export JC_HOME="your/path/to/javacardkit"`
- Execute `gradle convertJavacard`. It will produce the CAP file in
`build/fr/anssi/smartpgp/javacard/smartpgp.cap`.
## Installing the CAP file

34
build.gradle Normal file
View File

@ -0,0 +1,34 @@
apply plugin: 'javacard'
buildscript {
repositories {
maven { url 'http://releases.marmeladburk.fidesmo.com/' }
}
dependencies {
classpath 'com.fidesmo:gradle-javacard:0.2.7'
}
}
javacard {
sdkVersion = '3.0.4'
cap {
aid = '0xd2:0x76:0x00:0x01:0x24:0x01'
packageName = 'fr.anssi.smartpgp'
applet {
aid = '0xd2:0x76:0x00:0x01:0x24:0x01:0x03:0x03:0xAF:0xAF:0x00:0x00:0x00:0x00:0x00:0x00'
className = 'SmartPGPApplet'
}
version = '1.0'
}
}
/* Change source sets to be compatible with the original project layout. */
sourceSets {
main {
java {
srcDir 'src'
}
}
}