Commit Graph

6 Commits

Author SHA1 Message Date
Vladimir Matveev
d7a1778199 Allow renaming Java/Kotlin classes/packages during code generation (#499)
Adds a `rename` field to the Java/Kotlin code generators that allows renaming packages and classes during codegen.

* Add `--rename` flag to CLIs
* Add `rename` property to Gradle API
2024-06-12 15:43:43 -07:00
Dan Chao
a5c13e325a Encode filepaths to be safe on Windows
This changes the file paths to use characters that are safe for Windows.

Channges the output of the following:
* Package cache directory
* Generated pkl-doc files
* Kotlin generated code

Unsafe characters are encoded as (<hex>).
For example, the colon character `:` is encoded as `(3a)`.

Additionally, this changes the cache directory prefix (package-1 to
package-2).

Follows the design of https://github.com/apple/pkl-evolution/pull/3
2024-05-13 14:06:28 -07:00
Daniel Chao
11f07d1ce8 Revert "Add setting for Kotlin package to codegen (#194)" (#271)
This reverts commit 7f404fff49.

The package is derived from the module name.
Having `module com.example.Foo` in Pkl
will create Kotlin `package com.example`.

Eventually, we may want to introduce a way to map
Pkl names to package names that provides finer
controls to the code generator.
2024-03-04 07:51:39 -08:00
Sam Gammon
7f404fff49 Add setting for Kotlin package to codegen (#194) 2024-02-23 11:54:05 +01:00
Sam Gammon
eb170017f6 Fix dropped implementSerializable flag
Fixes and closes apple/pkl#191

Signed-off-by: Sam Gammon <sam@elide.ventures>
2024-02-22 13:23:09 +00:00
Peter Niederwieser
ecad035dca Initial commit 2024-02-01 14:00:22 -08:00