-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
85 lines (73 loc) · 2.06 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
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.10'
}
group 'it.units.sdm'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
ext {
junitVersion = '5.8.1'
jetbrainsAnnotationVersion = '22.0.0'
}
sourceCompatibility = '16'
targetCompatibility = '16'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainModule = 'it.units.sdm.gomoku'
mainClass = 'it.units.sdm.gomoku.Main'
}
javafx {
version = '16'
modules = ['javafx.controls', 'javafx.fxml']
}
dependencies {
implementation "org.jetbrains:annotations:${jetbrainsAnnotationVersion}"
implementation("org.json:json:20210307")
testImplementation(platform("org.junit:junit-bom:${junitVersion}"))
testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}
test {
useJUnitPlatform()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" // compile with -Xlint:unchecked for details.
}
}
run {
standardInput = System.in // set standard input
}
startScripts {
doLast {
String file_noext = DEFAULT_BUILD_DIR_NAME + "/scripts/" + rootProject.getName()
String file = file_noext + ".bat"
String file2 = file_noext + "2.bat"
new File(file2).withWriter {
w ->
{
new File(file).withReader {
r ->
w << "@if \"%DEBUG%\" == \"\" @echo off" << System.lineSeparator()
<< "set CMD_LINE_ARGS=%1" << System.lineSeparator() << r
}
}
}
delete(file)
new File(file).withWriter {
w ->
{
new File(file2).withReader {
r -> w << r
}
}
}
delete(file2)
}
}