forked from keycard-tech/status-keycard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
101 lines (83 loc) · 2.27 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
apply plugin: 'javacard'
buildscript {
repositories {
maven { url 'http://releases.marmeladburk.fidesmo.com/' }
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.fidesmo:gradle-javacard:0.2.7'
classpath 'com.github.status-im.status-keycard-java:desktop:3.0.0'
}
}
javacard {
sdkVersion = "3.0.4"
cap {
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01'
packageName = 'im.status.keycard'
applet {
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x01'
className = 'KeycardApplet'
}
applet {
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x02'
className = 'NDEFApplet'
}
applet {
aid = '0xA0:0x00:0x00:0x08:0x04:0x00:0x01:0x03'
className = 'CashApplet'
}
version = '3.0'
}
}
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'
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
testCompile(files("../jcardsim/jcardsim-3.0.5-SNAPSHOT.jar"))
testCompile('org.web3j:core:2.3.1')
testCompile('org.bitcoinj:bitcoinj-core:0.14.5')
testCompile('com.github.status-im.status-keycard-java:desktop:3.0.0')
testCompile('org.bouncycastle:bcprov-jdk15on:1.60')
testCompile("org.junit.jupiter:junit-jupiter-api:5.1.1")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.1.1")
}
test {
classpath = sourceSets.test.runtimeClasspath.filter { f -> f.name != "api_classic.jar" }
useJUnitPlatform {
excludeTags 'manual'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.7'
}
task install (type: im.status.keycard.build.InstallTask)
if (testTarget == 'card') {
tasks.install.dependsOn(convertJavacard)
tasks.test.dependsOn(install)
}
compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
afterEvaluate {
def jvmArgs = ["-Dim.status.keycard.test.target=${testTarget}", "-Dim.status.keycard.test.pairing=${pairingPass}"]
if (testTarget == 'simulator') {
jvmArgs.push('-noverify')
}
def testTask = tasks.getByName('test')
testTask.jvmArgs(jvmArgs)
}