forked from frankmorgner/vsmartcard
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (94 loc) · 3.71 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
apply plugin: 'com.android.application'
apply plugin: 'com.github.johnrengelman.shadow'
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
task shadowJar(type: ShadowJar) {
configurations = [project.configurations.shadow]
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn shadowJar
}
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.vsmartcard.acardemulator"
minSdkVersion 19
targetSdkVersion 23
versionCode 5
versionName "3.2"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "distribution"
productFlavors {
full {
dimension "distribution"
}
fdroid {
dimension "distribution"
applicationIdSuffix ".fdroid"
}
}
sourceSets {
main.java.srcDirs += 'src/main/external/vJCRE/src'
main.java.exclude('pro/javacard/vre/VJCREProvider*')
main.java.exclude('visa/*')
main.java.srcDirs += 'src/main/external/jcardsim/src/main/java'
main.java.exclude('com/licel/jcardsim/smartcardio/*')
main.java.exclude('com/licel/jcardsim/remote/*')
main.java.exclude('com/licel/jcardsim/utils/APDUScriptTool*')
main.java.exclude('com/licel/jcardsim/io/JavaxSmartCardInterface*')
main.java.exclude('com/licel/jcardsim/io/CAD*')
main.java.exclude('javacard/framework/service/CardRemoteObject*')
main.java.exclude('javacard/framework/service/RMIService*')
main.java.exclude('com/licel/jcardsim/utils/JavaCardApiProcessor*')
main.java.exclude('com/licel/jcardsim/framework/service/*')
main.java.exclude('com/licel/jcardsim/samples/*')
main.java.exclude('com/licel/jcardsim/crypto/*')
main.java.srcDirs += 'src/main/external/GidsApplet/src'
main.java.exclude('com/mysmartlogon/gidsAppletTests/*')
main.java.srcDirs += 'src/main/external/IsoApplet/src'
main.java.srcDirs += 'src/main/external/PivApplet/src'
main.java.srcDirs += 'src/main/external/android-scio/src/main'
main.java.srcDirs += 'src/main/external/ykneo-openpgp/applet/src'
main.java.srcDirs += 'src/main/external/ykneo-oath/applet/src'
}
shadowJar {
relocate 'org.bouncycastle', 'com.vsmartcard.acardemulator.org.bouncycastle'
}
}
android.applicationVariants.all { variant ->
def appName
//Check if an applicationName property is supplied; if not use the name of the parent project.
if (project.hasProperty("applicationName")) {
appName = applicationName
} else {
appName = parent.name
}
variant.outputs.each { output ->
def newApkName
//If there's no ZipAlign task it means that our artifact will be unaligned and we need to mark it as such.
if (output.zipAlign) {
newApkName = "${appName}-${output.baseName}-${variant.versionName}.apk"
} else {
newApkName = "${appName}-${output.baseName}-${variant.versionName}-unaligned.apk"
}
output.outputFile = new File(output.outputFile.parent, newApkName)
}
}
dependencies {
shadow localGroovy()
shadow gradleApi()
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:design:23.2.1'
compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
compile 'com.google.zxing:core:3.2.1'
compile 'org.bouncycastle:bcprov-jdk14:1.49'
fullCompile files('libs/sdk-v1.0.0.jar')
}