This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
/
build.gradle
96 lines (79 loc) · 2.3 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
group 'ledger-u2f-javacard'
version '1.0-SNAPSHOT'
// Buildscript configuration for the javacard-gradle plugin.
// Do not modify this particular block. Dependencies for the project are lower.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.klinec:gradle-javacard:1.5.5'
}
}
apply plugin: 'javacard'
apply plugin: 'jacoco'
sourceCompatibility = 1.7
// Common settings, definitions
final def rootPath = rootDir.absolutePath
final def libs = rootPath + '/libs'
final def libsSdk = rootPath + '/libs-sdks'
// Repositories for your project
repositories {
mavenCentral()
// mavenLocal() // for local maven repository if needed
flatDir {
dirs libs
}
}
// Dependencies for your project
dependencies {
// testCompile group: 'junit', name: 'junit', version: '4.12'
// testCompile 'org.testng:testng:6.1.1'
jcardsim 'com.licel:jcardsim:3.0.4'
}
test {
useTestNG()
jvmArgs '-noverify'
}
// JavaCard SDKs and libraries
final def JC212 = libsSdk + '/jc212_kit'
final def JC221 = libsSdk + '/jc221_kit'
final def JC222 = libsSdk + '/jc222_kit'
final def JC303 = libsSdk + '/jc303_kit'
final def JC304 = libsSdk + '/jc304_kit'
final def JC305 = libsSdk + '/jc305u1_kit'
// Which JavaCard SDK to use - select
final def JC_SELECTED = JC304
javacard {
//noinspection GroovyAssignabilityCheck
config {
jckit JC_SELECTED
// JCardSim automatically added by the javacard-gradle plugin
addSurrogateJcardSimRepo true
addImplicitJcardSim true
addImplicitJcardSimJunit true
//noinspection GroovyAssignabilityCheck
cap {
packageName 'com.ledger.u2f'
version '1.1'
aid '0xa0:0x00:0x00:0x06:0x17:0x00:0x4f:0x97:0xa2:0xe9:0x50:0x01'
output 'ledger-u2f.cap'
//noinspection GroovyAssignabilityCheck
applet {
className 'U2FApplet'
aid '0xa0:0x00:0x00:0x06:0x17:0x00:0x4f:0x97:0xa2:0xe9:0x49:0x01'
}
//noinspection GroovyAssignabilityCheck
dependencies {
remote 'fr.bmartel:gplatform:2.1.1'
}
}
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
check.dependsOn jacocoTestReport