-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
93 lines (76 loc) · 2.29 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
import proguard.gradle.ProGuardTask
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.3.2/samples
*/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.guardsquare:proguard-gradle:7.2.0'
}
}
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'coolwallet3-mock.library-conventions'
}
sourceSets {
main {
java {
srcDirs = ['src']
}
}
test {
java {
srcDirs = ['src']
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation project(':jcard-mock')
implementation project(':nxp-mock')
implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
}
test {
useJUnitPlatform()
}
task proguard(type: ProGuardTask) {
outputs.upToDateWhen { false }
dependsOn ':jcard-mock:assemble'
dependsOn ':nxp-mock:assemble'
dependsOn tasks.assemble
verbose()
injars "${buildDir}/libs/coolwallet.jar"
outjars "${buildDir}/coolwallet.jar"
libraryjars "${rootDir}/jcard-mock/build/libs/jcard-mock.jar"
libraryjars "${rootDir}/nxp-mock/build/libs/nxp-mock.jar"
// Automatically handle the Java version of this build.
if (System.getProperty('java.version').startsWith('1.')) {
// Before Java 9, the runtime classes were packaged in a single jar file.
libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
} else {
// As of Java 9, the runtime classes are packaged in modular jmod files.
libraryjars "${System.getProperty('java.home')}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
}
keep 'public class coolbitx.Main { \
public static void install(byte[], short, byte); \
}'
keep 'public class coolbitx.sio.StoreApplet { \
public static void install(byte[], short, byte); \
}'
doLast {
delete "${buildDir}/libs/coolwallet.jar"
copy {
from file("${buildDir}/coolwallet.jar")
into "${buildDir}/libs"
}
delete "${buildDir}/coolwallet.jar"
}
}