<@U0QBCLV62> This is more of a lack of documentati...
# gradle
j
@bamboo This is more of a lack of documentation in gradle question, I'm trying to attach an artifact to a configuration like this:
Copy code
val specConfig = configurations.create("spec")

val swaggerOutputDir = "${project.buildDir}/swagger-spec"
val swaggerOutputFile = file("$swaggerOutputDir/swagger.yaml")

configure<CodegenConfigurator> {
    inputSpec = file("spec/swagger.yaml").absolutePath
    outputDir = swaggerOutputDir
    lang = "io.swagger.codegen.languages.SwaggerYamlGenerator"
    systemProperties.apply {
        // Makes it so that only the one yaml file is generated.
        put("apis", "")
    }
}

val swaggerYamlTask = tasks.getByName(SwaggerCodeGenPlugin.SWAGGER_TASK) as SwaggerCodeGenTask


val yamlArtifact = mapOf(
    "name" to "swagger-spec",
    "type" to "yaml",
    "extension" to "yaml",
    "file" to swaggerOutputFile,
    "builtBy" to swaggerYamlTask
)

artifacts.add(specConfig.name, yamlArtifact)