Skip to content

Update Gradle plugin docs and fix hardcoded versions #1211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/StardustDocs/d.tree
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@
<toc-element topic="jupyterRendering.md"/>
</toc-element>
</toc-element>
<toc-element topic="gradleReference.md"/>
<toc-element topic="DataSchema-Data-Classes-Generation.md"/>
<toc-element topic="DataSchema-Data-Classes-Generation.md">
<toc-element topic="gradleReference.md"/>
</toc-element>
<toc-element topic="_shadow_resources.md" hidden="true"/>
</instance-profile>
6 changes: 3 additions & 3 deletions docs/StardustDocs/topics/Compiler-Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Next release: 2025.2
Setup plugins in `build.gradle.kts`:

```kotlin
kotlin("jvm") version "2.2.20-dev-3524"
kotlin("jvm") version "%compilerPluginKotlinVersion%"
```

```kotlin
kotlin("plugin.dataframe") version "2.2.20-dev-3524"
kotlin("plugin.dataframe") version "%compilerPluginKotlinVersion%"
```

Setup library dependency:
```kotlin
implementation("org.jetbrains.kotlinx:dataframe:1.0.0-Beta2")
implementation("org.jetbrains.kotlinx:dataframe:%dataFrameVersion%")
```

Plugin is released as a dev version, available in this maven repository:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ In your Gradle build file (`build.gradle.kts`), add the Kotlin DataFrame library
<tab title="Kotlin DSL">

```kotlin
plugins {
id("org.jetbrains.kotlinx.dataframe") version "%dataFrameVersion%"
}

dependencies {
implementation("org.jetbrains.kotlinx:dataframe:%dataFrameVersion%")
}
Expand All @@ -51,10 +47,6 @@ dependencies {
<tab title="Groovy DSL">

```groovy
plugins {
id "org.jetbrains.kotlinx.dataframe" version "%dataFrameVersion%"
}

dependencies {
implementation 'org.jetbrains.kotlinx:dataframe:%dataFrameVersion%'
}
Expand Down
23 changes: 23 additions & 0 deletions docs/StardustDocs/topics/gradleReference.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
[//]: # (title: Gradle plugin reference)

This page describes the Gradle plugin that generates `@DataSchema` from data samples.
```Kotlin
id("org.jetbrains.kotlinx.dataframe") version "%dataFrameVersion%"
```

It's different from the DataFrame compiler plugin:
```kotlin
kotlin("plugin.dataframe") version "%compilerPluginKotlinVersion%"
```

Gradle plugin by default adds a KSP annotation processor to your build:

```kotlin
ksp("org.jetbrains.kotlinx.dataframe:symbol-processor-all:%dataFrameVersion%")
```

You should disable it if you want to use the Gradle plugin together with the compiler plugin.

Add this to `gradle.properties`:
```properties
kotlin.dataframe.add.ksp=false
```

## Examples
In the best scenario, your schema could be defined as simple as this:
```kotlin
Expand Down
1 change: 1 addition & 0 deletions docs/StardustDocs/v.list
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
<vars>
<var name="dataFrameVersion" value="1.0.0-Beta2" type="string"/>
<var name="compilerPluginKotlinVersion" value="2.2.20-dev-3524" type="string"/>
</vars>