Skip to content

Conversation

@AndreiKingsley
Copy link
Collaborator

@AndreiKingsley AndreiKingsley commented Dec 16, 2025

Helps #722

@AndreiKingsley AndreiKingsley changed the title add maven project example Added Maven project example + Maven setup instructions Dec 16, 2025
@AndreiKingsley AndreiKingsley marked this pull request as ready for review December 16, 2025 15:15
on-the-fly in Maven projects, making development with Kotlin DataFrame faster,
more convenient, and fully type- and name-safe.

> Requires Kotlin 2.2.20-Beta1 or higher.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And IntelliJ 2025.3

@koperagen
Copy link
Collaborator

Thanks!

@koperagen
Copy link
Collaborator

Please see if there's a good place to mention link to Maven setup in our main README.md

@Jolanrensen Jolanrensen added the documentation Improvements or additions to documentation (not KDocs) label Dec 17, 2025
@AndreiKingsley AndreiKingsley merged commit c3a2a33 into master Dec 18, 2025
4 checks passed
@AndreiKingsley AndreiKingsley deleted the maven_example branch December 18, 2025 10:46
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>2.3.0-RC3</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might actually need an "example generator" at this point. This will be yet another version to manually update each time

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest a Gradle task that would read Kotlin version from our toml and update required files. We can run it on assemble, for instance, so it will be hard to miss. It also very fast and no additional infra required

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would we 'mark' where the versions need to be overwritten though? A Korro-like notation?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like %compilerPluginKotlinVersion% in writerside would also be nice, but that would require two versions of all files. A "template" version and a "compiled" version with the actual values

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, that's pretty easily done!

For each file we want to process, like pom.xml we create pom.xml.template with %compilerPluginKotlinVersion% notations, and then we have a top-level gradle task that replaces all files a.b that have an a.b.template counterpart with the right versions!

<artifactId>kotlin-stdlib</artifactId>
<version>2.3.0-RC3</version>
</dependency>
<!-- DataFrame and Kandy dependencies -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and some more...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left comments only for things not generated by project wizard!

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, since we don't build this example, we cannot track when it breaks. Maybe something like https://stackoverflow.com/questions/35795250/maven-project-as-dependency-in-gradle-project could work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

4. From the **Language** list, select **Kotlin**.
5. Select the **Maven** build system.
6. From the **JDK list**, select the [JDK](https://www.oracle.com/java/technologies/downloads/)
that you want to use in your project. The minimum supported version is JDK 8.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should recommend newer versions as well, as some parts of DF require 11

Add the following line to your `gradle.properties` file:

```properties
kotlin.incremental=false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koperagen this isn't a problem in Maven?

Copy link
Collaborator

@koperagen koperagen Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a problem there

<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
<vars>
<var name="dataFrameVersion" value="1.0.0-Beta4" type="string"/>
<var name="compilerPluginKotlinVersion" value="2.3.0-RC" type="string"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.3.0 is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation (not KDocs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants