-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
111 lines (98 loc) · 3.36 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// available commands:
// "gradle grade": run GatorGrader to assess completion of learning objectives
// "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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenLocal()
dependencies {
// other option, only needed for specifying a specific version of the Gradle plugin:
// classpath "gradle.plugin.org.gatored:gatorgradle:0.4.4"
classpath "gradle.plugin.org.gatored:gatorgradle:+"
}
}
}
// apply the version of the gradle plugin
apply plugin: 'java'
apply plugin: 'org.gatored.gatorgradle'
// declare the repositories that are used to meet dependencies
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
// specify the use of the gradle version
wrapper {
gradleVersion = '4.9'
}
// declare values to place in the manifest file in the JAR
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'labone.DisplayOutput'
)
}
}
// run: runExploreDataTypes
task(runExploreDataTypes, dependsOn: 'classes', type: JavaExec) {
description = 'Run the inclass.ExploreDataTypes program'
main = 'inclass.ExploreDataTypes'
classpath = sourceSets.main.runtimeClasspath
}
// run: runComputeGasMileage
task(runComputeGasMileage, dependsOn: 'classes', type: JavaExec) {
description = 'Run the inclass.ComputeGasMileage program'
main = 'inclass.ComputeGasMileage'
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
// run: runPerformStringMutation
task(runPerformStringMutation, dependsOn: 'classes', type: JavaExec) {
description = 'Run the inclass.PerformStringMutation program'
main = 'inclass.PerformStringMutation'
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
// run: runCompareInputValues
task(runCompareInputValues, dependsOn: 'classes', type: JavaExec) {
description = 'Run the inclass.CompareInputValues program'
main = 'inclass.CompareInputValues'
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
// run: runComputeAverage
task(runComputeAverage, dependsOn: 'classes', type: JavaExec) {
description = 'Run the inclass.ComputeAverage program'
main = 'inclass.ComputeAverage'
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
// run: runComputeMultiples
task(runComputeMultiples, dependsOn: 'classes', type: JavaExec) {
description = 'Run the inclass.ComputeMultiples program'
main = 'inclass.ComputeMultiples'
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
// run: runBasicArrayComputations
task(runBasicArrayComputations, dependsOn: 'classes', type: JavaExec) {
description = 'Run the inclass.BasicArrayComputations program'
main = 'inclass.BasicArrayComputations'
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
// 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")
}