-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
61 lines (52 loc) · 1.58 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
// available commands:
// "gradle check": run checkstyle to assess code quality
// "gradle clean": clean the project of all derived files
// "gradle build": create the bytecode from the source code
// "gradle run": run the program and produce output
// "gradle - q --console plain run": run the program with minimal loading bars
// "gradle test": run the JUnit test suite and produce report
apply plugin: 'java'
// declare the repositories that are used to meet dependencies
repositories {
mavenLocal()
mavenCentral()
}
// specify the use of gradle version 4.1
task Wrapper(type: Wrapper) {
gradleVersion = '4.1'
}
// specify the use of JUnit for testing
dependencies {
testCompile 'junit:junit:4.9'
}
// configure the tests to produce logging output
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
// declare values to place in the manifest file in the JAR
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'game.RunningRounds'
)
}
}
// give the name of the application to run with "gradle run" command
apply plugin: 'application'
mainClassName = 'game.RunningRounds'
// perform checkstyle checking with the "gradle check" command
apply plugin: 'checkstyle'
checkstyle.toolVersion = '8.1'
checkstyle {
ignoreFailures = false
maxWarnings = 0
maxErrors = 0
configFile = new File(rootDir, "config/checkstyle/google_checks.xml")
}
// specify that the application will accept input from System.in
run {
standardInput = System.in
}