提交 9f64f473 编写于 作者: S Sam Judd

Add findbugs task to main library.

上级 91289b40
apply plugin: 'com.android.library'
apply plugin: 'robolectric'
apply plugin: 'maven'
apply plugin: 'findbugs'
findbugs {
toolVersion = "2.0.3"
}
dependencies {
compile project(':third_party:gif_decoder')
......@@ -29,3 +33,31 @@ android {
versionName = VERSION_NAME
}
}
afterEvaluate {
findbugsTestDebug {
enabled = false
}
task findbugs(type: FindBugs, dependsOn: assembleDebug) {
description 'Run findbugs'
group 'verification'
classes = fileTree('build/intermediates/classes/debug/')
source = fileTree('src/main/java')
classpath = files(project.configurations.compile.asPath)
effort = 'max'
excludeFilter = file("findbugs-exclude.xml")
reports {
xml.enabled = false
html.enabled = true
}
}
check.doLast {
tasks.getByName("findbugs").execute()
}
}
\ No newline at end of file
<FindBugsFilter>
<Match>
<Class name="~.*R\$.*"/>
</Match>
<Match>
<Class name="~.*Manifest\$.*"/>
</Match>
<!-- BytesResource is the wrapper that is given control of the data. -->
<Match>
<Class name="com.bumptech.glide.load.resource.bytes.BytesResource" />
<Method name="get" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<!-- We would rather expose the internal bytes than box or copy them. -->
<Match>
<Class name="com.bumptech.glide.load.resource.bytes.BytesResource" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<!-- Byte array fetcher just wraps a byte array to return an InputStream, data is not mutated. -->
<Match>
<Class name="com.bumptech.glide.load.data.ByteArrayFetcher" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<!-- RecyclableBufferedInputStream safely re-uses pooled byte arrays -->
<Match>
<Class name="com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
</FindBugsFilter>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册