Skip to content

Commit 77da431

Browse files
authored
fix: Remove default value from injected constructor (#25)
* fix - Remove default value from injected constructor
1 parent 330847c commit 77da431

File tree

1 file changed

+4
-3
lines changed
  • kotlin-asyncapi-maven-plugin/src/main/kotlin/org/openfolder/kotlinasyncapi/mavenplugin

1 file changed

+4
-3
lines changed

kotlin-asyncapi-maven-plugin/src/main/kotlin/org/openfolder/kotlinasyncapi/mavenplugin/AsyncApiPlugin.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import javax.inject.Inject
1717
)
1818
internal class AsyncApiPlugin @Inject constructor(
1919
private val scriptRunner: AsyncApiScriptRunner,
20-
private val fileWriter: AsyncApiFileWriter,
21-
private val targetFileName: String = "asyncapi.json"
20+
private val fileWriter: AsyncApiFileWriter
2221
) : AbstractMojo() {
2322

2423
@Parameter(property = "sourcePath", defaultValue = "build.asyncapi.kts")
@@ -33,6 +32,8 @@ internal class AsyncApiPlugin @Inject constructor(
3332
@Parameter(property = "project", defaultValue = "\${project}", readonly = true)
3433
lateinit var project: MavenProject
3534

35+
private val targetFileName: String = "asyncapi.json"
36+
3637
override fun execute() {
3738
val asyncApi = AsyncApi.asyncApi {
3839
info {
@@ -54,7 +55,7 @@ internal class AsyncApiPlugin @Inject constructor(
5455
log.info("Writing $targetFileName to $fullTargetPath")
5556
fileWriter.write(
5657
asyncApi = asyncApi,
57-
file = File(fullTargetPath + targetFileName)
58+
file = File(fullTargetPath, targetFileName)
5859
)
5960

6061
if (packageResources) {

0 commit comments

Comments
 (0)