Sign inSign up

nemooudeis/android-spotbugs

By nemooudeis

•Updated over 6 years ago

Run spotbugs on android projects on CI

Image
0

10K+

nemooudeis/android-spotbugs repository overview

⁠SpotBugs⁠ on CircleCI Android Containers

Source Code here -> https://github.com/NemoOudeis/ci-docker/tree/master/android-spotbugs⁠

Built to run SpotBugs on CI, outside of gradle, in parallel to other jobs. SpotBugs operates on bytecode, so you need to compile the classes first, either in a previous job (and pass it via the workspace) or compile inside the spotbugs step (only compiling java tends to be faster than the full android build cycle by factor of 10).

You can run it locally:

docker run --rm --mount type=bind,src=$(pwd),dst=/code nemooudeis/android-spotbugs spotbugs "/code/build/intermediates/javac/"

Or use it as a step within your build pipeline:

jobs:
  spotbugs:
    docker:
      - image: nemooudeis/android-spotbugs:28.0.0-4.0.5
    steps:
      - checkout
      - run:
          name: Compile java classes
          command: |
            ./gradlew compileReleaseSources
            mkdir spotbugs
            spotbugs -html -output spotbugs/spotbugs-report.html \
                -exclude spotbugs-filter.xml \
                -longBugCodes -quiet \
                -effort:max \
                -low \
                build/intermediates/javac/
            spotbugs -xml -output spotbugs/spotbugs-report.xml \
                -exclude spotbugs-filter.xml \
                -longBugCodes -quiet \
                -effort:max \
                -low \
                build/intermediates/javac/
      - store_artifacts:
          path: spotbugs # to view HTML report
      - persist_to_workspace:
          root: .
          paths:
            - coverage # to process XML report in other jobs

Tag summary

Content type

Image

Digest

Size

1.5 GB

Last updated

over 6 years ago

docker pull nemooudeis/android-spotbugs