-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
237 lines (194 loc) · 6.47 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
import org.panteleyev.jpackage.ImageType
import org.panteleyev.jpackage.JPackageTask
import org.springframework.boot.gradle.tasks.bundling.BootJar
import org.springframework.boot.gradle.tasks.run.BootRun
plugins {
id 'java'
id 'idea'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
//id 'org.graalvm.buildtools.native' version '0.9.20'
id 'com.vaadin' version "$vaadinVersion"
//Jpackage for building native installers
id("org.panteleyev.jpackageplugin") version "1.6.0"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
vendor = JvmVendorSpec.BELLSOFT
}
}
group = 'online.hatsunemiku'
version = '1.13.0'
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven {
name = "Vaadin Addons"
url = "https://maven.vaadin.com/vaadin-addons"
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation('org.springframework.boot:spring-boot-starter-webflux')
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-graphql'
implementation('com.vaadin:vaadin-spring-boot-starter')
//databind
implementation ("com.fasterxml.jackson.core:jackson-databind") {
version {
strictly '2.17.1'
}
}
implementation('com.fasterxml.jackson.module:jackson-module-kotlin') {
version {
strictly '2.17.1'
}
}
implementation('com.fasterxml.jackson.core:jackson-core') {
version {
strictly '2.17.1'
}
}
implementation 'org.jetbrains:annotations:24.0.0'
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.5'
//MAL API
implementation 'dev.katsute:mal4j:3.4.2'
//GraphQL
implementation "com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter"
//Apache Commons codec -> used for URL encoding
implementation 'commons-codec:commons-codec:1.16.1'
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
implementation 'commons-validator:commons-validator:1.7'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
developmentOnly 'io.projectreactor:reactor-tools'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
//vaadin official addons
implementation 'com.vaadin:flow-webpush'
//vaadin directory plugins
implementation 'in.virit:viritin:2.8.22'
implementation 'pl.unforgiven:superfields:0.19.1'
implementation 'org.vaadin.addons.online.hatsunemiku.diamond:FlowSwiper:1.3.1'
}
dependencyManagement {
imports {
mavenBom "com.vaadin:vaadin-bom:$vaadinVersion"
mavenBom "com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:9.0.0"
}
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.register('runDebug', BootRun) {
dependsOn('vaadinBuildFrontend')
group = 'application'
systemProperty 'spring.profiles.active', 'dev'
mainClass = 'online.hatsunemiku.tachideskvaadinui.TachideskVaadinUiApplication'
classpath(sourceSets.main.runtimeClasspath)
}
//new task to build bootJar
tasks.register('buildReleaseJar', BootJar) {
group = 'build'
dependsOn('vaadinBuildFrontend')
enabled = true
vaadin.productionMode = true
archiveFileName = "Tachidesk-VaadinUI-${version}.jar"
mainClass = 'online.hatsunemiku.tachideskvaadinui.TachideskVaadinUiApplication'
setTargetJavaVersion(targetCompatibility)
//fat jar
classpath(sourceSets.main.runtimeClasspath)
launchScript()
}
tasks.register('buildWindowsMsi', WindowsInstallTask) {
type = ImageType.MSI
}
tasks.register('buildWindowsExe', WindowsInstallTask) {
type = ImageType.EXE
}
tasks.register('buildLinuxDeb', LinuxInstallTask) {
type = ImageType.DEB
}
tasks.register('buildLinuxRpm', LinuxInstallTask) {
type = ImageType.RPM
}
tasks.register('buildMacDmg', MacInstallTask) {
type = ImageType.DMG
}
tasks.register('buildMacPkg', MacInstallTask) {
type = ImageType.PKG
}
class InstallTask extends JPackageTask {
InstallTask() {
super()
dependsOn('buildReleaseJar')
group = 'installers'
enabled = true
aboutUrl = "https://github.com/aless2003/Tachidesk-VaadinUI"
appDescription = "A simple Web UI for Tachidesk written in Java with Vaadin"
appName = "Tachidesk Vaadin UI"
appVersion = "${project.version}"
icon = "package/icons/icon.ico"
licenseFile = "LICENSE"
mainClass = "org.springframework.boot.loader.launch.JarLauncher"
mainJar = "Tachidesk-VaadinUI-${project.version}.jar"
vendor = "Aless2003"
verbose = false
input = "build/libs"
destination = "build/installer"
}
}
class WindowsInstallTask extends InstallTask {
//inject annotation with full qualified class name
WindowsInstallTask() {
super()
//winConsole = true //enable only for debugging
winDirChooser = true
winHelpUrl = "https://github.com/aless2003/Tachidesk-VaadinUI"
winMenu = true
winMenuGroup = "DiamondMiku"
winPerUserInstall = true
winShortcut = true
winShortcutPrompt = true
winUpdateUrl = "https://github.com/aless2003/Tachidesk-VaadinUI"
winUpgradeUuid = "1fd89884-c606-4304-b9f0-f82c47ff7676"
}
}
class LinuxInstallTask extends InstallTask {
LinuxInstallTask() {
super()
linuxAppCategory = "Utility"
linuxDebMaintainer = "Alessandro.Schwaiger12@gmail.com"
linuxMenuGroup = "DiamondMiku"
linuxPackageName = "tachidesk-vaaui"
linuxRpmLicenseType = "MPLv2.0"
linuxShortcut = true
}
}
class MacInstallTask extends InstallTask {
MacInstallTask() {
super()
if (project.version.startsWith("0.")) {
appVersion = project.version.replaceFirst("0.", "1.")
} else {
appVersion = project.version
}
macAppCategory = "public.app-category.books"
macAppStore = false
macPackageIdentifier = "online.hatsunemiku.tachideskvaadinui"
macPackageName = "Tachidesk-VaadinUI"
}
}