Skip to content

Commit 5803eaf

Browse files
committed
Merge branch 'release/3.5.9'
2 parents b414d5e + 496fc4c commit 5803eaf

File tree

53 files changed

+886
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+886
-280
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
build
66
.idea
77
*.iml
8+
fixCommits.sh
9+
gen/
10+
sample/gen/
11+
sample/gen/

.travis.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,42 @@
11
language: java
2+
language: android
23
jdk: oraclejdk8
4+
5+
before_cache:
6+
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
7+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
8+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
9+
10+
cache:
11+
directories:
12+
# Gradle dependencies
13+
- $HOME/.gradle/caches/
14+
- $HOME/.gradle/wrapper/
15+
16+
# Android build cache (see http://tools.android.com/tech-docs/build-cache)
17+
- $HOME/.android/build-cache
18+
19+
android:
20+
components:
21+
- tools
22+
- build-tools-25.0.3
23+
- platform-tools
24+
- extra-android-m2repository
25+
- extra-google-m2repository
26+
- extra-google-android-support
27+
- android-25
28+
- sys-img-armeabi-v7a-android-25
29+
30+
licenses:
31+
- 'android-sdk-preview-license-.+'
32+
- 'android-sdk-license-.+'
33+
- 'google-gdk-license-.+'
34+
335
branches:
436
except:
537
- /^[0-9]/ # Workaround to not to trigger Travis with tags - https://github.com/travis-ci/travis-ci/issues/1532
638
before_install:
7-
- printf "bintray.user=$BINTRAY_USER\nbintray.key=$BINTRAY_KEY\ngradle.publish.key=$GRADLE_PUBLISH_KEY\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET\n" > gradle.properties
39+
- printf "bintrayUser=$BINTRAY_USER\nbintrayKey=$BINTRAY_KEY\ngradle.publish.key=$GRADLE_PUBLISH_KEY\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET\n" > gradle.properties
840
before_cache:
941
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
1042
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
@@ -19,12 +51,11 @@ before_script:
1951
exit 1
2052
fi
2153
script:
22-
- ./gradlew clean :plugin:assemble clean :plugin:check
54+
- ./gradlew clean assemble clean :plugin:check
2355
after_success:
2456
- |
2557
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
2658
echo "CI on master succeded. Executing release tasks..."
2759
git fetch --unshallow
28-
./gradlew bintrayUpload publishPlugins
29-
./plugin/ci/tag_release.sh
60+
./gradlew bintrayUpload publishPlugins -PbintrayUser="$BINTRAY_USER" -PbintrayKey="$BINTRAY_KEY" -PdryRun=false
3061
fi

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016 Jorge Antonio Diaz-Benito Soriano
1+
Copyright (c) 2017 Desmistificaláxia lda.
22

33
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:
44

README.md

Lines changed: 57 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,57 @@
11
Android Quality Verifier
22
===============
3+
[![Download][14]][15] [![gitcheese.com][16]][17]
34

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

7-
<!---
88
Build status
99
------------
1010

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

1515
Usage
1616
-----
17-
18-
[ ![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)
19-
20-
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.
17+
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].
2118

2219
Configuration
2320
-------------
2421

22+
### Install
23+
24+
##### Add to main build.gradle:
25+
```gradle
26+
buildscript {
27+
...
28+
dependencies {
29+
...
30+
classpath 'pt.simdea.verifier:verifier:3.5.9'
31+
...
32+
}
33+
...
34+
}
35+
```
36+
37+
##### add to app build.gradle:
38+
```gradle
39+
apply plugin: 'pt.simdea.verifier'
40+
```
2541
### Recommended
2642

2743
The default one.
2844

2945
### Customized
3046

