diff --git a/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorExtension.kt b/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorExtension.kt index 76f8ece..d27f9d3 100644 --- a/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorExtension.kt +++ b/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorExtension.kt @@ -48,7 +48,7 @@ open class DependencyGraphGeneratorExtension { private val outputFileName = "dependency-graph${name.toHyphenCase().nonEmptyPrepend("-")}" internal val outputFileNameDot = "$outputFileName.dot" - /** Output file name of the genreated png which is stored on module level. */ + /** Output file name of the generated png which is stored under build/reports/dependency-graph/ */ val outputFileNamePng = "$outputFileName.png" companion object { diff --git a/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPlugin.kt b/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPlugin.kt index 6022e58..404fc10 100644 --- a/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPlugin.kt +++ b/src/main/kotlin/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPlugin.kt @@ -16,7 +16,7 @@ open class DependencyGraphGeneratorPlugin : Plugin { task.description = "Generates a dependency graph${it.name.nonEmptyPrepend(" for ")}" task.inputFile = project.buildFile task.outputFileDot = File(project.buildDir, "reports/dependency-graph/${it.outputFileNameDot}") - task.outputFileImage = File(project.projectDir, it.outputFileNamePng) + task.outputFileImage = File(project.buildDir, "reports/dependency-graph/${it.outputFileNamePng}") } } } diff --git a/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt b/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt index c65e164..d588b85 100644 --- a/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt +++ b/src/test/java/com/vanniktech/dependency/graph/generator/DependencyGraphGeneratorPluginTest.kt @@ -39,7 +39,7 @@ class DependencyGraphGeneratorPluginTest { assertThat(task.description).isEqualTo("Generates a dependency graph") assertThat(task.inputFile).hasToString(singleProject.buildFile.toString()) assertThat(task.outputFileDot).hasToString(File(singleProject.buildDir, "reports/dependency-graph/dependency-graph.dot").toString()) - assertThat(task.outputFileImage).hasToString(File(singleProject.projectDir, "dependency-graph.png").toString()) + assertThat(task.outputFileImage).hasToString(File(singleProject.buildDir, "reports/dependency-graph/dependency-graph.png").toString()) } @Test fun integrationTestGradle46() { @@ -89,7 +89,7 @@ class DependencyGraphGeneratorPluginTest { assertThat(stdErrorWriter).hasToString("") // We don't want to assert the content of the image, just that it exists. - assertThat(File(testProjectDir.root, "dependency-graph.png")).exists() + assertThat(File(testProjectDir.root, "build/reports/dependency-graph/dependency-graph.png")).exists() assertThat(File(testProjectDir.root, "build/reports/dependency-graph/dependency-graph.dot")).hasContent(""" |digraph G { @@ -180,7 +180,7 @@ class DependencyGraphGeneratorPluginTest { assertThat(stdErrorWriter).hasToString("") // We don't want to assert the content of the image, just that it exists. - assertThat(File(testProjectDir.root, "dependency-graph.png")).exists() + assertThat(File(testProjectDir.root, "build/reports/dependency-graph/dependency-graph.png")).exists() assertThat(File(testProjectDir.root, "build/reports/dependency-graph/dependency-graph.dot")).hasContent(""" |digraph G {