Skip to content

Commit

Permalink
Merge branch 'release/3.5.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrer757 committed Sep 7, 2017
2 parents b414d5e + 496fc4c commit 5803eaf
Show file tree
Hide file tree
Showing 53 changed files with 886 additions and 280 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
build
.idea
*.iml
fixCommits.sh
gen/
sample/gen/
sample/gen/
39 changes: 35 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
language: java
language: android
jdk: oraclejdk8

before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
# Gradle dependencies
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

# Android build cache (see http://tools.android.com/tech-docs/build-cache)
- $HOME/.android/build-cache

android:
components:
- tools
- build-tools-25.0.3
- platform-tools
- extra-android-m2repository
- extra-google-m2repository
- extra-google-android-support
- android-25
- sys-img-armeabi-v7a-android-25

licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'

branches:
except:
- /^[0-9]/ # Workaround to not to trigger Travis with tags - https://github.com/travis-ci/travis-ci/issues/1532
before_install:
- printf "bintray.user=$BINTRAY_USER\nbintray.key=$BINTRAY_KEY\ngradle.publish.key=$GRADLE_PUBLISH_KEY\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET\n" > gradle.properties
- printf "bintrayUser=$BINTRAY_USER\nbintrayKey=$BINTRAY_KEY\ngradle.publish.key=$GRADLE_PUBLISH_KEY\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET\n" > gradle.properties
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand All @@ -19,12 +51,11 @@ before_script:
exit 1
fi
script:
- ./gradlew clean :plugin:assemble clean :plugin:check
- ./gradlew clean assemble clean :plugin:check
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
echo "CI on master succeded. Executing release tasks..."
git fetch --unshallow
./gradlew bintrayUpload publishPlugins
./plugin/ci/tag_release.sh
./gradlew bintrayUpload publishPlugins -PbintrayUser="$BINTRAY_USER" -PbintrayKey="$BINTRAY_KEY" -PdryRun=false
fi
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 Jorge Antonio Diaz-Benito Soriano
Copyright (c) 2017 Desmistificaláxia lda.

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:

Expand Down
93 changes: 57 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@
Android Quality Verifier
===============
[![Download][14]][15] [![gitcheese.com][16]][17]

Static code analysis plugin for Android projects.
This is a fork of [the original android-check plugin][1], which implements a really useful concept.

<!---
Build status
------------

### master [![master](https://travis-ci.org/stoyicker/android-check-2.svg?branch=master)](https://travis-ci.org/stoyicker/android-check-2)
### dev [![dev](https://travis-ci.org/stoyicker/android-check-2.svg?branch=dev)](https://travis-ci.org/stoyicker/android-check-2)
-->
| Master | [![Build Status][11]][13] |
|----------|-------------|
| **Dev** | [![dev][12]][13] |

Usage
-----

