Skip to content

Commit

Permalink
Fix improper test task searching (#33)
Browse files Browse the repository at this point in the history
Fix improper test task searching

Fixes #16
  • Loading branch information
arturdm authored May 27, 2017
1 parent 12dc827 commit 1fc6ea7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ jdk: oraclejdk8
sudo: false
android:
components:
- android-23
- build-tools-23.0.0
- tools
- tools
- build-tools-25.0.3
- android-25
cache:
directories:
- "$HOME/.gradle/caches/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class JacocoAndroidPlugin implements Plugin<ProjectInternal> {
}

static def testTask(TaskCollection<Task> tasks, variant) {
tasks.withType(Test).find { task -> task.name.contains(variant.name.capitalize()) }
tasks.withType(Test).find { task -> task.name =~ /test${variant.name.capitalize()}UnitTest/ }
}

static def executionDataFile(Task testTask) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ public class AndroidProjectFactory {

static void configure(Project project) {
project.android {
compileSdkVersion 23
buildToolsVersion '23.0.0'
compileSdkVersion 25
buildToolsVersion '25.0.3'

defaultConfig {
versionCode 1
versionName '1.0'
minSdkVersion 23
targetSdkVersion 23
minSdkVersion 16
targetSdkVersion 25
}

buildTypes {
debug {}
debugProguard {}
release {}
}

productFlavors {
Expand Down

0 comments on commit 1fc6ea7

Please sign in to comment.