2017-09-21 12:09:04 +00:00
|
|
|
apply plugin: 'javacard'
|
2017-09-27 17:04:26 +00:00
|
|
|
apply plugin: 'org.junit.platform.gradle.plugin'
|
2017-09-21 12:09:04 +00:00
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven { url 'http://releases.marmeladburk.fidesmo.com/' }
|
2017-09-27 17:04:26 +00:00
|
|
|
mavenCentral()
|
2018-12-14 09:04:30 +00:00
|
|
|
maven { url 'https://jitpack.io' }
|
2017-09-21 12:09:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
classpath 'com.fidesmo:gradle-javacard:0.2.7'
|
2018-04-22 08:27:14 +00:00
|
|
|
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.1.1'
|
2018-12-14 11:26:53 +00:00
|
|
|
classpath 'com.github.status-im.status-keycard-java:desktop:2.0.0'
|
2017-09-21 12:09:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
javacard {
|
2017-10-04 12:10:59 +00:00
|
|
|
sdkVersion = "3.0.4"
|
2017-09-26 10:05:59 +00:00
|
|
|
|
2017-09-21 12:09:04 +00:00
|
|
|
cap {
|
2018-12-14 11:26:53 +00:00
|
|
|
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01'
|
2018-12-04 07:20:43 +00:00
|
|
|
packageName = 'im.status.keycard'
|
2017-09-21 12:09:04 +00:00
|
|
|
applet {
|
2018-12-14 11:26:53 +00:00
|
|
|
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x01'
|
2018-12-04 07:20:43 +00:00
|
|
|
className = 'KeycardApplet'
|
2017-09-21 12:09:04 +00:00
|
|
|
}
|
2018-10-08 11:18:55 +00:00
|
|
|
applet {
|
2018-12-14 11:26:53 +00:00
|
|
|
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x02'
|
2018-10-08 11:18:55 +00:00
|
|
|
className = 'NDEFApplet'
|
|
|
|
}
|
2018-11-07 10:56:06 +00:00
|
|
|
|
|
|
|
version = '2.0'
|
2017-09-21 12:09:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2018-11-12 14:28:23 +00:00
|
|
|
maven { url 'https://jitpack.io' }
|
2017-09-21 12:09:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-10-06 09:58:10 +00:00
|
|
|
testCompile(files("../jcardsim/jcardsim-3.0.5-SNAPSHOT.jar"))
|
2017-10-05 11:10:49 +00:00
|
|
|
testCompile('org.web3j:core:2.3.1')
|
2017-10-18 11:30:56 +00:00
|
|
|
testCompile('org.bitcoinj:bitcoinj-core:0.14.5')
|
2018-12-14 11:26:53 +00:00
|
|
|
testCompile('com.github.status-im.status-keycard-java:desktop:2.0.0')
|
2018-12-11 08:42:17 +00:00
|
|
|
testCompile('org.bouncycastle:bcprov-jdk15on:1.60')
|
2018-04-22 08:27:14 +00:00
|
|
|
testCompile("org.junit.jupiter:junit-jupiter-api:5.1.1")
|
|
|
|
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.1.1")
|
2017-09-21 12:09:04 +00:00
|
|
|
}
|
|
|
|
|
2017-10-05 11:10:49 +00:00
|
|
|
junitPlatform {
|
|
|
|
filters {
|
|
|
|
tags {
|
|
|
|
exclude 'manual'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-21 12:09:04 +00:00
|
|
|
task wrapper(type: Wrapper) {
|
2018-04-22 08:27:14 +00:00
|
|
|
gradleVersion = '4.7'
|
2017-09-21 12:09:04 +00:00
|
|
|
}
|
2017-09-25 11:16:26 +00:00
|
|
|
|
2018-12-14 09:04:30 +00:00
|
|
|
task install (type: im.status.keycard.build.InstallTask)
|
2017-09-27 17:04:26 +00:00
|
|
|
|
2018-12-04 07:20:43 +00:00
|
|
|
if (project.properties['im.status.keycard.test.simulated'] != 'true') {
|
2017-12-31 18:14:40 +00:00
|
|
|
tasks.install.dependsOn(convertJavacard)
|
|
|
|
tasks.test.dependsOn(install)
|
|
|
|
}
|
2017-09-27 17:04:26 +00:00
|
|
|
|
2018-04-22 08:27:14 +00:00
|
|
|
compileJava {
|
|
|
|
sourceCompatibility = 1.6
|
|
|
|
targetCompatibility = 1.6
|
|
|
|
}
|
|
|
|
|
2017-09-25 11:16:26 +00:00
|
|
|
compileTestJava {
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
}
|
2017-12-31 18:14:40 +00:00
|
|
|
|
|
|
|
afterEvaluate {
|
2018-12-04 07:20:43 +00:00
|
|
|
if (project.properties['im.status.keycard.test.simulated'] == 'true') {
|
2017-12-31 18:14:40 +00:00
|
|
|
def junitPlatformTestTask = tasks.getByName('junitPlatformTest')
|
2018-12-04 07:20:43 +00:00
|
|
|
junitPlatformTestTask.jvmArgs(['-noverify', '-Dim.status.keycard.test.simulated=true'])
|
2017-12-31 18:14:40 +00:00
|
|
|
}
|
|
|
|
}
|