Skip to content

Commit

Permalink
Fix whitespace errors
Browse files Browse the repository at this point in the history
  • Loading branch information
friederbluemle committed Aug 30, 2016
1 parent c917db5 commit 5a96653
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 34 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
34 changes: 15 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,64 @@
vb-android-app-quality
======================
# vb-android-app-quality

Sample android project using Gradle, with basic quality tools set up.
Sample android project using Gradle, with basic quality tools set up.

This project for provide a clean base to any Gradle Android project.

This project also illustrate my articles about Gradle on my [website](http://vincentbrison.com).

Quality
-------
## Quality

You will find under the directory /config the base configuration to run quality test on the project.
The followings tools are used :
- Checkstyle.
- Findbugs.
- PMD.
- Lint.

To run these quality tools and get reports, you need to execute the following gradle command :

```bash
gradle check
```

Findbugs needs the binaries of the project, so be sure to run at least one time the following command, before launching a check :

```bash
gradle build
```

You can modify the behaviour of each tool through the [quality.gradle](config/quality.gradle) file.
You can for example set :
- The output format (xml or html).
- Abort the task when a failure is found.

You should refer to this [gradle documentation](http://www.gradle.org/docs/current/userguide/userguide.html) to configure those plugins.

By default, all the reports will be generated in the folder app/build/reports.

Flavor
------
## Flavor

The project itself show various uses of the flavor system. Flavors are defined in the [build.gradle](app/build.gradle).
You need to provide a least a name to the flavor :
You need to provide a least a name to the flavor :

You can define several properties to your flavors. One very useful is the `packageName` which let you
change the package name of your application. This can be used to generate differents flavors of
change the package name of your application. This can be used to generate differents flavors of
your application and install both of them on the same device (free and paid versions, dev, validation and release versions...).

You can also put specific sources and resources with flavors. As it is in this project, just create
a directory under the src folder, name it with the name of your flavor, and put inside java codes and resources.

Testing
-------
## Testing

Work in progress...


To go further
-------------
This project is based on these two other projects, which are awesome. Consider take a look at them :
- [Quality-Tools-for-Android](https://github.com/stephanenicolas/Quality-Tools-for-Android).
- [volley-examples](https://github.com/marcoRS/volley-examples).


License
=======
# License

Copyright 2015 Vincent Brison.

Expand Down
4 changes: 2 additions & 2 deletions app/proguard-rules.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:/Users/Brize/AppData/Local/Android/android-studio/sdk/tools/proguard/proguard-android.txt
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
Expand All @@ -14,4 +14,4 @@
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
#}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public double calcPiDigits(int max) {
}
return sum * 4;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public final class PiCalculator implements PiGenerator {
public double calcPiDigits(int maxDigits) {
return 3.1415;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ public double calcPiDigits(int maxDigits) {
}
return pi;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ public interface AppComponent {
*/
void inject(MainActivity mainActivity);
}

2 changes: 1 addition & 1 deletion app/src/mockWebServerPi/assets/stubs/rank_ok.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"rank": 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public final class PiCalculator implements PiGenerator {
public double calcPiDigits(int maxDigits) {
return 3.1415;
}
}
}
2 changes: 1 addition & 1 deletion app/src/test/java/vb/android/app/quality/PiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public void testCalcPiDigits() throws Exception {
}

}
}
}
2 changes: 1 addition & 1 deletion config/quality/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
<suppress checks="[a-zA-Z0-9]*" files=".*ViewInjector.java" />
<suppress checks="[a-zA-Z0-9]*" files=".*_MembersInjector.java" />

</suppressions>
</suppressions>
2 changes: 1 addition & 1 deletion config/quality/findbugs/findbugs-filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
</Match>


</FindBugsFilter>
</FindBugsFilter>
2 changes: 1 addition & 1 deletion config/quality/lint/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@
<issue id="WrongFolder" severity="ignore" />
<issue id="WrongManifestParent" severity="ignore" />
<issue id="WrongViewCast" severity="ignore" />
</lint>
</lint>
2 changes: 1 addition & 1 deletion config/quality/pmd/pmd-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
<exclude name="ShortVariable" />
<exclude name="VariableNamingConventions" />
</rule>
</ruleset>
</ruleset>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true

0 comments on commit 5a96653

Please sign in to comment.