diff --git a/plugin/src/main/java/org/openrewrite/gradle/isolated/DefaultProjectParser.java b/plugin/src/main/java/org/openrewrite/gradle/isolated/DefaultProjectParser.java index 910d9f56c..0af2896b9 100644 --- a/plugin/src/main/java/org/openrewrite/gradle/isolated/DefaultProjectParser.java +++ b/plugin/src/main/java/org/openrewrite/gradle/isolated/DefaultProjectParser.java @@ -1396,7 +1396,7 @@ protected ResultsContainer listResults(ExecutionContext ctx) { if (extension.isExportDatatables()) { String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss-SSS")); - Path datatableDirectoryPath = Paths.get(baseDir.toString(), "build", "rewrite", "datatables", timestamp); + Path datatableDirectoryPath = project.getLayout().getBuildDirectory().dir("reports/rewrite/datatables/" + timestamp).get().getAsFile().toPath(); logger.info(String.format("Printing available datatables to: %s", datatableDirectoryPath)); recipeRun.exportDatatablesToCsv(datatableDirectoryPath, ctx); }