I want to setup JOOQ generator. The problem is to set multiple schemas in build.gradle
. I know how to do it with maven:
<schemata>
<schema>
<inputSchema>schema1</inputSchema>
</schema>
<schema>
<inputSchema>schema2</inputSchema>
</schema>
</schemata>
I know how to do it with build.gradle.kts:
schemata.addAll(
arrayOf(
SchemaMappingType()
.withInputSchema("data"),
SchemaMappingType()
.withInputSchema("dictionaries")
)
)
But I don't know syntax how to do it in gradle.build
on Groovy.
Please, help.
CodePudding user response:
I'm assuming you're using the gradle-jooq-plugin
, so
- here's an example on how to use the groovy DSL: https://github.com/etiennestuder/gradle-jooq-plugin/tree/master/example/use_groovy_dsl
- another one here: https://github.com/etiennestuder/gradle-jooq-plugin#gradle-groovy-dsl-4
Just write:
schemata {
schema {
inputSchema = 'data'
}
schema {
inputSchema = 'dictionaries'
}
}