Documentation page is still under construction, and some information may be inaccurate or missing…
IDE Integration

IDE Integration

Writing scripts in IntelliJ IDEA is pretty straightforward if you’re already familiar that IDE. Most editor features should work after a little setup, which will be described in this section.


Prerequisites


Repository

Easiest way to get started is to clone EchoNineLabs/KiteScripting repository.

git clone https://github.com/EchoNineLabs/KiteScripting.git

Once cloned, open it as a project in IntelliJ IDEA and load included Gradle configuration.


Configuration

There is one thing you need to enable before you can start writing scripts, and that is, adding .kite.kts as recognizable script definition.

  1. Go to Settings ➜ Languages & Frameworks ➜ Kotlin ➜ Kotlin Scripting and click Scan Classpath button at the bottom.
  2. Once 1 new definition(s) found in classpath text appears, click Apply then OK.
  3. Re-open the same settings page and make sure Kite Script definition (.kite.kts) is listed and enabled.

IntelliJ IDEA


Writing Scripts

Scripts can be put pretty much anywhere but it is recommended to keep them in src directory.

You can also organize them within sub-directories like explained in Getting Started guide but in mind importing additional files with @file:Import is currently not supported due to editor bug / limitations.