Skip to content

Commit d9d27be

Browse files
committed
fix spotbugs config
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
1 parent e2056dd commit d9d27be

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

app/build.gradle

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -390,19 +390,14 @@ tasks.withType(SpotBugsTask).configureEach { task ->
390390
String variantNameCap = task.name.replace("spotbugs", "")
391391
String variantName = variantNameCap.substring(0, 1).toLowerCase() + variantNameCap.substring(1)
392392

393-
dependsOn "compile${variantNameCap}Sources"
393+
def javaCompile = tasks.named("compile${variantNameCap}JavaWithJavac")
394+
dependsOn javaCompile
394395

395396
excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")
396-
classes = fileTree(layout.buildDirectory.get().asFile.toString()+"/intermediates/javac/${variantName}/compile${variantNameCap}JavaWithJavac/classes/")
397397

398398
classes = files(
399-
fileTree(layout.buildDirectory.get().asFile.toString()+"/intermediates/javac/${variantName}/compile${variantNameCap}JavaWithJavac/classes/"),
400-
fileTree(layout.buildDirectory.get().asFile.toString()+"/tmp/kotlin-classes/${variantName}")
401-
)
402-
403-
classpath = files(
404-
configurations.compileClasspath,
405-
configurations.runtimeClasspath
399+
javaCompile.get().destinationDirectory,
400+
fileTree("${layout.buildDirectory.get().asFile}/tmp/kotlin-classes/${variantName}")
406401
)
407402

408403
reports {

0 commit comments

Comments
 (0)