Using param in kotlin DSL

Hi ,

I have a plugin for teamcity for which if i refer to Teamcity template of the plugin it looks like below 

steps {
    step {
        id = "matlabTestRunner"
        type = "matlabTestRunner"
        param("logLoggingLevel", "Default")
        param("pdfTestArtifact", "results/testResult.pdf")
        param("sourceFolders", "code")
        param("filterTestFolderByName", "tests")
        param("logOutputDetail", "Default")
        param("MatlabPathKey", """C:\Program Files\MATLAB\R2023b""")
    }
    step {
        id = "matlabCommandRunner"
        type = "matlabCommandRunner"
        param("matlabCommand", "disp('Hello Kotlin')")
        param("MatlabPathKey", """C:\Program Files\MATLAB\R2023b""")
    }
}

 

My question is is there any way that i could use to pass the param names without using param() method 

eg: 

steps {
    step {
        id = "matlabTestRunner"
        type = "matlabTestRunner"
        logLoggingLevel = “Default”
        pdfTestArtifact =  “results/testResult.pdf”
        sourceFolders = “Code”
       
    }

}

 

Also can i create my own DSL step like 

steps {

   matlabTestRunner {

        logLoggingLevel = “Default”
        pdfTestArtifact =  “results/testResult.pdf”
        sourceFolders = “Code”

   }

}

 

Thanks In advance  

Nik

0

Please sign in to leave a comment.