status-keycard/build.gradle

102 lines
2.3 KiB
Groovy
Raw Normal View History

2017-09-21 15:09:04 +03:00
apply plugin: 'javacard'
buildscript {
repositories {
maven { url 'http://releases.marmeladburk.fidesmo.com/' }
mavenCentral()
2018-12-14 12:04:30 +03:00
maven { url 'https://jitpack.io' }
2017-09-21 15:09:04 +03:00
}
dependencies {
classpath 'com.fidesmo:gradle-javacard:0.2.7'
2019-10-18 13:25:56 +03:00
classpath 'com.github.status-im.status-keycard-java:desktop:3.0.0'
2017-09-21 15:09:04 +03:00
}
}
javacard {
sdkVersion = "3.0.4"
2017-09-21 15:09:04 +03:00
cap {
2018-12-14 14:26:53 +03:00
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01'
2018-12-04 10:20:43 +03:00
packageName = 'im.status.keycard'
2017-09-21 15:09:04 +03:00
applet {
2018-12-14 14:26:53 +03:00
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x01'
2018-12-04 10:20:43 +03:00
className = 'KeycardApplet'
2017-09-21 15:09:04 +03:00
}
2018-10-08 13:18:55 +02:00
applet {
2018-12-14 14:26:53 +03:00
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x02'
2018-10-08 13:18:55 +02:00
className = 'NDEFApplet'
}
2019-05-24 09:41:49 +02:00
applet {
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x03'
className = 'CashApplet'
}
2019-10-16 14:53:36 +03:00
version = '3.0'
2017-09-21 15:09:04 +03:00
}
}
2019-02-26 15:25:49 +03:00
def testTarget = project.properties['im.status.keycard.test.target']
if (!testTarget) {
testTarget = 'card'
}
def pairingPass = project.properties['im.status.keycard.test.pairing']
if (!pairingPass) {
pairingPass = 'KeycardTest'
}
2019-02-26 15:25:49 +03:00
2017-09-21 15:09:04 +03:00
repositories {
mavenCentral()
2018-11-12 17:28:23 +03:00
maven { url 'https://jitpack.io' }
2017-09-21 15:09:04 +03:00
}
dependencies {
2017-10-06 12:58:10 +03:00
testCompile(files("../jcardsim/jcardsim-3.0.5-SNAPSHOT.jar"))
2017-10-05 14:10:49 +03:00
testCompile('org.web3j:core:2.3.1')
2017-10-18 14:30:56 +03:00
testCompile('org.bitcoinj:bitcoinj-core:0.14.5')
2020-06-02 10:26:57 +03:00
testCompile('com.github.status-im.status-keycard-java:desktop:3.0.2')
2020-04-16 13:35:15 +03:00
testCompile('org.bouncycastle:bcprov-jdk15on:1.65')
2018-04-22 11:27:14 +03:00
testCompile("org.junit.jupiter:junit-jupiter-api:5.1.1")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.1.1")
2017-09-21 15:09:04 +03:00
}
2019-09-02 12:33:10 +03:00
test {
2019-09-02 13:30:27 +03:00
classpath = sourceSets.test.runtimeClasspath.filter { f -> f.name != "api_classic.jar" }
2019-09-02 12:33:10 +03:00
useJUnitPlatform {
excludeTags 'manual'
2017-10-05 14:10:49 +03:00
}
}
2017-09-21 15:09:04 +03:00
task wrapper(type: Wrapper) {
2018-04-22 11:27:14 +03:00
gradleVersion = '4.7'
2017-09-21 15:09:04 +03:00
}
2017-09-25 14:16:26 +03:00
2018-12-14 12:04:30 +03:00
task install (type: im.status.keycard.build.InstallTask)
2019-02-26 15:25:49 +03:00
if (testTarget == 'card') {
tasks.install.dependsOn(convertJavacard)
tasks.test.dependsOn(install)
}
2018-04-22 11:27:14 +03:00
compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
2017-09-25 14:16:26 +03:00
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
afterEvaluate {
def jvmArgs = ["-Dim.status.keycard.test.target=${testTarget}", "-Dim.status.keycard.test.pairing=${pairingPass}"]
2019-02-26 15:25:49 +03:00
if (testTarget == 'simulator') {
jvmArgs.push('-noverify')
}
2019-02-26 15:25:49 +03:00
2019-09-02 13:30:27 +03:00
def testTask = tasks.getByName('test')
testTask.jvmArgs(jvmArgs)
}