forked from LoyolaChicagoCode/consoleapp-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
62 lines (46 loc) · 1.28 KB
/
build.gradle
File metadata and controls
62 lines (46 loc) · 1.28 KB
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
plugins {
id 'com.github.sherter.google-java-format' version '0.9'
id 'java'
id 'application'
id 'jacoco'
}
// project info
group = 'edu.luc.cs.cs313'
version = '0.2-SNAPSHOT'
description = """consoleapp"""
// compiler options
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
compileJava {
options.compilerArgs << "-Xlint:all"
options.encoding = 'UTF-8'
}
// run and startScript configuration
run {
standardInput = System.in
}
libsDirName = 'lib' // simple workaround for error in startScripts task
mainClassName = 'hw.Main'
// create "fat" jar with all dependencies
jar {
manifest {
attributes 'Main-Class' : mainClassName
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
from {
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
// dependencies
repositories {
mavenCentral()
}
dependencies {
implementation group: 'org.apache.commons', name: 'commons-collections4', version:'4.4'
implementation group: 'commons-cli', name: 'commons-cli', version:'1.4'
testImplementation group: 'junit', name: 'junit', version:'4.13'
}