-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
50 lines (41 loc) · 1.27 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
// plugins
apply plugin: 'idea'
apply plugin: 'java'
dependencies {
// algs4.jar
compile name: 'algs4'
// junit
testCompile 'junit:junit:4.12'
}
idea {
project.ipr {
withXml { provider ->
// GIT
provider.node.component
.find { it.@name == 'VcsDirectoryMappings' }
.mapping.@vcs = 'Git'
// Encoding
def encodingComponent = provider.node.component.find { it.@name == 'Encoding'}
if (encodingComponent) {
encodingComponent.@useUTFGuessing = true
encodingComponent.@native2AsciiForPropertiesFiles = true
encodingComponent.@defaultCharsetForPropertiesFiles = 'UTF-8'
encodingComponent.appendNode 'file', [url: 'PROJECT', charset: 'UTF-8']
} else {
def encodingNode = project.appendNode 'Encoding', [useUTFGuessing: true, native2AsciiForPropertiesFile: true, defaultCharsetForPropertiesFiles: 'UTF-8']
encodingNode.appendNode 'file', [url: 'PROJECT', charset: 'UTF-8']
}
}
}
}
repositories {
mavenCentral()
jcenter()
flatDir {
dirs 'lib'
}
}
// wrapper
task wrapper(type: Wrapper) {
gradleVersion = '3.0'
}