|
|
@ -5,13 +5,13 @@ apply plugin: 'kotlin-kapt'
|
|
|
|
apply plugin: 'jacoco'
|
|
|
|
apply plugin: 'jacoco'
|
|
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
android {
|
|
|
|
compileSdkVersion 25
|
|
|
|
compileSdkVersion COMPILE_SDK_VERSION as Integer
|
|
|
|
buildToolsVersion "25.0.2"
|
|
|
|
buildToolsVersion BUILD_TOOLS_VERSION
|
|
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.isoron.uhabits"
|
|
|
|
applicationId "org.isoron.uhabits"
|
|
|
|
minSdkVersion 19
|
|
|
|
minSdkVersion MIN_SDK_VERSION as Integer
|
|
|
|
targetSdkVersion 25
|
|
|
|
targetSdkVersion TARGET_SDK_VERSION as Integer
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
|
|
|
|
|
|
|
|
|
javaCompileOptions {
|
|
|
|
javaCompileOptions {
|
|
|
@ -26,6 +26,7 @@ android {
|
|
|
|
minifyEnabled true
|
|
|
|
minifyEnabled true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
debug {
|
|
|
|
debug {
|
|
|
|
testCoverageEnabled true
|
|
|
|
testCoverageEnabled true
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -47,6 +48,7 @@ android {
|
|
|
|
outputs.upToDateWhen { false }
|
|
|
|
outputs.upToDateWhen { false }
|
|
|
|
showStandardStreams = true
|
|
|
|
showStandardStreams = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
jacoco {
|
|
|
|
jacoco {
|
|
|
|
includeNoLocationClasses = true
|
|
|
|
includeNoLocationClasses = true
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -63,37 +65,37 @@ dependencies {
|
|
|
|
implementation project(":android-base")
|
|
|
|
implementation project(":android-base")
|
|
|
|
implementation project(":android-pickers")
|
|
|
|
implementation project(":android-pickers")
|
|
|
|
|
|
|
|
|
|
|
|
implementation 'com.android.support:appcompat-v7:25.3.1'
|
|
|
|
implementation "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
|
|
|
|
implementation 'com.android.support:design:25.3.1'
|
|
|
|
implementation "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
|
|
|
|
implementation 'com.android.support:preference-v14:25.3.1'
|
|
|
|
implementation "com.android.support:preference-v14:$SUPPORT_LIBRARY_VERSION"
|
|
|
|
implementation 'com.android.support:support-v4:25.3.1'
|
|
|
|
implementation "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
|
|
|
|
implementation 'com.getpebble:pebblekit:3.0.0'
|
|
|
|
implementation "com.getpebble:pebblekit:3.0.0"
|
|
|
|
implementation 'com.github.paolorotolo:appintro:3.4.0'
|
|
|
|
implementation "com.github.paolorotolo:appintro:3.4.0"
|
|
|
|
implementation 'com.google.dagger:dagger:2.9'
|
|
|
|
implementation "com.google.dagger:dagger:$DAGGER_VERSION"
|
|
|
|
implementation 'com.jakewharton:butterknife:8.6.1-SNAPSHOT'
|
|
|
|
implementation "com.jakewharton:butterknife:8.6.1-SNAPSHOT"
|
|
|
|
implementation 'org.apmem.tools:layouts:1.10'
|
|
|
|
implementation "org.apmem.tools:layouts:1.10"
|
|
|
|
implementation 'com.google.code.gson:gson:2.7'
|
|
|
|
implementation "com.google.code.gson:gson:2.7"
|
|
|
|
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
|
|
|
implementation "com.google.code.findbugs:jsr305:3.0.2"
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$KOTLIN_VERSION"
|
|
|
|
|
|
|
|
|
|
|
|
compileOnly 'javax.annotation:jsr250-api:1.0'
|
|
|
|
compileOnly "javax.annotation:jsr250-api:1.0"
|
|
|
|
compileOnly 'com.google.auto.factory:auto-factory:1.0-beta3'
|
|
|
|
compileOnly "com.google.auto.factory:auto-factory:1.0-beta3"
|
|
|
|
kapt 'com.google.dagger:dagger-compiler:2.9'
|
|
|
|
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
|
|
|
kapt 'com.jakewharton:butterknife-compiler:8.6.1-SNAPSHOT'
|
|
|
|
kapt "com.jakewharton:butterknife-compiler:8.6.1-SNAPSHOT"
|
|
|
|
kapt 'com.google.auto.factory:auto-factory:1.0-beta3'
|
|
|
|
kapt "com.google.auto.factory:auto-factory:1.0-beta3"
|
|
|
|
|
|
|
|
|
|
|
|
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:2.2.2'
|
|
|
|
androidTestImplementation "com.android.support.test.espresso:espresso-contrib:2.2.2"
|
|
|
|
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
|
|
|
|
androidTestImplementation "com.android.support.test.espresso:espresso-core:2.2.2"
|
|
|
|
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
|
|
|
|
androidTestImplementation "com.android.support.test.uiautomator:uiautomator-v18:2.1.1"
|
|
|
|
androidTestImplementation 'com.google.dagger:dagger:2.9'
|
|
|
|
androidTestImplementation "com.google.dagger:dagger:$DAGGER_VERSION"
|
|
|
|
androidTestImplementation 'com.linkedin.testbutler:test-butler-library:1.3.1'
|
|
|
|
androidTestImplementation "com.linkedin.testbutler:test-butler-library:1.3.1"
|
|
|
|
androidTestCompileOnly 'com.google.auto.factory:auto-factory:1.0-beta3'
|
|
|
|
androidTestCompileOnly "com.google.auto.factory:auto-factory:1.0-beta3"
|
|
|
|
androidTestImplementation 'com.android.support:support-annotations:25.3.1'
|
|
|
|
androidTestImplementation "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION"
|
|
|
|
androidTestImplementation 'com.android.support.test:rules:0.5'
|
|
|
|
androidTestImplementation "com.android.support.test:rules:0.5"
|
|
|
|
androidTestImplementation 'com.android.support.test:runner:0.5'
|
|
|
|
androidTestImplementation "com.android.support.test:runner:0.5"
|
|
|
|
androidTestImplementation 'com.google.guava:guava:20.0'
|
|
|
|
androidTestImplementation "com.google.guava:guava:20.0"
|
|
|
|
androidTestImplementation project(":uhabits-core")
|
|
|
|
androidTestImplementation project(":uhabits-core")
|
|
|
|
kaptAndroidTest 'com.google.dagger:dagger-compiler:2.9'
|
|
|
|
kaptAndroidTest "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
|
|
|
|
|
|
|
|
|
|
|
// mockito-android 2+ includes net.bytebuddy, which causes tests to fail.
|
|
|
|
// mockito-android 2+ includes net.bytebuddy, which causes tests to fail.
|
|
|
|
// Excluding the package net.bytebuddy on AndroidManifest.xml breaks some
|
|
|
|
// Excluding the package net.bytebuddy on AndroidManifest.xml breaks some
|
|
|
@ -101,10 +103,10 @@ dependencies {
|
|
|
|
androidTestImplementation "org.mockito:mockito-core:1+"
|
|
|
|
androidTestImplementation "org.mockito:mockito-core:1+"
|
|
|
|
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:+"
|
|
|
|
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:+"
|
|
|
|
|
|
|
|
|
|
|
|
testImplementation 'com.google.dagger:dagger:2.9'
|
|
|
|
testImplementation "com.google.dagger:dagger:$DAGGER_VERSION"
|
|
|
|
testImplementation "org.mockito:mockito-core:2.8.9"
|
|
|
|
testImplementation "org.mockito:mockito-core:2.8.9"
|
|
|
|
testImplementation "org.mockito:mockito-inline:2.8.9"
|
|
|
|
testImplementation "org.mockito:mockito-inline:2.8.9"
|
|
|
|
testImplementation 'junit:junit:4+'
|
|
|
|
testImplementation "junit:junit:4+"
|
|
|
|
|
|
|
|
|
|
|
|
implementation('com.opencsv:opencsv:3.9') {
|
|
|
|
implementation('com.opencsv:opencsv:3.9') {
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
|
|
@ -123,14 +125,6 @@ kapt {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task coverageReport(type: JacocoReport) {
|
|
|
|
task coverageReport(type: JacocoReport) {
|
|
|
|
|
|
|
|
|
|
|
|
jacocoClasspath = configurations['androidJacocoAnt']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reports {
|
|
|
|
|
|
|
|
html.enabled = true
|
|
|
|
|
|
|
|
xml.enabled = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def excludes = [
|
|
|
|
def excludes = [
|
|
|
|
'**/R.class',
|
|
|
|
'**/R.class',
|
|
|
|
'**/R$*.class',
|
|
|
|
'**/R$*.class',
|
|
|
@ -146,14 +140,18 @@ task coverageReport(type: JacocoReport) {
|
|
|
|
'**/*Dagger*',
|
|
|
|
'**/*Dagger*',
|
|
|
|
'**/*_Factory*'
|
|
|
|
'**/*_Factory*'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def androidSrc = "${project.projectDir}/src/main/java"
|
|
|
|
def androidSrc = "${project.projectDir}/src/main/java"
|
|
|
|
def androidClasses = "${buildDir}/intermediates/classes/debug"
|
|
|
|
def androidClasses = "${buildDir}/intermediates/classes/debug"
|
|
|
|
def jvmExecData = "${buildDir}/jacoco/testDebugUnitTest.exec"
|
|
|
|
def jvmExecData = "${buildDir}/jacoco/testDebugUnitTest.exec"
|
|
|
|
def connectedExecData = "${buildDir}/outputs/code-coverage/connected/coverage.ec"
|
|
|
|
def connectedExecData = "${buildDir}/outputs/code-coverage/connected/coverage.ec"
|
|
|
|
|
|
|
|
|
|
|
|
sourceDirectories = files(androidSrc)
|
|
|
|
sourceDirectories = files(androidSrc)
|
|
|
|
classDirectories = files(fileTree(dir: androidClasses, excludes: excludes))
|
|
|
|
classDirectories = files(fileTree(dir: androidClasses, excludes: excludes))
|
|
|
|
executionData = files(jvmExecData, connectedExecData)
|
|
|
|
executionData = files(jvmExecData, connectedExecData)
|
|
|
|
|
|
|
|
jacocoClasspath = configurations['androidJacocoAnt']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reports {
|
|
|
|
|
|
|
|
html.enabled = true
|
|
|
|
|
|
|
|
xml.enabled = true
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|