I'm trying to use Gradle Script Kotlin to configure the build on my App Engine project but cannot figure out how to set the cloudSdkHome property (or any configuration of the plugin at all!)
In a groovy gradle script this is done something like this:
appengine {
tools {
cloudSdkHome = "/path/to/cloud/sdk"
}
}
build.gradle.kts
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("com.google.cloud.tools:appengine-gradle-plugin:+")
classpath("net.ltgt.gradle:gradle-apt-plugin:0.10")
classpath(kotlinModule("gradle-plugin"))
}
}
repositories {
jcenter()
mavenCentral()
}
plugins {
java
war
}
apply {
plugin("com.google.cloud.tools.appengine")
plugin("net.ltgt.apt")
}
java {
sourceSets {
"main" {
java {
srcDir(files("src/main"))
srcDir(files("src/share/util”))
}
}
}
}
dependencies {
compile("com.google.appengine:appengine:+")
compile("com.google.appengine:appengine-api-1.0-sdk:+")
<more dependencies>
}
configure<AppEngineExtension> {
// What to do here?
}
// configure<ToolsExtension> {
// // Runtime exception ToolsExtension not registered.
// setCloudSdkHome("/path/to/cloudsdk")
// }
I can see that the AppEngineStandardPlugin does register the "tools" extension in a different way than the main extension "appengine" AppEngineStandardPlugin