-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
executable file
·86 lines (72 loc) · 2.16 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
apply plugin: 'javacard'
apply plugin: 'org.junit.platform.gradle.plugin'
buildscript {
repositories {
maven { url 'http://releases.marmeladburk.fidesmo.com/' }
mavenCentral()
}
dependencies {
classpath 'com.fidesmo:gradle-javacard:0.2.7'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
}
}
javacard {
sdkVersion = "3.0.4"
cap {
aid = '0x53:0x74:0x61:0x74:0x75:0x73:0x57:0x61:0x6c:0x6c:0x65:0x74'
packageName = 'com.crypterac.card'
applet {
aid = '0x53:0x74:0x61:0x74:0x75:0x73:0x57:0x61:0x6c:0x6c:0x65:0x74:0x41:0x70:0x70'
className = 'WalletApplet'
}
version = '1.0'
}
}
repositories {
mavenCentral()
}
dependencies {
testCompile("org.projectlombok:lombok:1.16.20")
testCompile('com.sun.jersey:jersey-client:1.17.1')
testCompile('com.sun.jersey:jersey-json:1.17.1')
testCompile(files("./lib/jcardsim-3.0.5.jar"))
testCompile('org.web3j:core:2.3.1')
testCompile('org.bitcoinj:bitcoinj-core:0.14.5')
testCompile("org.bouncycastle:bcprov-jdk15on:1.58")
testCompile("org.junit.jupiter:junit-jupiter-api:5.0.0")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.0.0")
}
junitPlatform {
filters {
tags {
exclude 'manual'
}
}
}
sourceCompatibility = 1.3
targetCompatibility = 1.3
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
task delete(type: Exec) {
commandLine 'java', '-jar', 'lib/gp/gp.jar', '--delete', '-default'
}
task install(type: Exec) {
commandLine 'java', '-jar', 'lib/gp/gp.jar', '--delete', '-default'
commandLine 'java', '-jar', 'lib/gp/gp.jar', '-install', './build/javacard/com/crypterac/card/javacard/card.cap', '-default'
}
if (project.properties['com.crypterac.card.test.simulated'] != 'true') {
tasks.install.dependsOn(convertJavacard)
tasks.install.dependsOn(delete)
tasks.test.dependsOn(install)
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
afterEvaluate {
if (project.properties['com.crypterac.card.test.simulated'] == 'true') {
def junitPlatformTestTask = tasks.getByName('junitPlatformTest')
junitPlatformTestTask.jvmArgs(['-noverify', '-Dcom.crypterac.card.test.simulated=true'])
}
}