Originally created by @bmarty on GitHub (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.
generates a Kotlin file with the package a.package.name.
Thanks!
Originally created by @bmarty on GitHub (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:
```sh
pkl eval -f kotlin --package-name a.package.name [a pkl file]
```
generates a Kotlin file with the package `a.package.name`.
Thanks!
@HT154 commented on GitHub (Feb 20, 2025):
Similar to https://github.com/apple/pkl/discussions/972, such a renderer could be implemented in-language and published as a package.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @bmarty on GitHub (Feb 20, 2025).
Gradle scripts can now be written in Kotlin, and even if it's possible to generate
propertiesfile that gradle can read, it would be nice ifpklwas able to generate Kotlin files.Possible solution:
Create a
KotlinRendererclass, which will implementsValueRendererand addkotlinin the list of supporte format for theevalcommand.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:
generates a Kotlin file with the package
a.package.name.Thanks!
@HT154 commented on GitHub (Feb 20, 2025):
Similar to https://github.com/apple/pkl/discussions/972, such a renderer could be implemented in-language and published as a package.