-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (53 loc) · 1.63 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'findbugs'
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.github.ksoichiro:gradle-eclipse-aar-plugin:0.1.0'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}
task findbugs(type: FindBugs) {
ignoreFailures = true
effort = "max"
reportLevel = "low" // *どのレベルの報告まで対応するかで変更*
excludeFilter = new File("${project.rootDir}/config/android_findbugs_filter.xml")
classes = files("${project.rootDir}/library/build/intermediates/classes/")
source 'library/src'
include '**/*.java'
reports {
xml.enabled = false
html.enabled = true
html {
destination "${project.rootDir}/library/build/reports/findbugs_report.html"
}
// xml {
// destination "${project.rootDir}/library/build/reports/findbugs_report.xml"
// }
}
classpath = files()
}
task findbugsConvertUtf8 << {
def filename = "${project.rootDir}/library/build/reports/findbugs_report.html"
def file = new File(filename)
def text = file.getText()
text = text.replaceAll(/<head>/, "<head>\n<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>")
def fw = new File(filename).newWriter()
fw.writeLine(text)
fw.close()
}