39 lines
977 B
Groovy
39 lines
977 B
Groovy
repositories {
|
|
maven {
|
|
url "https://dl.bintray.com/touchin/touchin-tools"
|
|
metadataSources {
|
|
artifact()
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
apigeneratorKotlinServer
|
|
}
|
|
|
|
dependencies {
|
|
apigeneratorKotlinServer 'ru.touchin:api-generator:1.4.0-beta1'
|
|
}
|
|
|
|
task generateApiModelsKotlinServer doLast {
|
|
javaexec {
|
|
main = "-jar"
|
|
workingDir = file("${rootDir}")
|
|
args = [
|
|
configurations.apigeneratorKotlinServer.asPath,
|
|
"generate-client-code",
|
|
"--output-language",
|
|
"KOTLIN_SERVER",
|
|
"--specification-path",
|
|
rootProject.extensions.findByName("pathToApiSchemes"),
|
|
"--output-path",
|
|
"${rootDir}/src/main/kotlin",
|
|
"--package-name",
|
|
rootProject.extensions.findByName("apiPackageName"),
|
|
"--recreate_output_dirs",
|
|
false
|
|
]
|
|
}
|
|
}
|
|
|