|
| 1 | +# Code Quality for Android |
| 2 | +[  ](https://bintray.com/1117847002272/CodeQuality-Android/CodeQuality-Android/1.0.0/link) |
| 3 | +[](https://opensource.org/licenses/MIT) |
| 4 | + |
| 5 | +Gradle Plugin for integration of code quality tools with Gitlab CI. |
| 6 | +It converts Detekt and Lint reports to compatible with [Gitlab Code Quality](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html) format. |
| 7 | + |
| 8 | +## Usage |
| 9 | + |
| 10 | +1) Add dependency |
| 11 | +``` |
| 12 | +buildscript { |
| 13 | +
|
| 14 | + repositories { |
| 15 | + ... |
| 16 | + maven { |
| 17 | + url 'https://dl.bintray.com/1117847002272/CodeQuality-Android' |
| 18 | + } |
| 19 | + } |
| 20 | + dependencies { |
| 21 | + ... |
| 22 | + classpath 'ru.mobileup:code-quality-android:1.0.0' |
| 23 | + } |
| 24 | +} |
| 25 | +``` |
| 26 | + |
| 27 | +2) Setup plugin |
| 28 | +``` |
| 29 | +apply plugin: 'ru.mobileup.code-quality-android' |
| 30 | +
|
| 31 | +codeQuality { |
| 32 | + reportsDirectory = file('build/reports') |
| 33 | + issuesFile = rootProject.file('code_quality_issues.json') |
| 34 | + collectInformationIssues = false |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +3) Run your Detekt and Lint checks. |
| 39 | + |
| 40 | +4) Run `gradlew collectCodeQualityIssues`. |
| 41 | +Generated file (code_quality_issues.json) can be uploaded as [Gitlab Code Quality artifact](https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html#artifactsreportscodequality-starter). |
| 42 | + |
| 43 | +## License |
| 44 | +``` |
| 45 | +MIT License |
| 46 | +
|
| 47 | +Copyright (c) 2020 MobileUp |
| 48 | +
|
| 49 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 50 | +of this software and associated documentation files (the "Software"), to deal |
| 51 | +in the Software without restriction, including without limitation the rights |
| 52 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 53 | +copies of the Software, and to permit persons to whom the Software is |
| 54 | +furnished to do so, subject to the following conditions: |
| 55 | +
|
| 56 | +The above copyright notice and this permission notice shall be included in all |
| 57 | +copies or substantial portions of the Software. |
| 58 | +
|
| 59 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 60 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 61 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 62 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 63 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 64 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 65 | +SOFTWARE. |
| 66 | +``` |
0 commit comments