This repository was archived by the owner on Sep 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.gradle
More file actions
129 lines (102 loc) · 5.11 KB
/
build.gradle
File metadata and controls
129 lines (102 loc) · 5.11 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.14.0"
}
}
plugins {
id 'java'
id 'application'
}
group 'org.eclipse.keyple'
sourceCompatibility = 1.6
String findDependencyVersion(File file) {
if (file == null) {
return '+'
}
if (new File(file, "VERSION").isFile()) {
return new File(file, "VERSION").getText('UTF-8').trim()
}
return findDependencyVersion(file.getParentFile())
}
ext {
keyple_v = project.hasProperty("keyple_version") ? keyple_version : findDependencyVersion(new File("$projectDir"))
}
repositories {
mavenLocal()
mavenCentral()
//to import keyple snapshots
maven {url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
/*
* Local calypso example
*/
mainClassName = 'org.eclipse.keyple.example.generic.Demo_CardProtocolDetection.Main_CardProtocolDetection_Pcsc'
task('run_calypso_Demo_CalypsoClassic_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.Demo_CalypsoClassic.Main_CalypsoClassic_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_Demo_CalypsoClassic_Stub', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.Demo_CalypsoClassic.Main_CalypsoClassic_Stub'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase1_ExplicitSelectionAid_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase1_ExplicitSelectionAid.Main_ExplicitSelectionAid_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase1_ExplicitSelectionAid_Stub', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase1_ExplicitSelectionAid.Main_ExplicitSelectionAid_Stub'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase2_DefaultSelectionNotification_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase2_DefaultSelectionNotification.Main_DefaultSelectionNotification_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase2_DefaultSelectionNotification_Stub', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase2_DefaultSelectionNotification.Main_DefaultSelectionNotification_Stub'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase3_Rev1Selection_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase3_Rev1Selection.Main_Rev1Selection_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase4_PoAuthentication_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase4_PoAuthentication.Main_PoAuthentication_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase4_PoAuthentication_Stub', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase4_PoAuthentication.Main_PoAuthentication_Stub'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase5_MultipleSession_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase5_MultipleSession.Main_MultipleSession_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase6_VerifyPin_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase6_VerifyPin.Main_VerifyPin_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase7_StoredValue_SimpleReload_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase7_StoredValue_SimpleReload.Main_StoredValue_SimpleReload_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
task('run_calypso_UseCase8_StoredValue_DebitInSession_Pcsc', dependsOn: 'classes', type: JavaExec, group:'keyple') {
main = 'org.eclipse.keyple.example.calypso.UseCase8_StoredValue_DebitInSession.Main_StoredValue_DebitInSession_Pcsc'
classpath = sourceSets.main.runtimeClasspath
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
/* Keyple dependencies */
project.logger.lifecycle('Using dependency version: ' + keyple_v)
implementation group: 'org.eclipse.keyple', name: 'keyple-java-core', version: keyple_v
implementation group: 'org.eclipse.keyple', name: 'keyple-java-calypso', version: keyple_v
implementation group: 'org.eclipse.keyple', name: 'keyple-java-plugin-pcsc', version: keyple_v
implementation group: 'org.eclipse.keyple', name: 'keyple-java-plugin-stub', version: keyple_v
implementation "org.slf4j:slf4j-simple:1.7.25"
implementation "org.slf4j:slf4j-ext:1.7.25"
implementation "com.squareup.retrofit2:converter-gson:2.4.0"
}