The Google App Engine Gradle Plugin creates an ext...
# gradle
a
The Google App Engine Gradle Plugin creates an extension, AppEngineExtension, which then registers a "tools" extension. In groovy script this can be used like this: appengine { tools { cloudSdkHome = "blah" } } But in Kotlin script I cannot see how to do the same. Does anyone know how this can be configured?
s
appdev: https://github.com/gradle/gradle-script-kotlin/releases/tag/v0.8.0 - Read
Type-safe accessors for project extensions and conventions
section in that link
a
Thanks, I tried the "Ahead-of-time" approach using gskGenerateAccessors but it only partially worked. A buildScr folder was created (the buildSrc.jar is empty) and adding an appengine block will compile with "gradle build" (but IntelliJ could not recognize the "appengine" block). However, the "tools" child block is not allowed. I also tried the "Ad-hoc" approach and added this code to my build.gradle.kts: /** * Retrieves the [appengine][com.google.cloud.tools.gradle.appengine.core.AppEngineExtension] project extension. */ val Project.`appengine`: com.google.cloud.tools.gradle.appengine.core.AppEngineExtension get() = extensions.getByName("appengine") as com.google.cloud.tools.gradle.appengine.core.AppEngineExtension /** * Configures the [appengine][com.google.cloud.tools.gradle.appengine.core.AppEngineExtension] project extension. */ fun Project.`appengine`(configure: com.google.cloud.tools.gradle.appengine.core.AppEngineExtension.() -> Unit): Unit = extensions.configure("appengine", configure) This is similar but IntelliJ does recognize it also. I still cannot configure the "tools" extension that is not added directly to the project by the AppEnginePlugin