apple / apple/pkl

Using generated Kotlin from JPMS

Open
#187 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
11.5k
Forks
402
Avg merge
1d 15h
Merged PRs (30d)
20

Description

I've run into an issue with generated Pkl code in Kotlin. There does not appear to be an option in the Gradle plugin to set a package path; as a result, generated Kotlin ends up in the root package, which can't be exported from a Java module.

This could be fixed by adding an input argument to the code generator which sets a package path, to be included as `package ...` at the top of the generated code files.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Gradle plugin into the code generator, focusing on how generator input arguments reach generated Kotlin files. Done means the plugin accepts a package-path option and generated files include the requested package declaration so they can be exported from a Java module; verify with the relevant Gradle generation flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.