Setup Kotlin DataFrame in Gradle
Kotlin DataFrame can be added as a usual Gradle dependency to your Kotlin project (for now only Kotlin/JVM is supported).
Create a Kotlin project
In IntelliJ IDEA, select File | New | Project.
In the panel on the left, select New Project.
Name the new project and change its location, if necessary.
From the Language list, select Kotlin.
Select the Gradle build system.
From the JDK list, select the JDK that you want to use in your project. The minimum supported version is JDK 8.
If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.
If you don't have the necessary JDK on your computer, select Download JDK.
From the Gradle DSL list, select Kotlin or Groovy.
Select the Add sample code checkbox to create a file with a sample
"Hello World!"
application.Click Create.
You have successfully created a project with Gradle.
Add Kotlin DataFrame Gradle dependency
In your Gradle build file (build.gradle
or build.gradle.kts
), add the Kotlin DataFrame library as a dependency:
This will add general Kotlin DataFrame dependency, i.e., core API and implementation as well as all IO modules (excluding experimental ones).
For flexible dependencies configuration see Custom configuration.
Hello World
Let’s create your first DataFrame
in the notebook — a simple "Hello, World!" style example:
Kotlin DataFrame Compiler Plugin
Kotlin DataFrame Compiler Plugin enables automatic generation of extension properties and updates data schemas on-the-fly in Gradle projects, making development with Kotlin DataFrame faster, more convenient, and fully type- and name-safe.
To enable the plugin in your Gradle project, add it to the plugins
section:
Due to this issue, incremental compilation must be disabled for now. Add the following line to your gradle.properties
file:
Next Steps
Once you’ve set up Kotlin DataFrame in your Gradle project, continue with the Quickstart Guide to learn the basics of working with Kotlin DataFrame.
Explore detailed guides and real-world examples to see how Kotlin DataFrame helps with different data tasks.
Check out various IDEA examples using Kotlin DataFrame on GitHub.
Learn more about the compiler plugin.