Skip to content

Support other vcs sites #4

@worker8

Description

@worker8

Overview

Currently, the parseAndSendLintResult task does too many things.

  1. It takes in lint-results.xml produced ./gradlew lint.
  2. It then parses it.
  3. Then it renders the result into markdown.
  4. Then it sends the markdown result to Github.

The downside of this is that it won't work with other site. Since Github is hardcoded.

To make this work with Bitbucket or Gitlab or others, no 3 and 4 have to be made configurable or extracted as a separate task.

Proposal

It can be further improved by taking in more options:

plugins {
    id('com.worker8.android_lint_reporter')
}
android_lint_reporter {
    lintFilePath = "./src/main/resources/lint-results.xml"
    vcs = "github | bitbucket | gitlab"

    github {
        token = "<your personal github token>"
        username = "worker8"
        repositoryName = "AndroidLintReporter"        
    }
    // OR
    bitbucket {
        token = "<your bitbucket token>"
        username = "worker8"
        repositoryName = "AndroidLintReporter"        
    }
    // OR
    gitlab {
        token = "<your Gitlab token>"
        username = "worker8"
        repositoryName = "AndroidLintReporter"        
    }
}

Then, the rendering of Markdown should be slightly modified because Github flavored markdown is different than others.

After that, the ReadMe has to be changed to provide a sample on how to setup Bitbucket Pipeline and Gitlab Runner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions