-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
61 lines (54 loc) · 1.71 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
apply plugin: 'java'
apply plugin: 'eclipse'
// apply plugin: 'base'
repositories {
mavenCentral()
}
dependencies {
implementation 'junit:junit:4.13.2'
implementation 'org.hamcrest:hamcrest:2.2'
}
sourceSets {
main {
java {
// srcDirs = ['common', 'leetcode', 'gcj', 'poj', 'ctci', 'other']
// exclude '**/tmp/**'
srcDir 'lib'
srcDir {
file('leetcode').listFiles().findAll { it.isDirectory() && it.name != 'tmp' }
}
srcDir {
file('hackerrank').listFiles().findAll { it.isDirectory() && it.name != 'tmp' }
}
srcDir {
file('poj').listFiles().findAll { it.isDirectory() && it.name != 'tmp' }
}
srcDir {
file('usaco').listFiles().findAll { it.isDirectory() && it.name != 'tmp' }
}
srcDir {
file('ctci').listFiles().findAll { it.isDirectory() && it.name != 'tmp' }
}
srcDir {
file('other').listFiles().findAll { it.isDirectory() && it.name != 'tmp' }
}
def dirs = []
file('gcj').listFiles().findAll { it.isDirectory() && it.name.startsWith('2')}.each { dirs << it.listFiles() }
srcDir dirs
}
resources {
srcDirs = ['src/resources']
}
}
}
task cleanAll(dependsOn: clean, type: Delete) {
description 'Clean all generated files.'
delete 'bin'
fileTree(projectDir){ include '**/*.class' }.each{ delete it }
doLast {
println 'done with clean all'
}
}
cleanAll.dependsOn {
tasks.findAll { it.name.startsWith('clean') && it.name != 'cleanAll' }
}