Skip to content
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

Add support to generate Kotlin file #971

Open
bmarty opened this issue Feb 20, 2025 · 1 comment
Open

Add support to generate Kotlin file #971

bmarty opened this issue Feb 20, 2025 · 1 comment

Comments

@bmarty
Copy link

bmarty commented Feb 20, 2025

Gradle scripts can now be written in Kotlin, and even if it's possible to generate properties file that gradle can read, it would be nice if pkl was able to generate Kotlin files.

Possible solution:

Create a KotlinRenderer class, which will implements ValueRenderer and add kotlin in the list of supporte format for the eval command.

We would probably need an option to provide the package name, so that the generated file can be moved to to it's target directory and be compile out out the box.

I would be happy if command like:

pkl eval -f kotlin --package-name a.package.name [a pkl file]

generates a Kotlin file with the package a.package.name.

Thanks!

@HT154
Copy link
Contributor

HT154 commented Feb 20, 2025

Similar to #972, such a renderer could be implemented in-language and published as a package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants