eskatos Update wrappers to Gradle 4.9
Signed-off-by: Paul Merlin <paul@gradle.com>
Latest commit 7c4059c Jul 16, 2018
Permalink
..
Failed to load latest commit information.
ant Update wrappers to Gradle 4.9 Jul 16, 2018
build-cache Update wrappers to Gradle 4.9 Jul 16, 2018
build-scan Update wrappers to Gradle 4.9 Jul 16, 2018
buildSrc-plugin Update wrappers to Gradle 4.9 Jul 16, 2018
code-quality Update wrappers to Gradle 4.9 Jul 16, 2018
composite-builds Update wrappers to Gradle 4.9 Jul 16, 2018
copy Update wrappers to Gradle 4.9 Jul 16, 2018
domain-objects Update wrappers to Gradle 4.9 Jul 16, 2018
extra-properties Update wrappers to Gradle 4.9 Jul 16, 2018
gradle-plugin Update wrappers to Gradle 4.9 Jul 16, 2018
groovy-interop Update wrappers to Gradle 4.9 Jul 16, 2018
hello-android Update wrappers to Gradle 4.9 Jul 16, 2018
hello-coroutines Update wrappers to Gradle 4.9 Jul 16, 2018
hello-js Update wrappers to Gradle 4.9 Jul 16, 2018
hello-kapt Update wrappers to Gradle 4.9 Jul 16, 2018
hello-kotlin Update wrappers to Gradle 4.9 Jul 16, 2018
hello-world Update wrappers to Gradle 4.9 Jul 16, 2018
kotlin-friendly-groovy-plugin Update wrappers to Gradle 4.9 Jul 16, 2018
maven-plugin Update wrappers to Gradle 4.9 Jul 16, 2018
maven-publish Update wrappers to Gradle 4.9 Jul 16, 2018
model-rules Update wrappers to Gradle 4.9 Jul 16, 2018
modularity Update wrappers to Gradle 4.9 Jul 16, 2018
multi-kotlin-project-config-injection Update wrappers to Gradle 4.9 Jul 16, 2018
multi-kotlin-project-with-buildSrc Update wrappers to Gradle 4.9 Jul 16, 2018
multi-kotlin-project Update wrappers to Gradle 4.9 Jul 16, 2018
multi-project-with-buildSrc Update wrappers to Gradle 4.9 Jul 16, 2018
precompiled-script-plugin Update wrappers to Gradle 4.9 Jul 16, 2018
project-properties Update wrappers to Gradle 4.9 Jul 16, 2018
project-with-buildSrc Update wrappers to Gradle 4.9 Jul 16, 2018
provider-properties Update wrappers to Gradle 4.9 Jul 16, 2018
source-control Update wrappers to Gradle 4.9 Jul 16, 2018
task-dependencies Update wrappers to Gradle 4.9 Jul 16, 2018
testkit Update wrappers to Gradle 4.9 Jul 16, 2018
.gitignore Don't gitignore every directory named `build` but only build dirs May 18, 2017
README.md Add TestKit sample May 14, 2018

README.md

Sample Kotlin-based Gradle build scripts

See instructions below in order to set up your dev environment to benefit from the available IDE support.

The Gradle projects in this directory demonstrate typical use cases with and features available in the Gradle Kotlin DSL. They include:

Set up dev environment

Note: Currently, these instructions only address working with IntelliJ IDEA. In the future, they'll be expanded to include working with Eclipse.

Install IntelliJ IDEA

Version 2017.3.3 or better is required, and can be downloaded from https://www.jetbrains.com/idea.

Install IDEA Kotlin Plugin

Note: the specific version of the Kotlin plugin matters.

All the samples should work against the latest Kotlin plugin, 1.2.20 at the time of this writing, from the Stable channel accessible via the Tools > Kotlin > Configure Kotlin Plugin Updates action.

Set up a sample project

Clone the Gradle Kotlin DSL repository

If you have not already done so, clone the kotlin-dsl repository:

git clone git@github.com:gradle/kotlin-dsl.git # ($REPO_ROOT)

Note: The remainder of these instructions focus on the hello-world sample project, but will work equally well for any of the other samples.

Import the sample project into IDEA

In IDEA, go to File->Open... and navigate to $REPO_ROOT/samples/hello-world.

When prompted, choose "Use default Gradle wrapper".

The project should import without errors.

Explore available IDE support

You're now ready to explore what's possible with the Gradle Kotlin DSL in IDEA. Generally speaking, things should "just work", as they would in the context of any other Java or Kotlin code you would write in IDEA.

Start by opening build.gradle.kts.

Note: The very first time you do, IDEA might fail to recognise the classpath of the script, if that happens, simply restart IDEA. This is a known issue that will be fixed soon.

Continue with any or all of the following:

Syntax highlighting

You should notice that normal Kotlin syntax highlighting works throughout the file.

Quick documentation

Try clicking on any type or function in the script, and hit F1 (or possibly CTRL-J, dependending on which IDEA key mapping you use). Notice how you're presented with a quick documentation pop-up complete with that element's Javadoc / KDoc.

Navigation to source

Again, try clicking on any type or function in the script and hit CMD-B. Notice that you're taken directly to the source for that element.

Auto-completion / content assist

Try using CTRL-SPACE at various sites in the script, and notice that you're provided with complete content assist regarding what's available at that site.

Refactoring

Most any refactoring action that is possible in a Kotlin file should also work in a Kotlin-based Gradle build script. Explore!

See also

See the latest release notes for further details on current features and limitations.