app/build.gradle
buildscript {
}
plugins {
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
dataBinding {
enabled = true
}
defaultConfig {
applicationId "com.vibbix.ballroom"
minSdkVersion 18
targetSdkVersion 25
versionCode 3
versionName "2.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
debug {
testCoverageEnabled true
pseudoLocalesEnabled true
}
}
testOptions {
testOptions {
unitTests.all {
jacoco {
includeNoLocationClasses = true
}
}
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileOptions {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !travisBuild
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'org.parceler:parceler-api:1.1.6'
annotationProcessor 'org.parceler:parceler:1.1.6'
compile 'com.andkulikov:transitionseverywhere:1.7.0'
compile 'com.android.support:appcompat-v7:25.2.0'
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.1.4'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support:support-annotations:25.2.0'
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
// Optional -- Hamcrest library
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
// Optional -- UI testing with Espresso
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
// Optional -- UI testing with UI Automator
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
}
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
reports {
xml.enabled = true
xml.destination "${buildDir}/reports/jacoco/report.xml"
html.enabled = true
csv.enabled = true
}
def fileFilter = [
'**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
'**/*Test*.*',
'android/**/*.*',
'**/*$ViewInjector*.*',
'**/*$ViewBinder*.*',
'**/*MembersInjector*.*',
'**/*$Lambda$*.class',
'**/*Factory*.class',
'**/*$Builder*',
'**/*$Parcelable*.*',
'**/*DaggerApplicationComponent*.class',
'**/api']
def debugTree = fileTree(dir: "${buildDir}/intermediates/classes/debug", excludes: fileFilter)
def mainSrc = "${project.projectDir}/src/main/java"
sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = fileTree(dir: "$buildDir", includes: [
"jacoco/testDebugUnitTest.exec", "outputs/code-coverage/connected/*coverage.ec"
])
}