GoogleCloudPlatform / GoogleCloudPlatform/appengine-plugins

Improve Gradle Kotlin DSL compatibility

Open
#1,009 4 comments 11 reactions 0 assignees View on GitHub
enhancement p3
Dominant language
Java
Stars
47
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Hi!

I'm switching over in my Gradle build files from Groovy (build.groovy) to the Gradle Kotlin DSL (build.groovy.kts).

(using Gradle 5.4.1)

**It is not obvious** IMHO, that the Groovy version of the appengine configuration section (build.gradle)

```
appengine {
tools {
// configure the Cloud Sdk tooling
}
stage {
// configure staging for deployment
}
deploy {
// configure deployment
}
}
```

must be written (AFAIK) like this, using the Gradle Kotlin DSL (build.gradle.kts)

```
import com.google.cloud.tools.gradle.appengine.appyaml.AppEngineAppYamlExtension

// ...

the().apply {
tools {
// configure the Cloud Sdk tooling
}
stage {
// configure staging for deployment
}
deploy {
// configure deployment
}
}
```

Could you add some Gradle Kotlin DSL examples somewhere in the https://github.com/GoogleCloudPlatform/app-gradle-plugin/blob/master/USER_GUIDE.md ?

Thanks a lot and best regards,
Peti

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.