mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
[PR #1023] [MERGED] Publish executables for pkldoc, pkl-codegen-java, pkl-codegen-kotlin #858
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/1023
Author: @bioball
Created: 3/14/2025
Status: ✅ Merged
Merged: 3/19/2025
Merged by: @bioball
Base:
main← Head:publish-other-executables📝 Commits (5)
8c9a1b0Publish other executables943134dPass truffle features to all native executables838e200Polish0d7f44fRe-disable native builds in CI4051cf0Address review feedback📊 Changes
43 files changed (+1831 additions, -576 deletions)
View changed files
📝
.circleci/config.pkl(+25 -21)📝
.circleci/config.yml(+720 -29)📝
.circleci/jobs/BuildNativeJob.pkl(+14 -8)📝
.circleci/jobs/DeployJob.pkl(+4 -1)📝
.circleci/jobs/GradleJob.pkl(+3 -0)📝
DEVELOPMENT.adoc(+5 -6)📝
buildSrc/src/main/kotlin/BuildInfo.kt(+12 -0)➕
buildSrc/src/main/kotlin/ExecutableSpec.kt(+49 -0)➕
buildSrc/src/main/kotlin/NativeImageBuild.kt(+169 -0)➕
buildSrc/src/main/kotlin/pklJavaExecutable.gradle.kts(+132 -0)➖
buildSrc/src/main/kotlin/pklNativeBuild.gradle.kts(+0 -22)➕
buildSrc/src/main/kotlin/pklNativeExecutable.gradle.kts(+291 -0)➕
buildSrc/src/main/kotlin/pklNativeLifecycle.gradle.kts(+129 -0)📝
docs/modules/ROOT/partials/component-attributes.adoc(+2 -0)📝
docs/modules/java-binding/examples/JavaConfigExample.java(+1 -1)📝
docs/modules/java-binding/pages/codegen.adoc(+43 -7)📝
docs/modules/kotlin-binding/examples/KotlinConfigExample.kt(+1 -1)📝
docs/modules/kotlin-binding/pages/codegen.adoc(+42 -7)📝
docs/modules/kotlin-binding/pages/pkl-config-kotlin.adoc(+1 -1)📝
docs/modules/pkl-cli/pages/index.adoc(+0 -1)...and 23 more files
📄 Description
This adds logic to build and publish the other executables related to Pkl.
These are:
pkl-codegen-kotlin and pkl-codegen-java are published as executable JARs, whereas pkldoc is published both as an executable JAR, and also native executables (matching the set of os/arch supported by Pkl).
The reason this only publishes executable JARs for pkl-codegen-kotlin and pkl-codegen-java is because we expect that the Java requirement is not a problem for these users, and that the native executable provides negligible added value.
As part of this, the following changes are made:
pklJavaExecutableplugin, which sets up building and publishing of executable JAR.pklNativeExecutableplugin, which sets up building and publishing of native executables.NativeImageBuildGradle task, which knows how to build native-image executables.ExecutableSpecextension, for projects that publish executables to configure how those executables should be published../griddles buildNative, by default, will only build the executable of the host OS/Arch, and will no longer cross-build../gradlew buildNativecan be changed using-Dpkl.targetArch=<aarch64|amd64>../gradlew buildNative, a statically linked executable can be built using-Dpkl.musl=truejavaExecutablea dependency ofassembletestStartJavaExecutablea dependency ofcheckpklNativeBuildtopklNativeLifecycleto better match the plugin's purposebuildNativeinstead of individual task namesCloses https://github.com/apple/pkl/issues/991
Closes https://github.com/apple/pkl/issues/992
Closes https://github.com/apple/pkl/issues/285
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.