This repository has been archived by the owner on Jul 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
72 lines (60 loc) · 1.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
plugins {
id 'org.javamodularity.moduleplugin' version '1.6.0' apply false
}
apply plugin: "java"
apply plugin: "org.javamodularity.moduleplugin"
apply plugin: "application"
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation group: 'org.takes', name: 'takes', version: '1.11.3'
compileClasspath group: 'org.takes', name: 'takes', version: '1.11.3'
implementation 'org.postgresql:postgresql:42.2.10'
compileClasspath 'org.json:json:20190722'
implementation 'org.json:json:20190722'
}
version = '0.1.0'
sourceCompatibility = 13
// fucking encoding
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
sourceSets {
main {
java {
srcDir 'src/main'
}
resources {
srcDir 'src/main/resources'
}
output.resourcesDir = file('out/res')
java.outputDir = file('out')
}
test {
java {
srcDir 'src/test'
}
resources {
srcDir 'src/test/resources'
}
}
}
def classname = "$moduleName/klfr.conlangdb.ServerEntry"
application {
applicationDefaultJvmArgs = ["-Dfile.encoding=UTF-8" ]
mainClassName = classname
}
// task copyDependencies(type: Copy) {
// //referring to the 'compileClasspath' configuration
// from configurations.compileClasspath
// into 'out/lib'
// }
// build.dependsOn copyDependencies
run.dependsOn build
task runDirect(type: Exec) {
dependsOn build
commandLine "java", "-cp", file("out"), "-p", file("out"), "--module", "klfr.conlangdb/klfr.conlangdb.ServerEntry"
}