forked from btdex/btdex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
237 lines (190 loc) · 7.15 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
plugins {
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'java'
id 'application'
id 'edu.sc.seis.launch4j' version '2.4.6'
id 'edu.sc.seis.macAppBundle' version '2.3.0'
id "nebula.ospackage" version "8.2.0"
id 'org.gradle.crypto.checksum' version '1.2.0'
id 'com.palantir.git-version' version '0.12.2'
id 'io.spring.dependency-management' version '1.0.1.RELEASE' //for logging - log4j
id "de.undercouch.download" version "1.2"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.signum-network:signumj:v1.0.0'
// implementation 'com.github.burst-apps-team:blocktalk:121e144cfe'
implementation 'com.github.signum-network:signum-smartj:1eb7a1587c'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'io.reactivex.rxjava2:rxjava:2.2.15'
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
implementation 'com.github.jiconfont:jiconfont-swing:1.0.0'
//implementation 'com.github.jiconfont:jiconfont-font_awesome:4.7.0.1'
implementation 'com.github.meisenla:jiconfont-font_awesome:8be36e8ba9'
implementation 'com.github.jjos2372:java-sdk:4739af9c11'
implementation 'com.github.sealedtx:bitcoin-cash-converter:1.0'
//implementation 'net.java.dev.jna:jna-platform:5.7.0'
//implementation 'net.java.dev.jna:jna:5.7.0'
//implementation 'com.github.weisj:darklaf-core:2.5.5'
implementation 'com.bulenkov:darcula:2018.2'
//implementation 'com.github.jjos2372:Darcula:3b47831130' // this one is compatible with Java16
//implementation 'com.formdev:flatlaf-intellij-themes:1.0'
implementation 'com.dorkbox:SystemTray:3.17'
implementation 'org.apache.commons:commons-text:1.8'
implementation 'io.github.novacrypto:BIP39:2019.01.27'
implementation 'jfree:jfreechart:1.0.13'
implementation 'com.github.kenglxn.QRGen:javase:2.6.0'
implementation 'io.github.monero-ecosystem:monero-java:0.2.1'
implementation 'fr.marcwrobel:jbanking:1.0'
implementation 'com.github.jjos2372:ledger4j:06fb465b5a'
implementation 'org.nanohttpd:nanohttpd:2.3.1'
//logging
implementation 'org.apache.logging.log4j:log4j-api:2.13.3'
implementation 'org.apache.logging.log4j:log4j-core:2.13.3'
// Use JUnit test framework
testImplementation("org.junit.platform:junit-platform-engine:1.6.1")
testImplementation("org.junit.platform:junit-platform-launcher:1.6.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.1")
}
test {
useJUnitPlatform()
}
// If we want to refresh our libraries (get a new snapshot)
configurations.all {
// resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
// Define the main class for the application
mainClassName = 'BTDEX'
description = 'A decentralized exchange system running on the Burst blockchain.'
def details = versionDetails()
task versionProp() {
doFirst {
new File(sourceSets.main.output.resourcesDir, "/version.properties").text = "version:${details.lastTag}"
}
}
jar {
// Needed by the loggin library
manifest {
attributes 'Multi-Release': 'true'
}
}
shadowJar{
archiveName = "${baseName}-${classifier}.${extension}"
}
shadowJar.dependsOn versionProp
def jdkVersion = 'zulu8.54.0.21-ca-jdk8.0.292'
import de.undercouch.gradle.tasks.download.Download
task downloadWindowsJDK(type: Download) {
src "https://cdn.azul.com/zulu/bin/${jdkVersion}-win_x64.zip"
dest "dist/jdk/${jdkVersion}-win_x64.zip"
}
task unzipWindowsJDK(type: Copy, dependsOn: downloadWindowsJDK) {
from(zipTree("dist/jdk/${jdkVersion}-win_x64.zip"))
into "dist/jdk/"
}
createExe {
outfile = 'btdex.exe'
icon = "${projectDir}/dist/btdex.ico"
jreMinVersion = '1.8.0'
copyright = 'BTDEX'
companyName = 'https://btdex.trade'
textVersion = details.lastTag
bundledJrePath = "./jre"
bundledJre64Bit = false
mainClassName = project.mainClassName
copyConfigurable = project.tasks.shadowJar.outputs.files
jar = "lib/${project.tasks.shadowJar.archiveName}"
}
task windowsZip(type: Zip) {
dependsOn createExe
dependsOn unzipWindowsJDK
from "${project.buildDir}/launch4j/${baseName}.exe"
into('jre'){
from "dist/jdk/${jdkVersion}-win_x64/jre"
}
archiveName "${baseName}-win_x64.zip"
}
task createInstaller(type:Exec) {
dependsOn createExe
dependsOn unzipWindowsJDK
workingDir "${project.buildDir}/distributions"
commandLine 'makensis', "${projectDir}/dist/installer.nsi"
}
task downloadMacJDK(type: Download) {
src "https://cdn.azul.com/zulu/bin/${jdkVersion}-macosx_x64.zip"
dest "dist/jdk/${jdkVersion}-macosx_x64.zip"
}
task unzipMacJDK(type: Copy, dependsOn: downloadMacJDK) {
from(zipTree("dist/jdk/${jdkVersion}-macosx_x64.zip"))
into "dist/jdk/"
}
createDmg.enabled = false
macAppBundle {
mainClassName = project.mainClassName
version = details.lastTag
icon = "${projectDir}/dist/btdex.icns"
appStyle = 'Oracle'
appName = project.applicationName
dmgName = "${->project.name}-macosx_x64"
runtimeConfigurationName = 'shadow'
jarTask = 'shadowJar'
jvmVersion = "1.8+"
bundleJRE = true
jreHome = "${projectDir}/dist/jdk/${jdkVersion}-macosx_x64/zulu-8.jdk/Contents/Home"
}
createAppZip.dependsOn unzipMacJDK
task downloadLinuxJDK(type: Download) {
src "https://cdn.azul.com/zulu/bin/${jdkVersion}-linux_x64.zip"
dest "dist/jdk/${jdkVersion}-linux_x64.zip"
}
task unzipLinuxJDK(type: Copy) {
from(zipTree("dist/jdk/${jdkVersion}-linux_x64.zip"))
into "dist/jdk/"
}
unzipLinuxJDK.dependsOn downloadLinuxJDK
task makeDeb(type: Deb) {
dependsOn shadowJar
dependsOn unzipLinuxJDK
maintainer 'btdex.trade'
license 'GPL-3+'
version details.lastTag.substring(1)
release '1'
arch 'amd64'
requires('xdg-utils')
from('dist/copyright'){
into '/usr/share/doc/btdex'
}
from("dist/jdk/${jdkVersion}-linux_x64/jre"){
into '/opt/btdex/jre'
}
into '/opt/btdex'
from('dist/btdex.sh'){
fileMode 0755
}
from(new File(sourceSets.main.output.resourcesDir, "/icon.png"))
link('/usr/share/pixmaps/btdex.png', '/opt/btdex/icon.png')
link('/usr/bin/btdex', '/opt/btdex/btdex.sh')
from('dist/btdex.desktop'){
into '/usr/share/applications'
}
from(project.tasks.shadowJar.outputs.files)
}
import org.gradle.crypto.checksum.Checksum
task makeDebChecksum(type: Checksum, dependsOn: [makeDeb]) {
}
task release(type: Checksum, dependsOn: [shadowJar, windowsZip, createAppZip, makeDeb, createInstaller]) {
files = project.tasks.shadowJar.outputs.files.plus(files(['build/distributions/btdex-win_x64.zip',
'build/launch4j/btdex.exe',
'build/distributions/btdex-macosx_x64.zip', 'dist/btdex-installer-win_x64.exe'])).plus(project.tasks.makeDeb.outputs.files)
}