-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
135 lines (116 loc) · 3.93 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
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
130
131
132
133
134
135
import proguard.gradle.ProGuardTask
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.guardsquare:proguard-gradle:7.4.2'
}
}
plugins {
id 'java'
id 'maven-publish'
}
group = 'com.sparrowwallet.bokmakierie'
version = '1.0'
def secrets = new Properties()
file("publish.properties").withInputStream {
stream -> secrets.load(stream)
}
repositories {
mavenCentral()
}
dependencies {
implementation('org.boofcv:boofcv-core:1.1.3') {
exclude group: 'com.google.protobuf'
exclude group: 'commons-io'
exclude group: 'net.lingala.zip4j'
exclude group: 'net.sf.trove4j'
exclude group: 'org.apache.commons'
exclude group: 'org.apiguardian'
exclude group: 'org.deepboof'
exclude group: 'org.ejml', module: 'ejml-cdense'
exclude group: 'org.ejml', module: 'ejml-dsparse'
exclude group: 'org.ejml', module: 'ejml-fdense'
exclude group: 'org.ejml', module: 'ejml-fsparse'
exclude group: 'org.ejml', module: 'ejml-zdense'
exclude group: 'org.boofcv', module: 'boofcv-ip-multiview'
exclude group: 'org.boofcv', module: 'boofcv-learning'
exclude group: 'org.boofcv', module: 'boofcv-reconstruction'
exclude group: 'org.boofcv', module: 'boofcv-sfm'
exclude group: 'org.yaml'
}
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
jar {
manifest {
attributes("Main-Class": "com.sparrowwallet.bokmakierie.Bokmakierie",
"Automatic-Module-Name": "com.sparrowwallet.bokmakierie")
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
test {
useJUnitPlatform()
}
tasks.register('proguard', ProGuardTask) {
injars(layout.buildDirectory.file("libs/bokmakierie-${version}.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'
//libraryjars "${System.getProperty('java.home')}/jmods/....."
}
verbose
keepattributes '*Annotation*'
keepattributes 'Signature'
keepclassmembers allowoptimization: true, 'enum * { \
public static **[] values(); \
public static ** valueOf(java.lang.String); \
}'
keepclasseswithmembers 'public class * { \
public static void main(java.lang.String[]); \
}'
keep 'public class com.sparrowwallet.bokmakierie.Bokmakierie { \
public *; \
}'
keep 'public class com.sparrowwallet.bokmakierie.Result { \
public *; \
}'
keep 'public class boofcv.factory.filter.binary.ConfigThreshold { \
public *; \
}'
keep 'public class boofcv.factory.filter.binary.ThresholdType { \
public *; \
}'
dontwarn
dontoptimize
dontobfuscate
outjars(layout.buildDirectory.file("libs/bokmakierie-minified-${version}.jar"))
}
publishing {
repositories {
maven {
name = "Forgejo-SparrowWallet"
url = uri("https://code.sparrowwallet.com/api/packages/sparrowwallet/maven")
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "token ${secrets.token}"
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
publications {
maven(MavenPublication) {
artifactId = 'bokmakierie'
artifact (layout.buildDirectory.file("libs/bokmakierie-minified-${version}.jar"))
}
}
}