forked from loom/loom-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
37 lines (31 loc) · 945 Bytes
/
build.gradle
File metadata and controls
37 lines (31 loc) · 945 Bytes
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
group 'io.loom-core'
version '0.0.1-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'checkstyle'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}
checkstyle {
toolVersion = '7.7'
}
/**
* ignoreFailures = false 설정만으로 checkstyle 위배 시 빌드가 실패해야 하지만
* 다음과 같은 버그가 있습니다.
* https://github.com/gradle/gradle/issues/881
*
* 이 구성은 버그가 해결될 때 까지 사용되는 임시방편입니다.
* */
tasks.withType(Checkstyle).each { checkstyleTask ->
checkstyleTask.doLast {
reports.all { report ->
def outputFile = report.destination
if (outputFile.exists() && outputFile.text.contains("<error ")) {
throw new GradleException("There were checkstyle warnings! For more info check $outputFile")
}
}
}
}