@@ -9,7 +9,7 @@ install:
|
|||||||
- echo y | android update sdk -u -a -t extra-google-m2repository
|
- echo y | android update sdk -u -a -t extra-google-m2repository
|
||||||
- echo y | android update sdk -u -a -t extra-android-m2repository
|
- echo y | android update sdk -u -a -t extra-android-m2repository
|
||||||
|
|
||||||
script: ./gradlew assembleRelease testReleaseUnitTest lintRelease
|
script: ./gradlew assembleRelease testReleaseUnitTest lintRelease findbugs
|
||||||
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- cat app/build/reports/findbugs/findbugs.html
|
- cat app/build/reports/findbugs/findbugs.html
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'findbugs'
|
||||||
|
|
||||||
|
findbugs {
|
||||||
|
sourceSets = []
|
||||||
|
ignoreFailures = false
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 25
|
compileSdkVersion 25
|
||||||
@@ -17,3 +23,22 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task findbugs(type: FindBugs, dependsOn: 'assembleDebug') {
|
||||||
|
|
||||||
|
description 'Run findbugs'
|
||||||
|
group 'verification'
|
||||||
|
|
||||||
|
classes = fileTree('build/intermediates/classes/debug/')
|
||||||
|
source = fileTree('src/main/java')
|
||||||
|
classpath = files()
|
||||||
|
|
||||||
|
effort = 'max'
|
||||||
|
|
||||||
|
excludeFilter = file("./config/findbugs/exclude.xml")
|
||||||
|
|
||||||
|
reports {
|
||||||
|
xml.enabled = false
|
||||||
|
html.enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
10
app/config/findbugs/exclude.xml
Normal file
10
app/config/findbugs/exclude.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<FindBugsFilter>
|
||||||
|
|
||||||
|
<Match>
|
||||||
|
<Class name="~.*R\$.*"/>
|
||||||
|
</Match>
|
||||||
|
<Match>
|
||||||
|
<Class name="~.*Manifest\$.*"/>
|
||||||
|
</Match>
|
||||||
|
|
||||||
|
</FindBugsFilter>
|
||||||
@@ -25,7 +25,7 @@ import android.widget.Button;
|
|||||||
|
|
||||||
public class StartActivity extends Activity
|
public class StartActivity extends Activity
|
||||||
{
|
{
|
||||||
final String TAG = "BabyMonitor";
|
static final String TAG = "BabyMonitor";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState)
|
protected void onCreate(Bundle savedInstanceState)
|
||||||
|
|||||||
Reference in New Issue
Block a user