[ ![Download](https://api.bintray.com/packages/simdea/android-quality-verifier/pt.simdea.verifier/images/download.svg) ](https://bintray.com/simdea/android-quality-verifier/pt.simdea.verifier/_latestVersion)

This plugin is available in<!--- [the Gradle Plugin Portal](https://plugins.gradle.org/plugin/org.stoyicker.android-check) and --> jCenter. It attaches itself to the `check` task if it finds it (that is, you don't use the `plugins` block and you apply either the application or library Android plugins first) - otherwise you'll need to execute the corresponding tasks manually when desired: `androidCheckstyle` for CheckStyle, `androidFindbugs` for FindBugs and `androidPmd` for PMD.
This plugin is available in jCenter. It attaches itself to the `check` task if it finds it (that is, you don't use the `plugins` block and you apply either the application or library Android plugins first) - otherwise you'll need to execute the corresponding tasks manually when desired: `androidCheckstyle` for [CheckStyle][3], `androidFindbugs` for [FindBugs][4], `CPDTask` for [CPD][5] and `androidPmd` for [PMD][6].

Configuration
-------------

### Install

##### Add to main build.gradle:
```gradle
buildscript {
...
dependencies {
...
classpath 'pt.simdea.verifier:verifier:3.5.9'
...
}
...
}
```

##### add to app build.gradle:
```gradle
apply plugin: 'pt.simdea.verifier'
```
### Recommended

The default one.

### Customized

```
```js
// Configuration is completely optional, defaults will be used if not present
check {
// Do absolutely nothing, default: false
skip true/false
// Fails build if a violation is found, default: true
abortOnError true/false. Ignored if all per-tool confs are set to abortOnError false (see below)
abortOnError true/false //Ignored if all per-tool confs are set to abortOnError false (see below)

// Checkstyle configuration
checkstyle {
// Completely skip CheckStyle, default: false
Expand All @@ -52,37 +69,26 @@ check {
// Output file for HTML reports, default: not generated
reportHTML new File(project.buildDir, 'path/where/you/want/checkstyle.html')
}

// Cpd configuration
cpd {
// Same options as Checkstyle
}

// FindBugs configuration
findbugs {
// Same options as Checkstyle, except for a couple of defaults:
// Configuration file for CheckStyle, default: <project_path>/config/findbugs.xml, if non-existent then <project_path>/<module_path>/config/findbugs.xml, if non-existent then plugin/src/main/resources/findbugs/conf-default.xml
config 'path/to/findbugs.xml'
// Output file for XML reports, default: new File(project.buildDir, 'outputs/findbugs/findbugs.xml')
reportXML new File(project.buildDir, 'path/where/you/want/findbugs.xml')
// Same options as Checkstyle
}

// PMD configuration
pmd {
// Same options as Checkstyle and FindBugs, except for a couple of defaults:
// Configuration file for CheckStyle, default: <project_path>/config/pmd.xml, if non-existent then <project_path>/<module_path>/config/pmd.xml, if non-existent then plugin/src/main/resources/pmd/conf-default.xml
config 'path/to/pmd.xml'
// Output file for XML reports, default: new File(project.buildDir, 'outputs/pmd/pmd.xml')
reportXML new File(project.buildDir, 'path/where/you/want/pmd.xml')
// Same options as Checkstyle
}

// Lint configuration
alint {
// Same options as Checkstyle and FindBugs, except for a couple of defaults:
// Configuration file for CheckStyle, default: <project_path>/config/pmd.xml, if non-existent then <project_path>/<module_path>/config/pmd.xml, if non-existent then plugin/src/main/resources/pmd/conf-default.xml
config 'path/to/pmd.xml'
// Output file for XML reports, default: new File(project.buildDir, 'outputs/pmd/pmd.xml')
reportXML new File(project.buildDir, 'path/where/you/want/pmd.xml')
}
lint {
// Same vars of android lint options
}
}
```

Expand All @@ -91,16 +97,31 @@ Developed By

The original version of this plugin was developed by:

- [Jorge Antonio Diaz-Benito Soriano](https://www.linkedin.com/in/jorgediazbenitosoriano)
- [Jorge Antonio Diaz-Benito Soriano][9]

This fork is owned and maintained by [Simdea][2].

License
=======

See [LICENSE.txt](LICENSE.txt).
See [LICENSE.txt][7].

Original work licensed under [MIT license](https://github.com/noveogroup/android-check/blob/master/LICENSE.txt).
Original work licensed under [MIT license][8].

[1]: https://github.com/stoyicker/android-check-2
[2]: http://simdea.pt/
[3]: http://checkstyle.sourceforge.net/
[4]: http://findbugs.sourceforge.net/
[5]: https://pmd.github.io/pmd-5.7.0/usage/cpd-usage.html
[6]: https://pmd.github.io/
[7]: LICENSE.txt
[8]: https://github.com/noveogroup/android-check/blob/master/LICENSE.txt
[9]: https://www.linkedin.com/in/jorgediazbenitosoriano
[10]: https://spotbugs.github.io
[11]: https://travis-ci.org/Simdea/android-quality-verifier.svg?branch=master
[12]: https://travis-ci.org/Simdea/android-quality-verifier.svg?branch=dev
[13]: https://travis-ci.org/Simdea/android-quality-verifier
[14]: https://api.bintray.com/packages/simdea/android-quality-verifier/pt.simdea.verifier/images/download.svg?version=3.5.9
[15]: https://bintray.com/simdea/android-quality-verifier/pt.simdea.verifier/3.5.9/link
[16]: https://s3.amazonaws.com/gitcheese-ui-master/images/badge.svg
[17]: https://www.gitcheese.com/donate/users/1757083/repos/87924699
23 changes: 22 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha8'
classpath 'pt.simdea.verifier:verifier:3.5.9-pre34'
classpath 'com.novoda:bintray-release:0.5.0'
}
}

allprojects {
repositories { jcenter() }
}

task wrapper(type: Wrapper) {
group 'Build Setup'
description 'Initializes the Gradle Wrapper.'
gradleVersion = '3.2.1'
gradleVersion = '4.0'
}

task clean(type: Delete) {
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Apr 11 11:09:28 CEST 2017
#Thu May 25 11:24:10 WEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
19 changes: 13 additions & 6 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ repositories { jcenter() }
dependencies {
compileOnly gradleApi()
// Checkstyle
compile('com.puppycrawl.tools:checkstyle:7.6.1') {
compile('com.puppycrawl.tools:checkstyle:8.2') {
// Android Lint also depends on guava, so don't bring it in twice
exclude module: 'guava'
}
// FindBugs
compile 'com.google.code.findbugs:findbugs:3.0.1'
// SpotBugs
//compile 'com.github.spotbugs:spotbugs:3.1.0-RC5'
//compile 'com.github.spotbugs:spotbugs-ant:3.1.0-RC5'
//compile 'com.github.spotbugs:spotbugs-annotations:3.1.0-RC5'
//compile 'com.github.spotbugs:spotbugs-archetype:0.1.0'
// PMD
compile 'net.sourceforge.pmd:pmd-java:5.6.0'
compile 'net.sourceforge.pmd:pmd-java:5.8.1'
// Error Prone
compile 'com.google.errorprone:error_prone_ant:2.1.1'
}

project.ext {
Expand All @@ -21,10 +28,10 @@ project.ext {
description = 'Static code analysis plugin for Android projects.'
groupId = 'pt.simdea.verifier'
artifactId = 'verifier'
version = "3.3.2"
version = "3.5.9"
website = 'https://github.com/simdea/android-quality-verifier'
scm = 'https://github.com/simdea/android-quality-verifier'
tags = ['android', 'verifier', 'check', 'checkstyle', 'findbugs', 'pmd', 'lint', 'quality']
tags = ['android', 'verifier', 'check', 'checkstyle', 'spotbugs', 'pmd', 'lint', 'quality']
pom = {
licenses {
license {
Expand Down Expand Up @@ -53,8 +60,8 @@ project.ext {
}
}
bintray = {
user = 'andrer757'
key = '6024b510d88c5c1fc86931103322362811626a3c'
user = project.hasProperty('bintrayUser') ? project['bintrayUser'] : 'anonymous'
key = project.hasProperty('bintrayKey') ? project['bintrayKey'] : 'api-key'
repo = 'android-quality-verifier'
org = 'simdea'
licenses = ['MIT']
Expand Down
37 changes: 0 additions & 37 deletions plugin/ci/tag_release.sh

This file was deleted.

2 changes: 1 addition & 1 deletion plugin/gradle/gradle-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ pluginBundle {
artifactId = project.ext.artifactId
version = project.ext.version
}
}
}
2 changes: 1 addition & 1 deletion plugin/gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ bintray {
name = project.ext.bintray.version
}
}
}
}
Loading

0 comments on commit 5803eaf

Please sign in to comment.