Skip to content

Commit b953e5a

Browse files
add SetupMaven
1 parent c907e1c commit b953e5a

File tree

6 files changed

+135
-7
lines changed

6 files changed

+135
-7
lines changed

docs/StardustDocs/d.tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<toc-element topic="Setup.md" accepts-web-file-names="gettingstarted">
1919
<toc-element topic="SetupKotlinNotebook.md" accepts-web-file-names="gettingstartedkotlinnotebook.html"/>
2020
<toc-element topic="SetupGradle.md" accepts-web-file-names="gettingstartedgradle.html"/>
21+
<toc-element topic="SetupMaven.md"/>
2122
<toc-element topic="SetupJupyter.md" accepts-web-file-names="gettingstartedjupyternotebook.html"/>
2223
<toc-element topic="SetupDatalore.md" accepts-web-file-names="gettingstarteddatalore.html"/>
2324
<toc-element topic="SetupAndroid.md"/>

docs/StardustDocs/topics/Compiler-Plugin.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,15 @@ Setup library dependency:
5555
implementation("org.jetbrains.kotlinx:dataframe:%dataFrameVersion%")
5656
```
5757

58-
Add this line to `gradle.properties`:
58+
Due to the [known issue](https://youtrack.jetbrains.com/issue/KT-66735), incremental compilation must be disabled for now.
59+
Add the following line to your `gradle.properties` file:
60+
5961
```properties
6062
kotlin.incremental=false
6163
```
6264

6365
Sync the project.
6466

65-
Disabling incremental compilation will no longer be necessary
66-
when https://youtrack.jetbrains.com/issue/KT-66735 is resolved.
67-
6867
</tab>
6968

7069
<tab title="Maven">

docs/StardustDocs/topics/setup/SetupGradle.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,18 @@ plugins {
121121
</tab>
122122
</tabs>
123123

124-
Due to [this issue](https://youtrack.jetbrains.com/issue/KT-66735), incremental compilation must be disabled for now.
124+
Due to the [known issue](https://youtrack.jetbrains.com/issue/KT-66735), incremental compilation must be disabled for now.
125125
Add the following line to your `gradle.properties` file:
126126

127127
```properties
128128
kotlin.incremental=false
129129
```
130130

131+
## Project Example
132+
133+
See [the Gradle example project with the Kotlin DataFrame Compiler Plugin enabled on GitHub](https://github.com/Kotlin/dataframe/tree/master/examples/kotlin-dataframe-plugin-gradle-example).
134+
135+
131136
## Next Steps
132137

133138
* Once you’ve set up Kotlin DataFrame in your Gradle project, continue with the [](quickstart.md)
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Setup Kotlin DataFrame in Maven
2+
3+
<web-summary>
4+
Set up Kotlin DataFrame in your Maven project, configure dependencies, and start using the API with full IDE support.
5+
</web-summary>
6+
7+
<card-summary>
8+
Learn how to add Kotlin DataFrame to your Maven project.
9+
</card-summary>
10+
11+
<link-summary>
12+
Guide for integrating Kotlin DataFrame in a Maven project, with setup instructions and example code.
13+
</link-summary>
14+
15+
Kotlin DataFrame can be added as a usual Maven dependency to your Kotlin project.
16+
17+
## Create a Kotlin project
18+
19+
1. In IntelliJ IDEA, select **File** | **New** | **Project**.
20+
2. In the panel on the left, select **New Project**.
21+
3. Name the new project and change its location, if necessary.
22+
23+
> Select the **Create Git repository** checkbox to place the new project under version control.
24+
> You can enable this later at any time.
25+
> {type="tip"}
26+
27+
4. From the **Language** list, select **Kotlin**.
28+
5. Select the **Maven** build system.
29+
6. From the **JDK list**, select the [JDK](https://www.oracle.com/java/technologies/downloads/)
30+
that you want to use in your project. The minimum supported version is JDK 8.
31+
* If the JDK is installed on your computer, but not defined in the IDE, select **Add JDK**
32+
and specify the path to the JDK home directory.
33+
* If you don't have the necessary JDK on your computer, select **Download JDK**.
34+
7. Select the **Add sample code** checkbox to create a file with a sample `"Hello World!"` application.
35+
8. Click **Create**.
36+
37+
You have successfully created a project with Maven.
38+
39+
## Add Kotlin DataFrame Maven dependency
40+
41+
In your Maven build file (`pom.xml`), add the Kotlin DataFrame library as a dependency:
42+
43+
```xml
44+
<dependency>
45+
<groupId>org.jetbrains.kotlinx</groupId>
46+
<artifactId>dataframe</artifactId>
47+
<version>%dataFrameVersion%</version>
48+
</dependency>
49+
```
50+
51+
This will add [general Kotlin DataFrame dependency](Modules.md#dataframe-general),
52+
i.e., [core API and implementation](Modules.md#dataframe-core) as well as all
53+
[IO modules](Modules.md#io-modules) (excluding [experimental ones](Modules.md#experimental-modules)).
54+
You can add only the [core API module](Modules.md#dataframe-core)
55+
and the specific [modules](Modules.md) you need.
56+
57+
58+
## Hello World
59+
60+
Let’s create your first [`DataFrame`](DataFrame.md) — a simple "Hello, World!" style example:
61+
62+
```kotlin
63+
import org.jetbrains.kotlinx.dataframe.api.dataFrameOf
64+
import org.jetbrains.kotlinx.dataframe.api.print
65+
66+
fun main() {
67+
val df = dataFrameOf(
68+
"name" to listOf("Alice", "Bob"),
69+
"age" to listOf(25, 30)
70+
)
71+
72+
df.print()
73+
}
74+
```
75+
76+
## Kotlin DataFrame Compiler Plugin
77+
78+
[Kotlin DataFrame Compiler Plugin](Compiler-Plugin.md) enables automatic generation of
79+
[extension properties](extensionPropertiesApi.md) and updates [data schemas](schemas.md)
80+
on-the-fly in Maven projects, making development with Kotlin DataFrame faster,
81+
more convenient, and fully type- and name-safe.
82+
83+
> Requires Kotlin 2.2.20-Beta1 or higher.
84+
> { style = "note" }
85+
86+
To enable the plugin in your Maven project, add it to the `plugins` section:
87+
88+
```xml
89+
<plugin>
90+
<artifactId>kotlin-maven-plugin</artifactId>
91+
<groupId>org.jetbrains.kotlin</groupId>
92+
<version>%compilerPluginKotlinVersion%</version>
93+
94+
<configuration>
95+
<compilerPlugins>
96+
<plugin>kotlin-dataframe</plugin>
97+
</compilerPlugins>
98+
</configuration>
99+
100+
<dependencies>
101+
<dependency>
102+
<groupId>org.jetbrains.kotlin</groupId>
103+
<artifactId>kotlin-maven-dataframe</artifactId>
104+
<version>%compilerPluginKotlinVersion%</version>
105+
</dependency>
106+
</dependencies>
107+
</plugin>
108+
```
109+
110+
## Project Example
111+
112+
See [the Maven example project with the Kotlin DataFrame Compiler Plugin enabled on GitHub](https://github.com/Kotlin/dataframe/tree/master/examples/kotlin-dataframe-plugin-maven-example).
113+
114+
115+
## Next Steps
116+
117+
* Once you’ve set up Kotlin DataFrame in your Maven project, continue with the [](quickstart.md)
118+
to learn the basics of working with Kotlin DataFrame.
119+
* Explore [detailed guides and real-world examples](Guides-And-Examples.md)
120+
to see how Kotlin DataFrame helps with different data tasks.
121+
* Check out various
122+
[IDEA examples using Kotlin DataFrame on GitHub](https://github.com/Kotlin/dataframe/tree/master/examples/idea-examples).
123+
* Learn more about the [compiler plugin](Compiler-Plugin.md).

docs/StardustDocs/v.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
33
<vars>
44
<var name="dataFrameVersion" value="1.0.0-Beta4" type="string"/>
5-
<var name="compilerPluginKotlinVersion" value="2.3.0-RC" type="string"/>
5+
<var name="compilerPluginKotlinVersion" value="2.3.0-RC3" type="string"/>
66
</vars>

examples/kotlin-dataframe-plugin-maven-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<dependency>
9595
<groupId>org.jetbrains.kotlin</groupId>
9696
<artifactId>kotlin-stdlib</artifactId>
97-
<version>2.3.0-RC</version>
97+
<version>2.3.0-RC3</version>
9898
</dependency>
9999
<!-- DataFrame and Kandy dependencies -->
100100
<dependency>

0 commit comments

Comments
 (0)