All Projects → ChaitanyaPramod → Findbugs Android

ChaitanyaPramod / Findbugs Android

Licence: mit
Gradle plugin that creates FindBugs reports for android projects

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Findbugs Android

Codeanalysis
Android静态代码分析
Stars: ✭ 31 (-76.69%)
Mutual labels:  gradle-plugin, findbugs
Gradle Static Analysis Plugin
Easy setup of static analysis tools for Android and Java projects.
Stars: ✭ 398 (+199.25%)
Mutual labels:  gradle-plugin, findbugs
Gradle Code Quality Tools Plugin
Gradle plugin that generates ErrorProne, Findbugs, Checkstyle, PMD, CPD, Lint, Detekt & Ktlint Tasks for every subproject.
Stars: ✭ 282 (+112.03%)
Mutual labels:  gradle-plugin, findbugs
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-27.07%)
Mutual labels:  gradle-plugin, findbugs
Fb Contrib
a FindBugs/SpotBugs plugin for doing static code analysis for java code bases
Stars: ✭ 124 (-6.77%)
Mutual labels:  findbugs
Godot
Keep track of how much time you spend on Gradle builds
Stars: ✭ 113 (-15.04%)
Mutual labels:  gradle-plugin
Licensetoolsplugin
Gradle plugin to check library licenses and generate license pages for Android
Stars: ✭ 113 (-15.04%)
Mutual labels:  gradle-plugin
Kotlin
The Kotlin Programming Language.
Stars: ✭ 39,664 (+29722.56%)
Mutual labels:  gradle-plugin
Yguard
The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts
Stars: ✭ 130 (-2.26%)
Mutual labels:  gradle-plugin
Find Sec Bugs
The SpotBugs plugin for security audits of Java web applications and Android applications. (Also work with Kotlin, Groovy and Scala projects)
Stars: ✭ 1,748 (+1214.29%)
Mutual labels:  findbugs
Gnag
A Gradle plugin that helps facilitate GitHub PR checking and automatic commenting of violations.
Stars: ✭ 120 (-9.77%)
Mutual labels:  findbugs
Jaop
jaop is a gradle plugin base on javassist&asm for android aop
Stars: ✭ 115 (-13.53%)
Mutual labels:  gradle-plugin
Jib
🏗 Build container images for your Java applications.
Stars: ✭ 11,370 (+8448.87%)
Mutual labels:  gradle-plugin
Audiovideocodec
一款视频录像机,支持AudioRecord录音、MediaCodec输出AAC、MediaMuxer合成音频视频并输出mp4,支持自动对焦、屏幕亮度调节、录制视频时长监听、手势缩放调整焦距等
Stars: ✭ 113 (-15.04%)
Mutual labels:  gradle-plugin
Gradle Eclipse Aar Plugin
Gradle plugin to use Android AAR libraries on Eclipse.
Stars: ✭ 127 (-4.51%)
Mutual labels:  gradle-plugin
Gradle Build Properties Plugin
Keep your secrets secret. External build properties support for your Gradle scripts.
Stars: ✭ 110 (-17.29%)
Mutual labels:  gradle-plugin
Clojurephant
Clojure and Clojurescript support for Gradle
Stars: ✭ 118 (-11.28%)
Mutual labels:  gradle-plugin
Bytex
ByteX is a bytecode plugin platform based on Android Gradle Transform API and ASM. 字节码插件开发平台
Stars: ✭ 2,140 (+1509.02%)
Mutual labels:  gradle-plugin
Okbuck
OkBuck is a gradle plugin that lets developers utilize the Buck build system on a gradle project.
Stars: ✭ 1,513 (+1037.59%)
Mutual labels:  gradle-plugin
Gradle Visteg
Exports task execution graph as .dot file
Stars: ✭ 116 (-12.78%)
Mutual labels:  gradle-plugin

Logo

findbugs-android

A Gradle plugin that creates FindBugs tasks for each variant of android application or library project

Project site: https://findbugs-android.chaitanyapramod.com

Why

In order to create FindBugs report for Android projects, you need to create FindBugs tasks and configure them by providing paths to source code, compiled classes and classpath. It can be troublesome since Android projects can have different flavors and build types, thus requiring additional paths to be set. This plugin provides those tasks already configured for you.

In addition, the plugin automatically excludes Generated classes from Android databinding library, android resource, Butterknife and Dagger 2. If you want more added to this list or want it configurable, open an issue.

Usage

Apply the plugin after the Android gradle plugin. The FindBugs tasks are already hooked to the check task.

buildscript {
  repositories {
    // ...
    jcenter()
  }
  dependencies {
    // ...
    classpath 'com.chaitanyapramod.gradle:findbugs-android:1.0'
  }
}

apply plugin: 'com.android.application'
apply plugin: 'com.chaitanyapramod.findbugs-android'

android {
  // ...
  productFlavors {
    free {}
    paid {}
  }
}

This would create the following Gradle tasks:

  • findbugsFreeDebug
  • findbugsFreeRelease
  • findbugsPaidDebug
  • findbugsPaidRelease

Note that running check task runs all these findbugs tasks as well.

Configuration

Use the standard findbugs extension to configure the FindBugs tasks

buildscript {
  repositories {
    // ...
    jcenter()
  }
  dependencies {
    // ...
    classpath 'com.chaitanyapramod.gradle:findbugs-android:1.0'
  }
}

apply plugin: 'com.android.application'
apply plugin: 'com.chaitanyapramod.findbugs-android'

findbugs {
  toolVersion '3.0.1'
  ignoreFailures true
  effort 'max'
  reportLevel 'high'
  excludeBugsFilter = file("$rootProject.projectDir/config/findbugs/excludeBugsFilter.xml")
}

android {
  // ...
  productFlavors {
    free {}
    paid {}
  }
}

Report Format

By default, XML reports are generated. You can add the following snippet to get HTML reports

tasks.withType(FindBugs) {
    reports {
        xml.enabled = false
        html.enabled = true
    }
}

Contributing

Contributers will find looking through sources of FindBugs, FindBugsExtension and FindBugsPlugin useful.

This plugin has been heavily inspired by jacoco-android-gradle-plugin

License

MIT License

Copyright (c) 2016 Chaitanya Pramod

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].