Skip to content

Commit

Permalink
Support Android Gradle Plugin 3.2.x (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
vRallev authored and vanniktech committed Jun 30, 2018
1 parent c7e1817 commit b7a7472
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ class GenerationPlugin implements Plugin<Project> {
}
}

def classPaths = ["**/intermediates/classes/${sourcePath}/**"]
def classPaths = [
"**/intermediates/classes/${sourcePath}/**",
"**/intermediates/javac/${sourceName}/*/classes/**" // Android Gradle Plugin 3.2.x support.
]

if (isKotlinAndroid(subProject)) {
classPaths << "**/tmp/kotlin-classes/${sourcePath}/**"
if (productFlavorName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public class GenerationTest {
assert reports.html.destination.toString() == project.buildDir.absolutePath + "/reports/jacoco/${flavor}${buildType.capitalize()}"

assert classDirectories.dir == project.file("build/")
assert contentEquals(classDirectories.includes, ["**/intermediates/classes/${flavor}/${buildType}/**".toString()])
assert contentEquals(classDirectories.includes, ["**/intermediates/classes/${flavor}/${buildType}/**".toString(), "**/intermediates/javac/${flavor}${buildType.capitalize()}/*/classes/**".toString()])

assert taskDependsOn(task, "test${flavor.capitalize()}${buildType.capitalize()}UnitTest")
assert taskDependsOn(project.tasks.findByName('check'), "jacocoTestReport${flavor.capitalize()}${buildType.capitalize()}")
Expand Down Expand Up @@ -266,7 +266,7 @@ public class GenerationTest {
assert reports.html.destination.toString() == project.buildDir.absolutePath + '/reports/jacoco/debug'

assert classDirectories.dir == project.file("build/")
assert contentEquals(classDirectories.includes, ['**/intermediates/classes/debug/**'])
assert contentEquals(classDirectories.includes, ['**/intermediates/classes/debug/**', '**/intermediates/javac/debug/*/classes/**'])

assert taskDependsOn(debugTask, 'testDebugUnitTest')
assert taskDependsOn(project.tasks.findByName('check'), 'jacocoTestReportDebug')
Expand Down Expand Up @@ -302,7 +302,7 @@ public class GenerationTest {
assert reports.html.destination.toString() == project.buildDir.absolutePath + '/reports/jacoco/release'

assert classDirectories.dir == project.file("build/")
assert contentEquals(classDirectories.includes, ['**/intermediates/classes/release/**'])
assert contentEquals(classDirectories.includes, ['**/intermediates/classes/release/**', '**/intermediates/javac/release/*/classes/**'])

assert taskDependsOn(releaseTask, 'testReleaseUnitTest')
assert taskDependsOn(project.tasks.findByName('check'), 'jacocoTestReportRelease')
Expand Down

0 comments on commit b7a7472

Please sign in to comment.