-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
78 lines (63 loc) · 1.83 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
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'idea'
id 'org.springframework.boot' version '2.7.5'
id 'io.spring.dependency-management' version '1.1.6'
}
group 'org.example'
version '1.0.0'
sourceCompatibility = 17
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
}
dependencies {
implementation 'org.apache.tika:tika-core:2.9.2'
implementation 'org.jetbrains:annotations:24.1.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.11.0'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
javafx {
version = "17"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
mainClassName = 'hanziToAnki.Main' //'server.Application' or 'GUIStarter' are also available
compileJava {options.encoding = "UTF-8"} // overcome ü cp-1252 issues
compileTestJava {options.encoding = "UTF-8"}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
tasks.withType(JavaCompile) {
options.compilerArgs += "--enable-preview"
}
tasks.withType(Test) {
jvmArgs += "--enable-preview"
}
tasks.withType(JavaExec) {
jvmArgs += '--enable-preview'
}
task stage {
dependsOn build
}
jar {
manifest {
attributes(
'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.join(' '),
'Main-Class': 'server.Application'
)
}
archiveFileName = "heroku-gradle-spring-boot.jar"
baseName = 'heroku-gradle-spring-boot'
}
task copyToLib(type: Copy) {
into "$buildDir/libs"
from(configurations.runtimeClasspath)
}
stage.dependsOn(copyToLib)