31-
```
47+
```js
3248
// Configuration is completely optional, defaults will be used if not present
3349
check {
3450
// Do absolutely nothing, default: false
3551
skip true/false
3652
// Fails build if a violation is found, default: true
37-
abortOnError true/false. Ignored if all per-tool confs are set to abortOnError false (see below)
53+
abortOnError true/false //Ignored if all per-tool confs are set to abortOnError false (see below)
54+
3855
// Checkstyle configuration
3956
checkstyle {
4057
// Completely skip CheckStyle, default: false
@@ -52,37 +69,26 @@ check {
5269
// Output file for HTML reports, default: not generated
5370
reportHTML new File(project.buildDir, 'path/where/you/want/checkstyle.html')
5471
}
72+
73+
// Cpd configuration
74+
cpd {
75+
// Same options as Checkstyle
76+
}
77+
5578
// FindBugs configuration
5679
findbugs {
57-
// Same options as Checkstyle, except for a couple of defaults:
58-
59-
// 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
60-
config 'path/to/findbugs.xml'
61-
62-
// Output file for XML reports, default: new File(project.buildDir, 'outputs/findbugs/findbugs.xml')
63-
reportXML new File(project.buildDir, 'path/where/you/want/findbugs.xml')
80+
// Same options as Checkstyle
6481
}
82+
6583
// PMD configuration
6684
pmd {
67-
// Same options as Checkstyle and FindBugs, except for a couple of defaults:
68-
69-
// 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
70-
config 'path/to/pmd.xml'
71-
72-
// Output file for XML reports, default: new File(project.buildDir, 'outputs/pmd/pmd.xml')
73-
reportXML new File(project.buildDir, 'path/where/you/want/pmd.xml')
85+
// Same options as Checkstyle
7486
}
7587

7688
// Lint configuration
77-
alint {
78-
// Same options as Checkstyle and FindBugs, except for a couple of defaults:
79-
80-
// 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
81-
config 'path/to/pmd.xml'
82-
83-
// Output file for XML reports, default: new File(project.buildDir, 'outputs/pmd/pmd.xml')
84-
reportXML new File(project.buildDir, 'path/where/you/want/pmd.xml')
85-
}
89+
lint {
90+
// Same vars of android lint options
91+
}
8692
}
8793
```
8894

@@ -91,16 +97,31 @@ Developed By
9197

9298
The original version of this plugin was developed by:
9399

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

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

98104
License
99105
=======
100106

101-
See [LICENSE.txt](LICENSE.txt).
107+
See [LICENSE.txt][7].
102108

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

105111
[1]: https://github.com/stoyicker/android-check-2
106112
[2]: http://simdea.pt/
113+
[3]: http://checkstyle.sourceforge.net/
114+
[4]: http://findbugs.sourceforge.net/
115+
[5]: https://pmd.github.io/pmd-5.7.0/usage/cpd-usage.html
116+
[6]: https://pmd.github.io/
117+
[7]: LICENSE.txt
118+
[8]: https://github.com/noveogroup/android-check/blob/master/LICENSE.txt
119+
[9]: https://www.linkedin.com/in/jorgediazbenitosoriano
120+
[10]: https://spotbugs.github.io
121+
[11]: https://travis-ci.org/Simdea/android-quality-verifier.svg?branch=master
122+
[12]: https://travis-ci.org/Simdea/android-quality-verifier.svg?branch=dev
123+
[13]: https://travis-ci.org/Simdea/android-quality-verifier
124+
[14]: https://api.bintray.com/packages/simdea/android-quality-verifier/pt.simdea.verifier/images/download.svg?version=3.5.9
125+
[15]: https://bintray.com/simdea/android-quality-verifier/pt.simdea.verifier/3.5.9/link
126+
[16]: https://s3.amazonaws.com/gitcheese-ui-master/images/badge.svg
127+
[17]: https://www.gitcheese.com/donate/users/1757083/repos/87924699

build.gradle

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
1+
buildscript {
2+
repositories {
3+
jcenter()
4+
maven {
5+
url 'https://maven.google.com'
6+
}
7+
maven {
8+
url "https://plugins.gradle.org/m2/"
9+
}
10+
}
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:3.0.0-alpha8'
13+
classpath 'pt.simdea.verifier:verifier:3.5.9-pre34'
14+
classpath 'com.novoda:bintray-release:0.5.0'
15+
}
16+
}
17+
18+
allprojects {
19+
repositories { jcenter() }
20+
}
21+
122
task wrapper(type: Wrapper) {
223
group 'Build Setup'
324
description 'Initializes the Gradle Wrapper.'
4-
gradleVersion = '3.2.1'
25+
gradleVersion = '4.0'
526
}
627

728
task clean(type: Delete) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Apr 11 11:09:28 CEST 2017
1+
#Thu May 25 11:24:10 WEST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

plugin/build.gradle

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@ repositories { jcenter() }
55
dependencies {
66
compileOnly gradleApi()
77
// Checkstyle
8-
compile('com.puppycrawl.tools:checkstyle:7.6.1') {
8+
compile('com.puppycrawl.tools:checkstyle:8.2') {
99
// Android Lint also depends on guava, so don't bring it in twice
1010
exclude module: 'guava'
1111
}
1212
// FindBugs
1313
compile 'com.google.code.findbugs:findbugs:3.0.1'
14+
// SpotBugs
15+
//compile 'com.github.spotbugs:spotbugs:3.1.0-RC5'
16+
//compile 'com.github.spotbugs:spotbugs-ant:3.1.0-RC5'
17+
//compile 'com.github.spotbugs:spotbugs-annotations:3.1.0-RC5'
18+
//compile 'com.github.spotbugs:spotbugs-archetype:0.1.0'
1419
// PMD
15-
compile 'net.sourceforge.pmd:pmd-java:5.6.0'
20+
compile 'net.sourceforge.pmd:pmd-java:5.8.1'
21+
// Error Prone
22+
compile 'com.google.errorprone:error_prone_ant:2.1.1'
1623
}
1724

1825
project.ext {
@@ -21,10 +28,10 @@ project.ext {
2128
description = 'Static code analysis plugin for Android projects.'
2229
groupId = 'pt.simdea.verifier'
2330
artifactId = 'verifier'
24-
version = "3.3.2"
31+
version = "3.5.9"
2532
website = 'https://github.com/simdea/android-quality-verifier'
2633
scm = 'https://github.com/simdea/android-quality-verifier'
27-
tags = ['android', 'verifier', 'check', 'checkstyle', 'findbugs', 'pmd', 'lint', 'quality']
34+
tags = ['android', 'verifier', 'check', 'checkstyle', 'spotbugs', 'pmd', 'lint', 'quality']
2835
pom = {
2936
licenses {
3037
license {
@@ -53,8 +60,8 @@ project.ext {
5360
}
5461
}
5562
bintray = {
56-
user = 'andrer757'
57-
key = '6024b510d88c5c1fc86931103322362811626a3c'
63+
user = project.hasProperty('bintrayUser') ? project['bintrayUser'] : 'anonymous'
64+
key = project.hasProperty('bintrayKey') ? project['bintrayKey'] : 'api-key'
5865
repo = 'android-quality-verifier'
5966
org = 'simdea'
6067
licenses = ['MIT']

plugin/ci/tag_release.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

plugin/gradle/gradle-publish.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ pluginBundle {
2727
artifactId = project.ext.artifactId
2828
version = project.ext.version
2929
}
30-
}
30+
}

plugin/gradle/publish.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ bintray {
7171
name = project.ext.bintray.version
7272
}
7373
}
74-
}
74+
}

0 commit comments

Comments
 (0)