-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (108 loc) · 3.35 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.6.1/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building a CLI application.
id 'application'
// For supporting downloading of files
id "de.undercouch.download" version "4.1.1"
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenLocal()
mavenCentral()
}
//for download args4.jar
task downloadAlgs4Jar(type: Download) {
src 'https://algs4.cs.princeton.edu/code/algs4.jar'
dest projectDir
overwrite false
}
dependencies {
implementation files('algs4.jar')
// Use JUnit Jupiter API for testing.
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
// Use JUnit Jupiter Engine for testing.
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
}
application {
// Define the main class for the application.
mainClassName = 'com.borwe.algorithms.App'
}
compileJava {
dependsOn downloadAlgs4Jar
}
task stackexamp (type:JavaExec){
main = "com.borwe.algorithms.algs.Stack"
classpath = sourceSets.main.runtimeClasspath
}
task queueexamp (type:JavaExec){
main = "com.borwe.algorithms.algs.Queue"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_3 (type:JavaExec){
main = "com.borwe.algorithms.exercises.Ex1_3_3"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_4 (type:JavaExec){
main = "com.borwe.algorithms.exercises.Ex1_3_4"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_9 (type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_9"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_13 (type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_13"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_15 (type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_15"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_16(type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_16"
classpath = sourceSets.main.runtimeClasspath
args "22/5/1939"
}
task ex1_3_17(type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_17"
classpath = sourceSets.main.runtimeClasspath
args "Turing","22/5/1939","11.99"
}
task ex1_3_19(type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_19"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_20(type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_20"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_21(type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_21"
classpath = sourceSets.main.runtimeClasspath
}
task ex1_3_24(type:JavaExec){
standardInput = System.in
main = "com.borwe.algorithms.exercises.Ex1_3_24"
classpath = sourceSets.main.runtimeClasspath
}
test {
// Use junit platform for unit tests
useJUnitPlatform()
}