Skip to content

Commit c193d14

Browse files
author
Clayton Walker
committed
Move outputdir default to task
1 parent b1c9f0a commit c193d14

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiExtension.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ open class OpenApiExtension @Inject constructor(
2626

2727
open class CustomBootRunAction @Inject constructor(
2828
objects: ObjectFactory,
29-
layout: ProjectLayout,
3029
) {
3130
val systemProperties: MapProperty<String, Any> = objects.mapProperty(String::class.java, Any::class.java)
3231
val workingDir: DirectoryProperty = objects.directoryProperty()
@@ -35,7 +34,4 @@ open class CustomBootRunAction @Inject constructor(
3534
val classpath: ConfigurableFileCollection = objects.fileCollection()
3635
val jvmArgs: ListProperty<String> = objects.listProperty(String::class.java)
3736
val environment: MapProperty<String, Any> = objects.mapProperty(String::class.java, Any::class.java)
38-
init {
39-
workingDir.convention(layout.buildDirectory.dir("openapi"))
40-
}
4137
}

src/main/kotlin/org/springdoc/openapi/gradle/plugin/OpenApiGeneratorTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ open class OpenApiGeneratorTask : DefaultTask() {
4444

4545
// set a default value if not provided
4646
val defaultOutputDir = project.objects.directoryProperty()
47-
defaultOutputDir.convention(project.layout.buildDirectory)
47+
defaultOutputDir.convention(project.layout.buildDirectory.dir("openapi"))
4848

4949
apiDocsUrl.convention(extension.apiDocsUrl.getOrElse(DEFAULT_API_DOCS_URL))
5050
outputFileName.convention(extension.outputFileName.getOrElse(DEFAULT_OPEN_API_FILE_NAME))

0 commit comments

Comments
 (0)