It is project for fast create android applications, using latest gradle android plugin, checking style and lint. Now, project provides two type of projects: android-simple-example and android-extend-example.
It's simple! You shoud download setup.gradle and run tasks create with argument instanceName. For example create your instance android-simple-example (by default):
$ cd <you-projects-foldes>
$ wget https://github.com/noveogroup/android-project-example/raw/master/setup.gradle
$ gradle -b setup.gradle create -PinstanceName=MyFunnyApp
If you want create instance of android-extend-example or android-sdk-manager-example you must add parameter projectType with with required example project. For exapmle:
$ gradle -b setup.gradle create -PinstanceName=MyFunnyApp -PprojectType=android-extended-example
In result you should get:
$ ls
$ my-funny-app setup.gradle
By default, build script will perform static code analysys and aggregate results. Build task will fail if any analyzers report errors or warnings. However, you can always choose not to use one or all of them. To disable all analyzers, except Lint, remove following line from your build.gradle script:
apply from: rootProject.file('gradle/check.gradle')
http://tools.android.com/tips/lint
Lint configuration can be found in build.gradle file:
lintOptions {
abortOnError true
checkAllWarnings true
warningsAsErrors true
disable 'AllowBackup', 'ContentDescription', 'InvalidPackage', 'SelectableText', 'SpUsage'
}
You can always suppress Lint warnings using @SuppressLint() annotation. See http://tools.android.com/tips/lint/suppressing-lint-warnings for more details.
Results can be found in ./build/lint-results.html
http://findbugs.sourceforge.net
FindBug configuration files can be found in ./gradle/config/findbugs folder.
To suppress FindBug warnings add following dependency to your module:
compile 'com.google.code.findbugs:annotations:2.0.+'
You can then use @SuppressFBWarnings() annotation.
See http://findbugs.sourceforge.net/manual/index.html for more details.
Results can be found in ./build/reports/findbugs
PMD configuration file can be found in ./gradle/config/pmd folder.
To suppress PMD warning you can use @SuppressWarnings("PMD[.%RULE%]") annotation.
See http://pmd.sourceforge.net/pmd-5.1.0/suppressing.html for more details.
Results can be found in ./build/reports/pmd
http://checkstyle.sourceforge.net
CheckStyle configuration files can be found in ./gradle/config/checkstyle folder.
You can disable check for some code fragment using following comments:
//CHECKSTYLE:OFF
String s= "Some"+
"poorly " + "formatted"+" code";
//CHECKSTYLE:ON
Results can be found in ./build/reports/checkstyle
More in detail you can read about types of projects in readme files: