mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 29c3e77e81 | |||
| e48256942c | |||
| 0a328fafed | |||
| 91820100f7 | |||
| 4ae98b4bf6 | |||
| 4006c087d9 | |||
| 87d91b1950 | |||
| 29cb8ea4f2 | |||
| a490e9d811 | |||
| c8786f61e3 | |||
| f3a93cdd78 | |||
| e5a81b6803 | |||
| 441bc5861a | |||
| de4f0e995b | |||
| 346880f9cf | |||
| 906111d327 | |||
| 08be512fe1 | |||
| 6b04e1d606 | |||
| 1452dc5af3 | |||
| 3421a97478 | |||
| 0829ac486c | |||
| 8209ea78bd | |||
| d9f8b8efa9 | |||
| a210bfd6a3 | |||
| f26195509f | |||
| 49556737c6 | |||
| 2ccebd3aed | |||
| 504c4a3213 | |||
| f7921f0c6f | |||
| 56d88c9efc | |||
| f260c8553c | |||
| c1a9e9e12f | |||
| c60db2a450 | |||
| 5379263839 | |||
| e8a1213217 | |||
| dd9b47097f | |||
| bb90343ae0 | |||
| 3a7ccc2128 | |||
| a5fc32b684 | |||
| 7ab47e825f | |||
| c6a9859969 | |||
| b25cec31b9 | |||
| e978f12a6d | |||
| 21bb67f5be | |||
| 99eed53cd1 | |||
| 6ebf50a7f9 | |||
| a2607dcc6e | |||
| c20119b1f6 | |||
| 9e987b3523 | |||
| 6ec71ef198 | |||
| ffd0b8a17b | |||
| 0fd469f3a6 | |||
| 93b1e7ff01 | |||
| 0af3f4923a | |||
| dc243a47c2 | |||
| b6c484b716 | |||
| 42c32a1ad3 | |||
| a5a00639ed | |||
| bf90b41069 | |||
| ba8279aeee |
+66
-22
@@ -14,24 +14,26 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// File gets rendered to .circleci/config.yml via git hook.
|
// File gets rendered to .circleci/config.yml via git hook.
|
||||||
amends "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.circleci@1.1.1#/PklCI.pkl"
|
amends "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.circleci@1.1.0#/PklCI.pkl"
|
||||||
|
|
||||||
import "jobs/BuildNativeJob.pkl"
|
import "jobs/BuildNativeJob.pkl"
|
||||||
import "jobs/GradleCheckJob.pkl"
|
import "jobs/GradleCheckJob.pkl"
|
||||||
import "jobs/DeployJob.pkl"
|
import "jobs/DeployJob.pkl"
|
||||||
import "jobs/SimpleGradleJob.pkl"
|
import "jobs/SimpleGradleJob.pkl"
|
||||||
|
|
||||||
local prbJobs: Listing<String> = gradleCheckJobs.keys.toListing()
|
local prbJobs: Listing<String> = (gradleCheckJobs.keys.toListing()) {
|
||||||
|
"check-patch-file"
|
||||||
|
}
|
||||||
|
|
||||||
local buildAndTestJobs = (prbJobs) {
|
local buildAndTestJobs = (prbJobs) {
|
||||||
"bench"
|
"bench"
|
||||||
"gradle-compatibility"
|
// "gradle-compatibility"
|
||||||
...buildNativeJobs.keys.filter((it) -> it.endsWith("snapshot"))
|
...buildNativeJobs.keys.filter((it) -> it.endsWith("snapshot"))
|
||||||
}
|
}
|
||||||
|
|
||||||
local releaseJobs = (prbJobs) {
|
local releaseJobs = (prbJobs) {
|
||||||
"bench"
|
"bench"
|
||||||
"gradle-compatibility"
|
// "gradle-compatibility"
|
||||||
...buildNativeJobs.keys.filter((it) -> it.endsWith("release"))
|
...buildNativeJobs.keys.filter((it) -> it.endsWith("release"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,6 +53,44 @@ main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: remove me once policy allows these jobs without approval
|
||||||
|
circleCi {
|
||||||
|
workflows {
|
||||||
|
["release-branch"] {
|
||||||
|
jobs = new Listing<*Mapping<String, WorkflowJob>|String> {
|
||||||
|
new {
|
||||||
|
["hold"] {
|
||||||
|
type = "approval"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new {
|
||||||
|
["pr-approval/authenticate"] {
|
||||||
|
context = "pkl-pr-approval"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (job in super.jobs) {
|
||||||
|
job |> requireApproval
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: remove me once policy allows these jobs without approval
|
||||||
|
local requireApproval = (it: String|Mapping<String, WorkflowJob>) ->
|
||||||
|
if (it is String)
|
||||||
|
new Mapping<String, WorkflowJob> {
|
||||||
|
[it] {
|
||||||
|
requires { "hold" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
(it) {
|
||||||
|
[it.keys.first] {
|
||||||
|
requires { "hold" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
jobs {
|
jobs {
|
||||||
...releaseJobs
|
...releaseJobs
|
||||||
@@ -96,29 +136,17 @@ local buildNativeJobs: Mapping<String, BuildNativeJob> = new {
|
|||||||
musl = true
|
musl = true
|
||||||
isRelease = _dist == "release"
|
isRelease = _dist == "release"
|
||||||
}
|
}
|
||||||
["pkl-cli-windows-amd64-\(_dist)"] {
|
|
||||||
arch = "amd64"
|
|
||||||
os = "windows"
|
|
||||||
isRelease = _dist == "release"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local gradleCheckJobs: Mapping<String, GradleCheckJob> = new {
|
local gradleCheckJobs: Mapping<String, GradleCheckJob> = new {
|
||||||
|
["gradle-check-jdk11"] {
|
||||||
|
javaVersion = "11.0"
|
||||||
|
isRelease = false
|
||||||
|
}
|
||||||
["gradle-check-jdk17"] {
|
["gradle-check-jdk17"] {
|
||||||
javaVersion = "17.0"
|
javaVersion = "17.0"
|
||||||
isRelease = false
|
isRelease = false
|
||||||
os = "linux"
|
|
||||||
}
|
|
||||||
["gradle-check-jdk21"] {
|
|
||||||
javaVersion = "21.0"
|
|
||||||
isRelease = false
|
|
||||||
os = "linux"
|
|
||||||
}
|
|
||||||
["gradle-check-jdk17-windows"] {
|
|
||||||
javaVersion = "17.0"
|
|
||||||
isRelease = false
|
|
||||||
os = "windows"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +162,8 @@ jobs {
|
|||||||
name = "gradle compatibility"
|
name = "gradle compatibility"
|
||||||
command = #"""
|
command = #"""
|
||||||
:pkl-gradle:build \
|
:pkl-gradle:build \
|
||||||
:pkl-gradle:compatibilityTestReleases
|
:pkl-gradle:compatibilityTestReleases \
|
||||||
|
:pkl-gradle:compatibilityTestCandidate
|
||||||
"""#
|
"""#
|
||||||
}.job
|
}.job
|
||||||
["deploy-snapshot"] = new DeployJob { command = "publishToSonatype" }.job
|
["deploy-snapshot"] = new DeployJob { command = "publishToSonatype" }.job
|
||||||
@@ -152,7 +181,7 @@ jobs {
|
|||||||
name = "Publish release on GitHub"
|
name = "Publish release on GitHub"
|
||||||
command = #"""
|
command = #"""
|
||||||
# exclude build_artifacts.txt from publish
|
# exclude build_artifacts.txt from publish
|
||||||
rm -f pkl-cli/build/executable/*.build_artifacts.txt
|
rm pkl-cli/build/executable/*.build_artifacts.txt
|
||||||
gh release create "${CIRCLE_TAG}" \
|
gh release create "${CIRCLE_TAG}" \
|
||||||
--title "${CIRCLE_TAG}" \
|
--title "${CIRCLE_TAG}" \
|
||||||
--target "${CIRCLE_SHA1}" \
|
--target "${CIRCLE_SHA1}" \
|
||||||
@@ -164,4 +193,19 @@ jobs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
["check-patch-file"] {
|
||||||
|
docker {
|
||||||
|
new { image = "cimg/base:current" }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
"checkout"
|
||||||
|
new RunStep {
|
||||||
|
// language=bash
|
||||||
|
command = #"""
|
||||||
|
git apply --reject patches/graalVm23.patch
|
||||||
|
"""#
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resource_class = "small"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+207
-188
@@ -12,19 +12,25 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DreleaseBuild=true pkl-cli:macExecutableAmd64 pkl-core:testMacExecutableAmd64 pkl-server:testMacExecutableAmd64
|
./gradlew --info --stacktrace -DreleaseBuild=true pkl-cli:macExecutableAmd64 pkl-core:testMacExecutableAmd64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
resource_class: macos.m1.large.gen1
|
resource_class: macos.m1.large.gen1
|
||||||
macos:
|
macos:
|
||||||
xcode: 15.3.0
|
xcode: 15.2.0
|
||||||
pkl-cli-linux-amd64-release:
|
pkl-cli-linux-amd64-release:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
@@ -39,8 +45,8 @@ jobs:
|
|||||||
&& rm -rf /var/cache/dnf
|
&& rm -rf /var/cache/dnf
|
||||||
|
|
||||||
# install jdk
|
# install jdk
|
||||||
curl -Lf \
|
curl -L \
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9.tar.gz -o /tmp/jdk.tar.gz
|
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.20.1_1.tar.gz -o /tmp/jdk.tar.gz
|
||||||
|
|
||||||
mkdir /jdk \
|
mkdir /jdk \
|
||||||
&& cd /jdk \
|
&& cd /jdk \
|
||||||
@@ -52,7 +58,7 @@ jobs:
|
|||||||
|
|
||||||
# install zlib
|
# install zlib
|
||||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||||
curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
curl -L https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_zlib-1.2.13 \
|
mkdir -p /tmp/dep_zlib-1.2.13 \
|
||||||
&& cd /tmp/dep_zlib-1.2.13 \
|
&& cd /tmp/dep_zlib-1.2.13 \
|
||||||
@@ -65,7 +71,7 @@ jobs:
|
|||||||
|
|
||||||
# install musl
|
# install musl
|
||||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||||
curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
curl -L https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_musl-1.2.2 \
|
mkdir -p /tmp/dep_musl-1.2.2 \
|
||||||
&& cd /tmp/dep_musl-1.2.2 \
|
&& cd /tmp/dep_musl-1.2.2 \
|
||||||
@@ -88,12 +94,18 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DreleaseBuild=true pkl-cli:linuxExecutableAmd64 pkl-core:testLinuxExecutableAmd64 pkl-server:testLinuxExecutableAmd64
|
./gradlew --info --stacktrace -DreleaseBuild=true pkl-cli:linuxExecutableAmd64 pkl-core:testLinuxExecutableAmd64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
@@ -105,22 +117,30 @@ jobs:
|
|||||||
pkl-cli-macOS-aarch64-release:
|
pkl-cli-macOS-aarch64-release:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
- run:
|
||||||
|
command: git apply patches/graalVm23.patch
|
||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DreleaseBuild=true pkl-cli:macExecutableAarch64 pkl-core:testMacExecutableAarch64 pkl-server:testMacExecutableAarch64
|
./gradlew --info --stacktrace -DreleaseBuild=true pkl-cli:macExecutableAarch64 pkl-core:testMacExecutableAarch64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
resource_class: macos.m1.large.gen1
|
resource_class: macos.m1.large.gen1
|
||||||
macos:
|
macos:
|
||||||
xcode: 15.3.0
|
xcode: 15.2.0
|
||||||
pkl-cli-linux-aarch64-release:
|
pkl-cli-linux-aarch64-release:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
@@ -135,8 +155,8 @@ jobs:
|
|||||||
&& rm -rf /var/cache/dnf
|
&& rm -rf /var/cache/dnf
|
||||||
|
|
||||||
# install jdk
|
# install jdk
|
||||||
curl -Lf \
|
curl -L \
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.9_9.tar.gz -o /tmp/jdk.tar.gz
|
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.20.1_1.tar.gz -o /tmp/jdk.tar.gz
|
||||||
|
|
||||||
mkdir /jdk \
|
mkdir /jdk \
|
||||||
&& cd /jdk \
|
&& cd /jdk \
|
||||||
@@ -148,7 +168,7 @@ jobs:
|
|||||||
|
|
||||||
# install zlib
|
# install zlib
|
||||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||||
curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
curl -L https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_zlib-1.2.13 \
|
mkdir -p /tmp/dep_zlib-1.2.13 \
|
||||||
&& cd /tmp/dep_zlib-1.2.13 \
|
&& cd /tmp/dep_zlib-1.2.13 \
|
||||||
@@ -168,12 +188,18 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DreleaseBuild=true pkl-cli:linuxExecutableAarch64 pkl-core:testLinuxExecutableAarch64 pkl-server:testLinuxExecutableAarch64
|
./gradlew --info --stacktrace -DreleaseBuild=true pkl-cli:linuxExecutableAarch64 pkl-core:testLinuxExecutableAarch64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
@@ -196,8 +222,8 @@ jobs:
|
|||||||
&& rm -rf /var/cache/dnf
|
&& rm -rf /var/cache/dnf
|
||||||
|
|
||||||
# install jdk
|
# install jdk
|
||||||
curl -Lf \
|
curl -L \
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9.tar.gz -o /tmp/jdk.tar.gz
|
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.20.1_1.tar.gz -o /tmp/jdk.tar.gz
|
||||||
|
|
||||||
mkdir /jdk \
|
mkdir /jdk \
|
||||||
&& cd /jdk \
|
&& cd /jdk \
|
||||||
@@ -209,7 +235,7 @@ jobs:
|
|||||||
|
|
||||||
# install zlib
|
# install zlib
|
||||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||||
curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
curl -L https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_zlib-1.2.13 \
|
mkdir -p /tmp/dep_zlib-1.2.13 \
|
||||||
&& cd /tmp/dep_zlib-1.2.13 \
|
&& cd /tmp/dep_zlib-1.2.13 \
|
||||||
@@ -222,7 +248,7 @@ jobs:
|
|||||||
|
|
||||||
# install musl
|
# install musl
|
||||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||||
curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
curl -L https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_musl-1.2.2 \
|
mkdir -p /tmp/dep_musl-1.2.2 \
|
||||||
&& cd /tmp/dep_musl-1.2.2 \
|
&& cd /tmp/dep_musl-1.2.2 \
|
||||||
@@ -245,12 +271,18 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DreleaseBuild=true pkl-cli:alpineExecutableAmd64 pkl-core:testAlpineExecutableAmd64 pkl-server:testAlpineExecutableAmd64
|
./gradlew --info --stacktrace -DreleaseBuild=true pkl-cli:alpineExecutableAmd64 pkl-core:testAlpineExecutableAmd64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
@@ -259,39 +291,6 @@ jobs:
|
|||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
docker:
|
docker:
|
||||||
- image: oraclelinux:8-slim
|
- image: oraclelinux:8-slim
|
||||||
pkl-cli-windows-amd64-release:
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run:
|
|
||||||
command: |-
|
|
||||||
# install jdk
|
|
||||||
curl -Lf \
|
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jdk_x64_windows_hotspot_17.0.9_9.zip -o /tmp/jdk.zip
|
|
||||||
|
|
||||||
unzip /tmp/jdk.zip -d /tmp/jdk \
|
|
||||||
&& cd /tmp/jdk/jdk-* \
|
|
||||||
&& mkdir /jdk \
|
|
||||||
&& cp -r . /jdk
|
|
||||||
name: Set up environment
|
|
||||||
shell: bash.exe
|
|
||||||
- run:
|
|
||||||
command: |-
|
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DreleaseBuild=true pkl-cli:windowsExecutableAmd64 pkl-core:testWindowsExecutableAmd64 pkl-server:testWindowsExecutableAmd64
|
|
||||||
name: gradle buildNative
|
|
||||||
shell: bash.exe
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: '.'
|
|
||||||
paths:
|
|
||||||
- pkl-cli/build/executable/
|
|
||||||
- store_test_results:
|
|
||||||
path: ~/test-results
|
|
||||||
environment:
|
|
||||||
LANG: en_US.UTF-8
|
|
||||||
JAVA_HOME: /jdk
|
|
||||||
resource_class: windows.large
|
|
||||||
machine:
|
|
||||||
image: windows-server-2022-gui:current
|
|
||||||
pkl-cli-macOS-amd64-snapshot:
|
pkl-cli-macOS-amd64-snapshot:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
@@ -301,19 +300,25 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results pkl-cli:macExecutableAmd64 pkl-core:testMacExecutableAmd64 pkl-server:testMacExecutableAmd64
|
./gradlew --info --stacktrace pkl-cli:macExecutableAmd64 pkl-core:testMacExecutableAmd64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
resource_class: macos.m1.large.gen1
|
resource_class: macos.m1.large.gen1
|
||||||
macos:
|
macos:
|
||||||
xcode: 15.3.0
|
xcode: 15.2.0
|
||||||
pkl-cli-linux-amd64-snapshot:
|
pkl-cli-linux-amd64-snapshot:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
@@ -328,8 +333,8 @@ jobs:
|
|||||||
&& rm -rf /var/cache/dnf
|
&& rm -rf /var/cache/dnf
|
||||||
|
|
||||||
# install jdk
|
# install jdk
|
||||||
curl -Lf \
|
curl -L \
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9.tar.gz -o /tmp/jdk.tar.gz
|
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.20.1_1.tar.gz -o /tmp/jdk.tar.gz
|
||||||
|
|
||||||
mkdir /jdk \
|
mkdir /jdk \
|
||||||
&& cd /jdk \
|
&& cd /jdk \
|
||||||
@@ -341,7 +346,7 @@ jobs:
|
|||||||
|
|
||||||
# install zlib
|
# install zlib
|
||||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||||
curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
curl -L https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_zlib-1.2.13 \
|
mkdir -p /tmp/dep_zlib-1.2.13 \
|
||||||
&& cd /tmp/dep_zlib-1.2.13 \
|
&& cd /tmp/dep_zlib-1.2.13 \
|
||||||
@@ -354,7 +359,7 @@ jobs:
|
|||||||
|
|
||||||
# install musl
|
# install musl
|
||||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||||
curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
curl -L https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_musl-1.2.2 \
|
mkdir -p /tmp/dep_musl-1.2.2 \
|
||||||
&& cd /tmp/dep_musl-1.2.2 \
|
&& cd /tmp/dep_musl-1.2.2 \
|
||||||
@@ -377,12 +382,18 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results pkl-cli:linuxExecutableAmd64 pkl-core:testLinuxExecutableAmd64 pkl-server:testLinuxExecutableAmd64
|
./gradlew --info --stacktrace pkl-cli:linuxExecutableAmd64 pkl-core:testLinuxExecutableAmd64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
@@ -394,22 +405,30 @@ jobs:
|
|||||||
pkl-cli-macOS-aarch64-snapshot:
|
pkl-cli-macOS-aarch64-snapshot:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
- run:
|
||||||
|
command: git apply patches/graalVm23.patch
|
||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results pkl-cli:macExecutableAarch64 pkl-core:testMacExecutableAarch64 pkl-server:testMacExecutableAarch64
|
./gradlew --info --stacktrace pkl-cli:macExecutableAarch64 pkl-core:testMacExecutableAarch64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
resource_class: macos.m1.large.gen1
|
resource_class: macos.m1.large.gen1
|
||||||
macos:
|
macos:
|
||||||
xcode: 15.3.0
|
xcode: 15.2.0
|
||||||
pkl-cli-linux-aarch64-snapshot:
|
pkl-cli-linux-aarch64-snapshot:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
@@ -424,8 +443,8 @@ jobs:
|
|||||||
&& rm -rf /var/cache/dnf
|
&& rm -rf /var/cache/dnf
|
||||||
|
|
||||||
# install jdk
|
# install jdk
|
||||||
curl -Lf \
|
curl -L \
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.9_9.tar.gz -o /tmp/jdk.tar.gz
|
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.20.1_1.tar.gz -o /tmp/jdk.tar.gz
|
||||||
|
|
||||||
mkdir /jdk \
|
mkdir /jdk \
|
||||||
&& cd /jdk \
|
&& cd /jdk \
|
||||||
@@ -437,7 +456,7 @@ jobs:
|
|||||||
|
|
||||||
# install zlib
|
# install zlib
|
||||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||||
curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
curl -L https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_zlib-1.2.13 \
|
mkdir -p /tmp/dep_zlib-1.2.13 \
|
||||||
&& cd /tmp/dep_zlib-1.2.13 \
|
&& cd /tmp/dep_zlib-1.2.13 \
|
||||||
@@ -457,12 +476,18 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results pkl-cli:linuxExecutableAarch64 pkl-core:testLinuxExecutableAarch64 pkl-server:testLinuxExecutableAarch64
|
./gradlew --info --stacktrace pkl-cli:linuxExecutableAarch64 pkl-core:testLinuxExecutableAarch64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
@@ -485,8 +510,8 @@ jobs:
|
|||||||
&& rm -rf /var/cache/dnf
|
&& rm -rf /var/cache/dnf
|
||||||
|
|
||||||
# install jdk
|
# install jdk
|
||||||
curl -Lf \
|
curl -L \
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9.tar.gz -o /tmp/jdk.tar.gz
|
https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/OpenJDK11U-jdk_x64_linux_hotspot_11.0.20.1_1.tar.gz -o /tmp/jdk.tar.gz
|
||||||
|
|
||||||
mkdir /jdk \
|
mkdir /jdk \
|
||||||
&& cd /jdk \
|
&& cd /jdk \
|
||||||
@@ -498,7 +523,7 @@ jobs:
|
|||||||
|
|
||||||
# install zlib
|
# install zlib
|
||||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||||
curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
curl -L https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_zlib-1.2.13 \
|
mkdir -p /tmp/dep_zlib-1.2.13 \
|
||||||
&& cd /tmp/dep_zlib-1.2.13 \
|
&& cd /tmp/dep_zlib-1.2.13 \
|
||||||
@@ -511,7 +536,7 @@ jobs:
|
|||||||
|
|
||||||
# install musl
|
# install musl
|
||||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||||
curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
curl -L https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_musl-1.2.2 \
|
mkdir -p /tmp/dep_musl-1.2.2 \
|
||||||
&& cd /tmp/dep_musl-1.2.2 \
|
&& cd /tmp/dep_musl-1.2.2 \
|
||||||
@@ -534,12 +559,18 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results pkl-cli:alpineExecutableAmd64 pkl-core:testAlpineExecutableAmd64 pkl-server:testAlpineExecutableAmd64
|
./gradlew --info --stacktrace pkl-cli:alpineExecutableAmd64 pkl-core:testAlpineExecutableAmd64
|
||||||
name: gradle buildNative
|
name: gradle buildNative
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
@@ -548,149 +579,127 @@ jobs:
|
|||||||
resource_class: xlarge
|
resource_class: xlarge
|
||||||
docker:
|
docker:
|
||||||
- image: oraclelinux:8-slim
|
- image: oraclelinux:8-slim
|
||||||
pkl-cli-windows-amd64-snapshot:
|
gradle-check-jdk11:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
command: |-
|
command: ./gradlew --info --stacktrace check
|
||||||
# install jdk
|
name: gradle check
|
||||||
curl -Lf \
|
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jdk_x64_windows_hotspot_17.0.9_9.zip -o /tmp/jdk.zip
|
|
||||||
|
|
||||||
unzip /tmp/jdk.zip -d /tmp/jdk \
|
|
||||||
&& cd /tmp/jdk/jdk-* \
|
|
||||||
&& mkdir /jdk \
|
|
||||||
&& cp -r . /jdk
|
|
||||||
name: Set up environment
|
|
||||||
shell: bash.exe
|
|
||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
mkdir ~/test-results/
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results pkl-cli:windowsExecutableAmd64 pkl-core:testWindowsExecutableAmd64 pkl-server:testWindowsExecutableAmd64
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
name: gradle buildNative
|
name: Gather test results
|
||||||
shell: bash.exe
|
when: always
|
||||||
- persist_to_workspace:
|
|
||||||
root: '.'
|
|
||||||
paths:
|
|
||||||
- pkl-cli/build/executable/
|
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
JAVA_HOME: /jdk
|
docker:
|
||||||
resource_class: windows.large
|
- image: cimg/openjdk:11.0
|
||||||
machine:
|
|
||||||
image: windows-server-2022-gui:current
|
|
||||||
gradle-check-jdk17:
|
gradle-check-jdk17:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
command: ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results check
|
command: ./gradlew --info --stacktrace check
|
||||||
name: gradle check
|
name: gradle check
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:17.0
|
- image: cimg/openjdk:17.0
|
||||||
gradle-check-jdk21:
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run:
|
|
||||||
command: ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results check
|
|
||||||
name: gradle check
|
|
||||||
- store_test_results:
|
|
||||||
path: ~/test-results
|
|
||||||
environment:
|
|
||||||
LANG: en_US.UTF-8
|
|
||||||
docker:
|
|
||||||
- image: cimg/openjdk:21.0
|
|
||||||
gradle-check-jdk17-windows:
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run:
|
|
||||||
command: |-
|
|
||||||
# install jdk
|
|
||||||
curl -Lf \
|
|
||||||
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jdk_x64_windows_hotspot_17.0.9_9.zip -o /tmp/jdk.zip
|
|
||||||
|
|
||||||
unzip /tmp/jdk.zip -d /tmp/jdk \
|
|
||||||
&& cd /tmp/jdk/jdk-* \
|
|
||||||
&& mkdir /jdk \
|
|
||||||
&& cp -r . /jdk
|
|
||||||
name: Set up environment
|
|
||||||
shell: bash.exe
|
|
||||||
- run:
|
|
||||||
command: ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results check
|
|
||||||
name: gradle check
|
|
||||||
- store_test_results:
|
|
||||||
path: ~/test-results
|
|
||||||
environment:
|
|
||||||
LANG: en_US.UTF-8
|
|
||||||
JAVA_HOME: /jdk
|
|
||||||
resource_class: windows.large
|
|
||||||
machine:
|
|
||||||
image: windows-server-2022-gui:current
|
|
||||||
bench:
|
bench:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
command: ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results bench:jmh
|
command: ./gradlew --info --stacktrace bench:jmh
|
||||||
name: bench:jmh
|
name: bench:jmh
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:17.0
|
- image: cimg/openjdk:11.0
|
||||||
gradle-compatibility:
|
gradle-compatibility:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results :pkl-gradle:build \
|
./gradlew --info --stacktrace :pkl-gradle:build \
|
||||||
:pkl-gradle:compatibilityTestReleases
|
:pkl-gradle:compatibilityTestReleases \
|
||||||
|
:pkl-gradle:compatibilityTestCandidate
|
||||||
name: gradle compatibility
|
name: gradle compatibility
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:17.0
|
- image: cimg/openjdk:11.0
|
||||||
deploy-snapshot:
|
deploy-snapshot:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '.'
|
at: '.'
|
||||||
- run:
|
- run:
|
||||||
command: ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results publishToSonatype
|
command: ./gradlew --info --stacktrace publishToSonatype
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:17.0
|
- image: cimg/openjdk:11.0
|
||||||
deploy-release:
|
deploy-release:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: '.'
|
at: '.'
|
||||||
- run:
|
- run:
|
||||||
command: ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DreleaseBuild=true publishToSonatype closeAndReleaseSonatypeStagingRepository
|
command: ./gradlew --info --stacktrace -DreleaseBuild=true publishToSonatype closeAndReleaseSonatypeStagingRepository
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: '.'
|
root: '.'
|
||||||
paths:
|
paths:
|
||||||
- pkl-cli/build/executable/
|
- pkl-cli/build/executable/
|
||||||
|
- run:
|
||||||
|
command: |-
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \;
|
||||||
|
name: Gather test results
|
||||||
|
when: always
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: ~/test-results
|
path: ~/test-results
|
||||||
environment:
|
environment:
|
||||||
LANG: en_US.UTF-8
|
LANG: en_US.UTF-8
|
||||||
docker:
|
docker:
|
||||||
- image: cimg/openjdk:17.0
|
- image: cimg/openjdk:11.0
|
||||||
github-release:
|
github-release:
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
@@ -698,7 +707,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: |-
|
command: |-
|
||||||
# exclude build_artifacts.txt from publish
|
# exclude build_artifacts.txt from publish
|
||||||
rm -f pkl-cli/build/executable/*.build_artifacts.txt
|
rm pkl-cli/build/executable/*.build_artifacts.txt
|
||||||
gh release create "${CIRCLE_TAG}" \
|
gh release create "${CIRCLE_TAG}" \
|
||||||
--title "${CIRCLE_TAG}" \
|
--title "${CIRCLE_TAG}" \
|
||||||
--target "${CIRCLE_SHA1}" \
|
--target "${CIRCLE_SHA1}" \
|
||||||
@@ -709,6 +718,14 @@ jobs:
|
|||||||
name: Publish release on GitHub
|
name: Publish release on GitHub
|
||||||
docker:
|
docker:
|
||||||
- image: maniator/gh:v2.40.1
|
- image: maniator/gh:v2.40.1
|
||||||
|
check-patch-file:
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
command: git apply --reject patches/graalVm23.patch
|
||||||
|
resource_class: small
|
||||||
|
docker:
|
||||||
|
- image: cimg/base:current
|
||||||
trigger-docsite-build:
|
trigger-docsite-build:
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
@@ -742,13 +759,13 @@ workflows:
|
|||||||
type: approval
|
type: approval
|
||||||
- pr-approval/authenticate:
|
- pr-approval/authenticate:
|
||||||
context: pkl-pr-approval
|
context: pkl-pr-approval
|
||||||
|
- gradle-check-jdk11:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
- gradle-check-jdk17:
|
- gradle-check-jdk17:
|
||||||
requires:
|
requires:
|
||||||
- hold
|
- hold
|
||||||
- gradle-check-jdk21:
|
- check-patch-file:
|
||||||
requires:
|
|
||||||
- hold
|
|
||||||
- gradle-check-jdk17-windows:
|
|
||||||
requires:
|
requires:
|
||||||
- hold
|
- hold
|
||||||
when:
|
when:
|
||||||
@@ -757,30 +774,26 @@ workflows:
|
|||||||
pattern: ^pull/\d+(/head)?$
|
pattern: ^pull/\d+(/head)?$
|
||||||
main:
|
main:
|
||||||
jobs:
|
jobs:
|
||||||
|
- gradle-check-jdk11
|
||||||
- gradle-check-jdk17
|
- gradle-check-jdk17
|
||||||
- gradle-check-jdk21
|
- check-patch-file
|
||||||
- gradle-check-jdk17-windows
|
|
||||||
- bench
|
- bench
|
||||||
- gradle-compatibility
|
|
||||||
- pkl-cli-macOS-amd64-snapshot
|
- pkl-cli-macOS-amd64-snapshot
|
||||||
- pkl-cli-linux-amd64-snapshot
|
- pkl-cli-linux-amd64-snapshot
|
||||||
- pkl-cli-macOS-aarch64-snapshot
|
- pkl-cli-macOS-aarch64-snapshot
|
||||||
- pkl-cli-linux-aarch64-snapshot
|
- pkl-cli-linux-aarch64-snapshot
|
||||||
- pkl-cli-linux-alpine-amd64-snapshot
|
- pkl-cli-linux-alpine-amd64-snapshot
|
||||||
- pkl-cli-windows-amd64-snapshot
|
|
||||||
- deploy-snapshot:
|
- deploy-snapshot:
|
||||||
requires:
|
requires:
|
||||||
|
- gradle-check-jdk11
|
||||||
- gradle-check-jdk17
|
- gradle-check-jdk17
|
||||||
- gradle-check-jdk21
|
- check-patch-file
|
||||||
- gradle-check-jdk17-windows
|
|
||||||
- bench
|
- bench
|
||||||
- gradle-compatibility
|
|
||||||
- pkl-cli-macOS-amd64-snapshot
|
- pkl-cli-macOS-amd64-snapshot
|
||||||
- pkl-cli-linux-amd64-snapshot
|
- pkl-cli-linux-amd64-snapshot
|
||||||
- pkl-cli-macOS-aarch64-snapshot
|
- pkl-cli-macOS-aarch64-snapshot
|
||||||
- pkl-cli-linux-aarch64-snapshot
|
- pkl-cli-linux-aarch64-snapshot
|
||||||
- pkl-cli-linux-alpine-amd64-snapshot
|
- pkl-cli-linux-alpine-amd64-snapshot
|
||||||
- pkl-cli-windows-amd64-snapshot
|
|
||||||
context: pkl-maven-release
|
context: pkl-maven-release
|
||||||
- trigger-docsite-build:
|
- trigger-docsite-build:
|
||||||
requires:
|
requires:
|
||||||
@@ -793,19 +806,19 @@ workflows:
|
|||||||
- << pipeline.git.branch >>
|
- << pipeline.git.branch >>
|
||||||
release:
|
release:
|
||||||
jobs:
|
jobs:
|
||||||
|
- gradle-check-jdk11:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore: /.*/
|
||||||
|
tags:
|
||||||
|
only: /^v?\d+\.\d+\.\d+$/
|
||||||
- gradle-check-jdk17:
|
- gradle-check-jdk17:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
tags:
|
tags:
|
||||||
only: /^v?\d+\.\d+\.\d+$/
|
only: /^v?\d+\.\d+\.\d+$/
|
||||||
- gradle-check-jdk21:
|
- check-patch-file:
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
||||||
tags:
|
|
||||||
only: /^v?\d+\.\d+\.\d+$/
|
|
||||||
- gradle-check-jdk17-windows:
|
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
@@ -817,12 +830,6 @@ workflows:
|
|||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
tags:
|
tags:
|
||||||
only: /^v?\d+\.\d+\.\d+$/
|
only: /^v?\d+\.\d+\.\d+$/
|
||||||
- gradle-compatibility:
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
||||||
tags:
|
|
||||||
only: /^v?\d+\.\d+\.\d+$/
|
|
||||||
- pkl-cli-macOS-amd64-release:
|
- pkl-cli-macOS-amd64-release:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
@@ -853,25 +860,17 @@ workflows:
|
|||||||
ignore: /.*/
|
ignore: /.*/
|
||||||
tags:
|
tags:
|
||||||
only: /^v?\d+\.\d+\.\d+$/
|
only: /^v?\d+\.\d+\.\d+$/
|
||||||
- pkl-cli-windows-amd64-release:
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
||||||
tags:
|
|
||||||
only: /^v?\d+\.\d+\.\d+$/
|
|
||||||
- github-release:
|
- github-release:
|
||||||
requires:
|
requires:
|
||||||
|
- gradle-check-jdk11
|
||||||
- gradle-check-jdk17
|
- gradle-check-jdk17
|
||||||
- gradle-check-jdk21
|
- check-patch-file
|
||||||
- gradle-check-jdk17-windows
|
|
||||||
- bench
|
- bench
|
||||||
- gradle-compatibility
|
|
||||||
- pkl-cli-macOS-amd64-release
|
- pkl-cli-macOS-amd64-release
|
||||||
- pkl-cli-linux-amd64-release
|
- pkl-cli-linux-amd64-release
|
||||||
- pkl-cli-macOS-aarch64-release
|
- pkl-cli-macOS-aarch64-release
|
||||||
- pkl-cli-linux-aarch64-release
|
- pkl-cli-linux-aarch64-release
|
||||||
- pkl-cli-linux-alpine-amd64-release
|
- pkl-cli-linux-alpine-amd64-release
|
||||||
- pkl-cli-windows-amd64-release
|
|
||||||
context: pkl-github-release
|
context: pkl-github-release
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
@@ -899,17 +898,37 @@ workflows:
|
|||||||
only: /^v?\d+\.\d+\.\d+$/
|
only: /^v?\d+\.\d+\.\d+$/
|
||||||
release-branch:
|
release-branch:
|
||||||
jobs:
|
jobs:
|
||||||
- gradle-check-jdk17
|
- hold:
|
||||||
- gradle-check-jdk21
|
type: approval
|
||||||
- gradle-check-jdk17-windows
|
- pr-approval/authenticate:
|
||||||
- bench
|
context: pkl-pr-approval
|
||||||
- gradle-compatibility
|
- gradle-check-jdk11:
|
||||||
- pkl-cli-macOS-amd64-release
|
requires:
|
||||||
- pkl-cli-linux-amd64-release
|
- hold
|
||||||
- pkl-cli-macOS-aarch64-release
|
- gradle-check-jdk17:
|
||||||
- pkl-cli-linux-aarch64-release
|
requires:
|
||||||
- pkl-cli-linux-alpine-amd64-release
|
- hold
|
||||||
- pkl-cli-windows-amd64-release
|
- check-patch-file:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
|
- bench:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
|
- pkl-cli-macOS-amd64-release:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
|
- pkl-cli-linux-amd64-release:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
|
- pkl-cli-macOS-aarch64-release:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
|
- pkl-cli-linux-aarch64-release:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
|
- pkl-cli-linux-alpine-amd64-release:
|
||||||
|
requires:
|
||||||
|
- hold
|
||||||
when:
|
when:
|
||||||
matches:
|
matches:
|
||||||
value: << pipeline.git.branch >>
|
value: << pipeline.git.branch >>
|
||||||
|
|||||||
@@ -16,7 +16,11 @@
|
|||||||
/// Builds the native `pkl` CLI
|
/// Builds the native `pkl` CLI
|
||||||
extends "GradleJob.pkl"
|
extends "GradleJob.pkl"
|
||||||
|
|
||||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
|
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.0#/Config.pkl"
|
||||||
|
import "package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.uri@1.0.0#/URI.pkl"
|
||||||
|
|
||||||
|
/// The OS to run on
|
||||||
|
os: "macOS"|"linux"
|
||||||
|
|
||||||
/// The architecture to use
|
/// The architecture to use
|
||||||
arch: "amd64"|"aarch64"
|
arch: "amd64"|"aarch64"
|
||||||
@@ -24,11 +28,13 @@ arch: "amd64"|"aarch64"
|
|||||||
/// Whether to link to musl. Otherwise, links to glibc.
|
/// Whether to link to musl. Otherwise, links to glibc.
|
||||||
musl: Boolean = false
|
musl: Boolean = false
|
||||||
|
|
||||||
javaVersion = "17.0"
|
|
||||||
|
|
||||||
local setupLinuxEnvironment: Config.RunStep =
|
local setupLinuxEnvironment: Config.RunStep =
|
||||||
|
let (jdkVersion = "11.0.20.1+1")
|
||||||
let (muslVersion = "1.2.2")
|
let (muslVersion = "1.2.2")
|
||||||
let (zlibVersion = "1.2.13")
|
let (zlibVersion = "1.2.13")
|
||||||
|
let (jdkVersionEncoded = URI.encodeComponent(jdkVersion))
|
||||||
|
let (jdkVersionAlt = jdkVersion.replaceLast("+", "_"))
|
||||||
|
let (majorJdkVersion = jdkVersion.split(".").first)
|
||||||
new {
|
new {
|
||||||
name = "Set up environment"
|
name = "Set up environment"
|
||||||
shell = "#!/bin/bash -exo pipefail"
|
shell = "#!/bin/bash -exo pipefail"
|
||||||
@@ -40,8 +46,8 @@ local setupLinuxEnvironment: Config.RunStep =
|
|||||||
&& rm -rf /var/cache/dnf
|
&& rm -rf /var/cache/dnf
|
||||||
|
|
||||||
# install jdk
|
# install jdk
|
||||||
curl -Lf \
|
curl -L \
|
||||||
https://github.com/adoptium/temurin\#(module.majorJdkVersion)-binaries/releases/download/\#(module.jdkGitHubReleaseName)/OpenJDK\#(module.majorJdkVersion)U-jdk_\#(if (arch == "amd64") "x64" else "aarch64")_linux_hotspot_\#(module.jdkVersionAlt).tar.gz -o /tmp/jdk.tar.gz
|
https://github.com/adoptium/temurin\#(majorJdkVersion)-binaries/releases/download/jdk-\#(jdkVersionEncoded)/OpenJDK\#(majorJdkVersion)U-jdk_\#(if (arch == "amd64") "x64" else "aarch64")_linux_hotspot_\#(jdkVersionAlt).tar.gz -o /tmp/jdk.tar.gz
|
||||||
|
|
||||||
mkdir /jdk \
|
mkdir /jdk \
|
||||||
&& cd /jdk \
|
&& cd /jdk \
|
||||||
@@ -53,7 +59,7 @@ local setupLinuxEnvironment: Config.RunStep =
|
|||||||
|
|
||||||
# install zlib
|
# install zlib
|
||||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||||
curl -Lf https://github.com/madler/zlib/releases/download/v\#(zlibVersion)/zlib-\#(zlibVersion).tar.gz -o /tmp/zlib.tar.gz
|
curl -L https://github.com/madler/zlib/releases/download/v\#(zlibVersion)/zlib-\#(zlibVersion).tar.gz -o /tmp/zlib.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_zlib-\#(zlibVersion) \
|
mkdir -p /tmp/dep_zlib-\#(zlibVersion) \
|
||||||
&& cd /tmp/dep_zlib-\#(zlibVersion) \
|
&& cd /tmp/dep_zlib-\#(zlibVersion) \
|
||||||
@@ -69,7 +75,7 @@ local setupLinuxEnvironment: Config.RunStep =
|
|||||||
#"""
|
#"""
|
||||||
# install musl
|
# install musl
|
||||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||||
curl -Lf https://musl.libc.org/releases/musl-\#(muslVersion).tar.gz -o /tmp/musl.tar.gz
|
curl -L https://musl.libc.org/releases/musl-\#(muslVersion).tar.gz -o /tmp/musl.tar.gz
|
||||||
|
|
||||||
mkdir -p /tmp/dep_musl-\#(muslVersion) \
|
mkdir -p /tmp/dep_musl-\#(muslVersion) \
|
||||||
&& cd /tmp/dep_musl-\#(muslVersion) \
|
&& cd /tmp/dep_musl-\#(muslVersion) \
|
||||||
@@ -110,20 +116,24 @@ steps {
|
|||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If building macOS/aarch64, we need to use GraalVM 23.
|
||||||
|
// We can't use GraalVM 23 for any other build because we need to support Java 11, which was
|
||||||
|
// dropped in GraalVM 23.
|
||||||
|
when (os == "macOS" && arch == "aarch64") {
|
||||||
|
new Config.RunStep {
|
||||||
|
command = "git apply patches/graalVm23.patch"
|
||||||
|
}
|
||||||
|
}
|
||||||
new Config.RunStep {
|
new Config.RunStep {
|
||||||
name = "gradle buildNative"
|
name = "gradle buildNative"
|
||||||
local _os =
|
local _os =
|
||||||
if (module.os == "macOS") "mac"
|
if (os == "macOS") "mac"
|
||||||
else if (musl) "alpine"
|
else if (musl) "alpine"
|
||||||
else if (module.os == "windows") "windows"
|
|
||||||
else "linux"
|
else "linux"
|
||||||
local jobName = "\(_os)Executable\(arch.capitalize())"
|
local jobName = "\(_os)Executable\(arch.capitalize())"
|
||||||
when (module.os == "windows") {
|
|
||||||
shell = "bash.exe"
|
|
||||||
}
|
|
||||||
command = #"""
|
command = #"""
|
||||||
export PATH=~/staticdeps/bin:$PATH
|
export PATH=~/staticdeps/bin:$PATH
|
||||||
./gradlew \#(module.gradleArgs) pkl-cli:\#(jobName) pkl-core:test\#(jobName.capitalize()) pkl-server:test\#(jobName.capitalize())
|
./gradlew \#(module.gradleArgs) pkl-cli:\#(jobName) pkl-core:test\#(jobName.capitalize())
|
||||||
"""#
|
"""#
|
||||||
}
|
}
|
||||||
new Config.PersistToWorkspaceStep {
|
new Config.PersistToWorkspaceStep {
|
||||||
@@ -137,12 +147,13 @@ steps {
|
|||||||
job {
|
job {
|
||||||
when (os == "macOS") {
|
when (os == "macOS") {
|
||||||
macos {
|
macos {
|
||||||
xcode = "15.3.0"
|
xcode = "15.2.0"
|
||||||
}
|
}
|
||||||
|
// Use M1 for all architectures. We build amd64/aarch64 based on the GraalVM version,
|
||||||
|
// which gets patched in via `git apply patches/graalVm23.patch`.
|
||||||
resource_class = "macos.m1.large.gen1"
|
resource_class = "macos.m1.large.gen1"
|
||||||
}
|
} else {
|
||||||
when (os == "linux") {
|
docker {
|
||||||
docker = new Listing<Config.DockerImage> {
|
|
||||||
new {
|
new {
|
||||||
image = if (arch == "aarch64") "arm64v8/oraclelinux:8-slim" else "oraclelinux:8-slim"
|
image = if (arch == "aarch64") "arm64v8/oraclelinux:8-slim" else "oraclelinux:8-slim"
|
||||||
}
|
}
|
||||||
@@ -152,13 +163,4 @@ job {
|
|||||||
}
|
}
|
||||||
resource_class = if (arch == "aarch64") "arm.xlarge" else "xlarge"
|
resource_class = if (arch == "aarch64") "arm.xlarge" else "xlarge"
|
||||||
}
|
}
|
||||||
when (os == "windows") {
|
|
||||||
machine {
|
|
||||||
image = "windows-server-2022-gui:current"
|
|
||||||
}
|
|
||||||
resource_class = "windows.large"
|
|
||||||
environment {
|
|
||||||
["JAVA_HOME"] = "/jdk"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,15 +15,17 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
extends "GradleJob.pkl"
|
extends "GradleJob.pkl"
|
||||||
|
|
||||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
|
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.0#/Config.pkl"
|
||||||
|
|
||||||
local self = this
|
local self = this
|
||||||
|
|
||||||
javaVersion = "17.0"
|
|
||||||
|
|
||||||
command: String
|
command: String
|
||||||
|
|
||||||
os = "linux"
|
job {
|
||||||
|
docker {
|
||||||
|
new { image = "cimg/openjdk:11.0" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
new Config.AttachWorkspaceStep { at = "." }
|
new Config.AttachWorkspaceStep { at = "." }
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
extends "GradleJob.pkl"
|
extends "GradleJob.pkl"
|
||||||
|
|
||||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
|
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.0#/Config.pkl"
|
||||||
|
|
||||||
|
javaVersion: "11.0"|"17.0"
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
new Config.RunStep {
|
new Config.RunStep {
|
||||||
@@ -23,3 +25,11 @@ steps {
|
|||||||
command = "./gradlew \(module.gradleArgs) check"
|
command = "./gradlew \(module.gradleArgs) check"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
job {
|
||||||
|
docker {
|
||||||
|
new {
|
||||||
|
image = "cimg/openjdk:\(javaVersion)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,38 +15,14 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
abstract module GradleJob
|
abstract module GradleJob
|
||||||
|
|
||||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
|
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.0#/Config.pkl"
|
||||||
import "package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.uri@1.0.3#/URI.pkl"
|
|
||||||
|
|
||||||
/// Whether this is a release build or not.
|
/// Whether this is a release build or not.
|
||||||
isRelease: Boolean = false
|
isRelease: Boolean = false
|
||||||
|
|
||||||
/// The OS to run on
|
|
||||||
os: "macOS"|"linux"|"windows"
|
|
||||||
|
|
||||||
/// The version of Java to use.
|
|
||||||
javaVersion: "17.0"|"21.0"
|
|
||||||
|
|
||||||
fixed javaVersionFull =
|
|
||||||
if (javaVersion == "17.0") "17.0.9+9"
|
|
||||||
else "21.0.5+11"
|
|
||||||
|
|
||||||
fixed jdkVersionAlt = javaVersionFull.replaceLast("+", "_")
|
|
||||||
|
|
||||||
fixed majorJdkVersion = javaVersionFull.split(".").first
|
|
||||||
|
|
||||||
fixed jdkGitHubReleaseName =
|
|
||||||
let (ver =
|
|
||||||
// 17.0.9+9 is missing some binaries (see https://github.com/adoptium/adoptium-support/issues/994)
|
|
||||||
if (javaVersionFull == "17.0.9+9" && os == "windows") "jdk-17.0.9+9.1"
|
|
||||||
else "jdk-\(javaVersionFull)"
|
|
||||||
)
|
|
||||||
URI.encodeComponent(ver)
|
|
||||||
|
|
||||||
fixed gradleArgs = new Listing {
|
fixed gradleArgs = new Listing {
|
||||||
"--info"
|
"--info"
|
||||||
"--stacktrace"
|
"--stacktrace"
|
||||||
"-DtestReportsDir=${HOME}/test-results"
|
|
||||||
when (isRelease) {
|
when (isRelease) {
|
||||||
"-DreleaseBuild=true"
|
"-DreleaseBuild=true"
|
||||||
}
|
}
|
||||||
@@ -57,42 +33,19 @@ steps: Listing<Config.Step>
|
|||||||
job: Config.Job = new {
|
job: Config.Job = new {
|
||||||
environment {
|
environment {
|
||||||
["LANG"] = "en_US.UTF-8"
|
["LANG"] = "en_US.UTF-8"
|
||||||
when (os == "windows") {
|
|
||||||
["JAVA_HOME"] = "/jdk"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
when (os == "linux") {
|
|
||||||
docker {
|
|
||||||
new {
|
|
||||||
image = "cimg/openjdk:\(javaVersion)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
when (os == "windows") {
|
|
||||||
machine {
|
|
||||||
image = "windows-server-2022-gui:current"
|
|
||||||
}
|
|
||||||
resource_class = "windows.large"
|
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
"checkout"
|
"checkout"
|
||||||
when (os == "windows") {
|
|
||||||
new Config.RunStep {
|
|
||||||
name = "Set up environment"
|
|
||||||
shell = "bash.exe"
|
|
||||||
command = #"""
|
|
||||||
# install jdk
|
|
||||||
curl -Lf \
|
|
||||||
https://github.com/adoptium/temurin\#(majorJdkVersion)-binaries/releases/download/\#(jdkGitHubReleaseName)/OpenJDK\#(majorJdkVersion)U-jdk_x64_windows_hotspot_\#(jdkVersionAlt).zip -o /tmp/jdk.zip
|
|
||||||
|
|
||||||
unzip /tmp/jdk.zip -d /tmp/jdk \
|
|
||||||
&& cd /tmp/jdk/jdk-* \
|
|
||||||
&& mkdir /jdk \
|
|
||||||
&& cp -r . /jdk
|
|
||||||
"""#
|
|
||||||
}
|
|
||||||
}
|
|
||||||
...module.steps
|
...module.steps
|
||||||
|
new Config.RunStep {
|
||||||
|
// find all test results and write them to the home dir
|
||||||
|
name = "Gather test results"
|
||||||
|
command = """
|
||||||
|
mkdir ~/test-results/
|
||||||
|
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/ \\;
|
||||||
|
"""
|
||||||
|
`when` = "always"
|
||||||
|
}
|
||||||
new Config.StoreTestResults {
|
new Config.StoreTestResults {
|
||||||
path = "~/test-results"
|
path = "~/test-results"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,16 +15,12 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
extends "GradleJob.pkl"
|
extends "GradleJob.pkl"
|
||||||
|
|
||||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
|
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.0#/Config.pkl"
|
||||||
|
|
||||||
name: String = command
|
name: String = command
|
||||||
|
|
||||||
command: String
|
command: String
|
||||||
|
|
||||||
os = "linux"
|
|
||||||
|
|
||||||
javaVersion = "17.0"
|
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
new Config.RunStep {
|
new Config.RunStep {
|
||||||
name = module.name
|
name = module.name
|
||||||
@@ -33,3 +29,9 @@ steps {
|
|||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
job {
|
||||||
|
docker {
|
||||||
|
new { image = "cimg/openjdk:11.0" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
# Auto-format Kotlin code
|
|
||||||
816cd483c8adf4c04e14236c173a1dc6bd2579ea
|
|
||||||
+1
-11
@@ -3,14 +3,4 @@
|
|||||||
|
|
||||||
/docs/** linguist-documentation
|
/docs/** linguist-documentation
|
||||||
|
|
||||||
*.pcf linguist-language=Pkl
|
*.pkl linguist-language=Groovy
|
||||||
PklProject linguist-language=Pkl
|
|
||||||
|
|
||||||
* text eol=lf
|
|
||||||
*.bat text eol=crlf
|
|
||||||
|
|
||||||
*.gif binary
|
|
||||||
*.jar binary
|
|
||||||
*.woff2 binary
|
|
||||||
*.pem binary
|
|
||||||
*.png binary
|
|
||||||
|
|||||||
@@ -8,17 +8,12 @@ generated/
|
|||||||
|
|
||||||
# IntelliJ
|
# IntelliJ
|
||||||
.idea/
|
.idea/
|
||||||
!.idea/icon.svg
|
|
||||||
!.idea/codestyles/
|
!.idea/codestyles/
|
||||||
!.idea/inspectionProfiles/
|
!.idea/inspectionProfiles/
|
||||||
!.idea/runConfigurations/
|
!.idea/runConfigurations/
|
||||||
!.idea/scopes/
|
!.idea/scopes/
|
||||||
!.idea/vcs.xml
|
!.idea/vcs.xml
|
||||||
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
.pkl-lsp/
|
|
||||||
|
|
||||||
# :pkl-core:makeIntelliJAntlrPluginHappy
|
# :pkl-core:makeIntelliJAntlrPluginHappy
|
||||||
gen/
|
gen/
|
||||||
PklLexer.tokens
|
PklLexer.tokens
|
||||||
|
|||||||
Generated
-23
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100.58 98.63">
|
|
||||||
<path d="m75.57,19.78l2.43-13.25c-3.69-2.46-7.7-4.42-11.91-5.83l-8.97,10.05c-4.37-.8-8.85-.83-13.23-.08L35.03.5c-4.23,1.35-8.26,3.26-11.99,5.68l2.26,13.28c-3.35,2.92-6.17,6.4-8.32,10.3l-13.46.58c-1.58,4.15-2.6,8.49-3.03,12.91l11.8,6.51c.19,4.44,1.16,8.81,2.86,12.92l-7.94,10.89c2.26,3.82,5.02,7.33,8.2,10.42l12.45-5.16c3.59,2.62,7.62,4.59,11.89,5.82l3.56,13c4.4.62,8.86.64,13.26.08l3.72-12.95c4.29-1.17,8.34-3.09,11.96-5.67l12.38,5.32c3.22-3.05,6.03-6.52,8.33-10.32l-7.8-10.99c1.75-4.08,2.78-8.45,3.03-12.88l11.88-6.36c-.38-4.42-1.34-8.78-2.87-12.95l-13.45-.75c-2.1-3.92-4.87-7.44-8.19-10.4Z"
|
|
||||||
style="fill:#6b9543; stroke-width:0px;"/>
|
|
||||||
<circle cx="51.05" cy="47.72" r="31.49" style="fill:#e9f4ca; stroke-width:0px;"/>
|
|
||||||
<g id="_Radial_Repeat_">
|
|
||||||
<path d="m28.79,62.54c8.22,14.22,24.82,18.97,20.85-10.47h0c-.31-2.29-1.56-4.35-3.45-5.68-24.66-17.36-26.37.64-17.4,16.15Zm15.42-8.25h0c.7-.17,1.24.13,1.49.83,3.27,9.16-2.6,12.49-6.71,10.44-3.77-1.88-3.77-9.01,5.22-11.27Zm-2.14-5.45c.48.57.47,1.19-.03,1.7h0c-6.44,6.67-12.62,3.1-12.37-1.09.27-4.58,6.09-8.01,12.4-.61Z"
|
|
||||||
style="fill:#c8d987; stroke-width:0px;"/>
|
|
||||||
<ellipse cx="38.62" cy="55.01" rx="7.64" ry="14.03" transform="translate(-22.33 26.68) rotate(-30)"
|
|
||||||
style="fill:#c8d987; stroke-width:0px;"/>
|
|
||||||
</g>
|
|
||||||
<g id="_Radial_Repeat_-2">
|
|
||||||
<path d="m49.34,21.03c-16.42.01-28.84,12.01-1.36,23.29h0c2.14.88,4.54.82,6.64-.15,27.37-12.67,12.63-23.16-5.29-23.15Zm-.56,17.48h0c-.2.69-.73,1.01-1.46.88-9.57-1.75-9.52-8.5-5.69-11.03,3.51-2.32,9.69,1.24,7.15,10.16Zm5.79.87c-.73.13-1.27-.18-1.46-.88h0c-2.56-8.91,3.62-12.48,7.13-10.17,3.83,2.53,3.9,9.28-5.67,11.04Z"
|
|
||||||
style="fill:#c8d987; stroke-width:0px;"/>
|
|
||||||
<ellipse cx="50.94" cy="33.31" rx="14.03" ry="7.64" style="fill:#c8d987; stroke-width:0px;"/>
|
|
||||||
</g>
|
|
||||||
<g id="_Radial_Repeat_-3">
|
|
||||||
<path d="m75.02,59.59c8.2-14.23,4.02-30.98-19.5-12.82h0c-1.83,1.41-2.99,3.52-3.19,5.83-2.71,30.04,13.74,22.52,22.69,7Zm-14.86-9.23h0c-.5-.52-.51-1.14-.03-1.7,6.3-7.41,12.12-3.99,12.4.59.26,4.2-5.92,7.77-12.37,1.11Zm-3.65,4.58c.25-.7.79-1,1.49-.83h0c8.99,2.24,9,9.38,5.24,11.26-4.1,2.05-9.98-1.26-6.73-10.43Z"
|
|
||||||
style="fill:#c8d987; stroke-width:0px;"/>
|
|
||||||
<ellipse cx="63.58" cy="54.83" rx="14.03" ry="7.64" transform="translate(-15.7 82.48) rotate(-60)"
|
|
||||||
style="fill:#c8d987; stroke-width:0px;"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB |
-31
@@ -15,37 +15,6 @@
|
|||||||
<inspection_tool class="FieldMayBeFinal" enabled="true" level="INFORMATION" enabled_by_default="true">
|
<inspection_tool class="FieldMayBeFinal" enabled="true" level="INFORMATION" enabled_by_default="true">
|
||||||
<scope name="AllExceptTruffleAst" level="WARNING" enabled="true" />
|
<scope name="AllExceptTruffleAst" level="WARNING" enabled="true" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="HttpUrlsUsage" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
|
||||||
<option name="ignoredUrls">
|
|
||||||
<list>
|
|
||||||
<option value="http://" />
|
|
||||||
<option value="http://0.0.0.0" />
|
|
||||||
<option value="http://127.0.0.1" />
|
|
||||||
<option value="http://activemq.apache.org/schema/" />
|
|
||||||
<option value="http://cxf.apache.org/schemas/" />
|
|
||||||
<option value="http://java.sun.com/" />
|
|
||||||
<option value="http://javafx.com/fxml" />
|
|
||||||
<option value="http://javafx.com/javafx/" />
|
|
||||||
<option value="http://json-schema.org/draft" />
|
|
||||||
<option value="http://localhost" />
|
|
||||||
<option value="http://maven.apache.org/POM/" />
|
|
||||||
<option value="http://maven.apache.org/xsd/" />
|
|
||||||
<option value="http://primefaces.org/ui" />
|
|
||||||
<option value="http://schema.cloudfoundry.org/spring/" />
|
|
||||||
<option value="http://schemas.xmlsoap.org/" />
|
|
||||||
<option value="http://tiles.apache.org/" />
|
|
||||||
<option value="http://www.ibm.com/webservices/xsd" />
|
|
||||||
<option value="http://www.jboss.com/xml/ns/" />
|
|
||||||
<option value="http://www.jboss.org/j2ee/schema/" />
|
|
||||||
<option value="http://www.springframework.org/schema/" />
|
|
||||||
<option value="http://www.springframework.org/security/tags" />
|
|
||||||
<option value="http://www.springframework.org/tags" />
|
|
||||||
<option value="http://www.thymeleaf.org" />
|
|
||||||
<option value="http://www.w3.org/" />
|
|
||||||
<option value="http://xmlns.jcp.org/" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="JavadocBlankLines" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="JavadocBlankLines" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="NullableProblems" enabled="true" level="WARNING" enabled_by_default="false">
|
<inspection_tool class="NullableProblems" enabled="true" level="WARNING" enabled_by_default="false">
|
||||||
<scope name="AllExceptGenerated" level="WARNING" enabled="true">
|
<scope name="AllExceptGenerated" level="WARNING" enabled="true">
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
<component name="DependencyValidationManager">
|
<component name="DependencyValidationManager">
|
||||||
<scope name="AllExceptTruffleAst" pattern="(src:*..*||test:*..*||lib:*..*)&&!src[pkl.pkl-core.main]:org.pkl.core.ast..*&&!src[pkl.pkl-core.main]:org.pkl.core.stdlib..*Nodes" />
|
<scope name="AllExceptTruffleAst" pattern="(src:*..*||test:*..*||lib:*..*)&&!src[pkl.pkl-core.main]:com.apple.pkl.core.ast..*&&!src[pkl.pkl-core.main]:com.apple.pkl.core.stdlib..*Nodes" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## Code of Conduct
|
== Code of Conduct
|
||||||
|
|
||||||
### Our Pledge
|
=== Our Pledge
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
contributors and maintainers pledge to making participation in our
|
contributors and maintainers pledge to making participation in our
|
||||||
@@ -10,7 +10,7 @@ characteristics, gender identity and expression, level of experience,
|
|||||||
education, socio-economic status, nationality, personal appearance,
|
education, socio-economic status, nationality, personal appearance,
|
||||||
race, religion, or sexual identity and orientation.
|
race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
### Our Standards
|
=== Our Standards
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment
|
Examples of behavior that contributes to creating a positive environment
|
||||||
include:
|
include:
|
||||||
@@ -33,7 +33,7 @@ electronic address, without explicit permission
|
|||||||
* Other conduct which could reasonably be considered inappropriate in a
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
professional setting
|
professional setting
|
||||||
|
|
||||||
### Our Responsibilities
|
=== Our Responsibilities
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of
|
Project maintainers are responsible for clarifying the standards of
|
||||||
acceptable behavior and are expected to take appropriate and fair
|
acceptable behavior and are expected to take appropriate and fair
|
||||||
@@ -45,7 +45,7 @@ contributions that are not aligned to this Code of Conduct, or to ban
|
|||||||
temporarily or permanently any contributor for other behaviors that they
|
temporarily or permanently any contributor for other behaviors that they
|
||||||
deem inappropriate, threatening, offensive, or harmful.
|
deem inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
### Scope
|
=== Scope
|
||||||
|
|
||||||
This Code of Conduct applies within all project spaces, and it also
|
This Code of Conduct applies within all project spaces, and it also
|
||||||
applies when an individual is representing the project or its community
|
applies when an individual is representing the project or its community
|
||||||
@@ -55,7 +55,7 @@ official social media account, or acting as an appointed representative
|
|||||||
at an online or offline event. Representation of a project may be
|
at an online or offline event. Representation of a project may be
|
||||||
further defined and clarified by project maintainers.
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
### Enforcement
|
=== Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may
|
Instances of abusive, harassing, or otherwise unacceptable behavior may
|
||||||
be reported by contacting the open source team at
|
be reported by contacting the open source team at
|
||||||
@@ -70,8 +70,9 @@ Project maintainers who do not follow or enforce the Code of Conduct in
|
|||||||
good faith may face temporary or permanent repercussions as determined
|
good faith may face temporary or permanent repercussions as determined
|
||||||
by other members of the project’s leadership.
|
by other members of the project’s leadership.
|
||||||
|
|
||||||
### Attribution
|
=== Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the
|
This Code of Conduct is adapted from the
|
||||||
[Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
|
https://www.contributor-covenant.org[Contributor Covenant], version 1.4,
|
||||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
available at
|
||||||
|
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
+11
-41
@@ -2,21 +2,18 @@
|
|||||||
:uri-gng: https://gng.dsun.org
|
:uri-gng: https://gng.dsun.org
|
||||||
:uri-jenv: https://www.jenv.be
|
:uri-jenv: https://www.jenv.be
|
||||||
:uri-intellij: https://www.jetbrains.com/idea/download/
|
:uri-intellij: https://www.jetbrains.com/idea/download/
|
||||||
:uri-jdk: https://adoptopenjdk.net/releases.html?variant=openjdk17
|
:uri-jdk: https://adoptopenjdk.net/releases.html
|
||||||
:uri-native-prerequisites-linux: https://www.graalvm.org/latest/getting-started/linux/#prerequisites-for-native-image-on-linux
|
|
||||||
:uri-native-prerequisites-windows: https://www.graalvm.org/latest/getting-started/windows/#prerequisites-for-native-image-on-windows
|
|
||||||
|
|
||||||
== Setup
|
== Setup
|
||||||
|
|
||||||
. (mandatory) Install {uri-jdk}[OpenJDK 17] or higher
|
. (mandatory) Install {uri-jdk}[OpenJDK 11 HotSpot] (as long as we support JDK11)
|
||||||
. (recommended) Install {uri-intellij}[IntelliJ IDEA] +
|
. (mandatory) Setup Gradle on your system
|
||||||
|
. (recommended) Install {uri-intellij}[IntelliJ IDEA 2023.x] +
|
||||||
To import the project into IntelliJ, go to File->Open and select the project's root directory.
|
To import the project into IntelliJ, go to File->Open and select the project's root directory.
|
||||||
If the project is opened but not imported, look for a popup in the lower right corner
|
If the project is opened but not imported, look for a popup in the lower right corner
|
||||||
and click its "Import Gradle Project" link.
|
and click its "Import Gradle Project" link.
|
||||||
. (recommended) Install {uri-gng}[gng] +
|
. (recommended) Install {uri-gng}[gng] +
|
||||||
_gng_ enables to run Gradle commands with `gw` (instead of `./gradlew`) from any subdirectory.
|
_gng_ enables to run Gradle commands with `gw` (instead of `./gradlew`) from any subdirectory.
|
||||||
. (recommended) Set up Git ignore-revs +
|
|
||||||
`git config blame.ignoreRevsFile .git-blame-ignore-revs`
|
|
||||||
. (recommended) Install {uri-jenv}[jenv] and plugins +
|
. (recommended) Install {uri-jenv}[jenv] and plugins +
|
||||||
_jenv_ use specific JDK versions in certain subdirectories. _Pkl_ comes with a `.java-version` file specifying JDK 17. +
|
_jenv_ use specific JDK versions in certain subdirectories. _Pkl_ comes with a `.java-version` file specifying JDK 17. +
|
||||||
Enable _jenv_ plugins for better handling by `gradle`:
|
Enable _jenv_ plugins for better handling by `gradle`:
|
||||||
@@ -26,39 +23,20 @@ Enable _jenv_ plugins for better handling by `gradle`:
|
|||||||
jenv enable-plugin gradle
|
jenv enable-plugin gradle
|
||||||
jenv enable-plugin export
|
jenv enable-plugin export
|
||||||
----
|
----
|
||||||
. (optional) If you've named the original apple/pkl git repository something other than `origin`, set env var `PKL_ORIGINAL_REMOTE_NAME` to that name in your `.bashrc`, `.zshrc`, `config.fish` or however you manage your local environment.
|
|
||||||
+
|
|
||||||
This will allow spotless to pick the correct starting branch when formatting source code files.
|
|
||||||
Otherwise, you might see that _every_ file has its copyright year updated.
|
|
||||||
|
|
||||||
=== Additional Linux Setup
|
|
||||||
. (optional) To build the native executable (`./gradlew buildNative`),
|
|
||||||
install {uri-native-prerequisites-linux}[Prerequisites For Native Image on Linux].
|
|
||||||
|
|
||||||
=== Additional Windows Setup
|
|
||||||
. (optional) Go to `System->For developers` and enable `Developer Mode`.
|
|
||||||
Otherwise, some tests may fail due to insufficient file system privileges.
|
|
||||||
. (optional) To build the native executable (`./gradlew buildNative`),
|
|
||||||
install {uri-native-prerequisites-windows}[Prerequisites For Native Image on Windows].
|
|
||||||
|
|
||||||
== Common Build Commands
|
== Common Build Commands
|
||||||
|
|
||||||
[source,shell]
|
[source,shell]
|
||||||
----
|
----
|
||||||
gw clean
|
gw clean
|
||||||
gw test # run all tests except native executable tests
|
gw test
|
||||||
gw testNative # run native executable tests
|
|
||||||
gw spotlessApply # fix code formatting
|
|
||||||
gw build # build everything except native executables
|
gw build # build everything except native executables
|
||||||
gw buildNative # build native executable(s) for current platform
|
gw buildNative # build macOS executable on macOS,
|
||||||
# (Alpine executable is only built if ~/staticdeps/bin/musl-gcc exists)
|
# Linux and Alpine executables on Linux
|
||||||
|
gw pkldoc # generate standard library docs
|
||||||
|
|
||||||
pkl-cli/build/executable/jpkl # run Java executable
|
pkl-cli/build/executable/jpkl # run Java executable
|
||||||
pkl-cli/build/executable/pkl-macos-aarch64 # run Mac executable
|
pkl-cli/build/executable/pkl-macos-amd64 # run Mac executable
|
||||||
pkl-cli/build/executable/pkl-macos-amd64 # run Intel Mac executable
|
|
||||||
pkl-cli/build/executable/pkl-linux-amd64 # run Linux executable
|
|
||||||
pkl-cli/build/executable/pkl-alpine-linux-amd64 # run Alpine Linux executable
|
|
||||||
pkl-cli/build/executable/pkl-windows-amd64.exe # run Windows executable
|
|
||||||
----
|
----
|
||||||
|
|
||||||
== Update Gradle
|
== Update Gradle
|
||||||
@@ -87,19 +65,11 @@ based on version information from https://search.maven.org, https://plugins.grad
|
|||||||
* ANTLR code generation is performed by task `:pkl-core:generateGrammarSource`
|
* ANTLR code generation is performed by task `:pkl-core:generateGrammarSource`
|
||||||
** Output dir is `generated/antlr/`
|
** Output dir is `generated/antlr/`
|
||||||
|
|
||||||
== Remote JVM Debugging
|
|
||||||
|
|
||||||
To enable remote JVM debugging when running Gradle tasks (e.g. test), add the flag `-Djvmdebug=true`.
|
|
||||||
This will listen on port 5005.
|
|
||||||
|
|
||||||
Example: `./gradlew test -Djvmdebug=true`
|
|
||||||
|
|
||||||
== Resources
|
== Resources
|
||||||
For automated build setup examples see our https://github.com/apple/pkl/blob/main/.circleci/[CircleCI] jobs like our https://github.com/apple/pkl/blob/main/.circleci/jobs/BuildNativeJob.pkl[BuildNativeJob.pkl], where we build Pkl automatically.
|
|
||||||
|
|
||||||
=== ANTLR
|
=== ANTLR
|
||||||
|
|
||||||
* https://github.com/antlr/antlr4/blob/master/doc/index.md[Documentation]
|
* https://github.com/antlr/antlr4/blob/main/doc/index.md[Documentation]
|
||||||
* https://groups.google.com/forum/#!forum/antlr-discussion[Forums]
|
* https://groups.google.com/forum/#!forum/antlr-discussion[Forums]
|
||||||
* https://github.com/mobileink/lab.clj.antlr/tree/main/doc[Some third-party docs]
|
* https://github.com/mobileink/lab.clj.antlr/tree/main/doc[Some third-party docs]
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Copyright © 2024-2025 Apple Inc. and the Pkl project authors
|
Copyright © 2024 Apple Inc. and the Pkl project authors
|
||||||
|
|
||||||
|
|
||||||
Portions of this software were originally based on 'SnakeYAML' developed by Andrey Somov.
|
Portions of this software were originally based on 'SnakeYAML' developed by Andrey Somov.
|
||||||
|
|||||||
+1
-78
@@ -1,4 +1,4 @@
|
|||||||
= image:.idea/icon.svg[Pkl,30] Pkl
|
= Pkl
|
||||||
|
|
||||||
:uri-homepage: https://pkl-lang.org
|
:uri-homepage: https://pkl-lang.org
|
||||||
:uri-docs: {uri-homepage}/main/current
|
:uri-docs: {uri-homepage}/main/current
|
||||||
@@ -11,8 +11,6 @@
|
|||||||
:uri-pkl-examples: https://pkl-lang.org/main/current/examples.html
|
:uri-pkl-examples: https://pkl-lang.org/main/current/examples.html
|
||||||
:uri-installation: https://pkl-lang.org/main/current/pkl-cli/index.html#installation
|
:uri-installation: https://pkl-lang.org/main/current/pkl-cli/index.html#installation
|
||||||
:uri-lang-reference: https://pkl-lang.org/main/current/language-reference/index.html
|
:uri-lang-reference: https://pkl-lang.org/main/current/language-reference/index.html
|
||||||
:uri-ci-artifacts: https://s01.oss.sonatype.org/content/groups/public/org/pkl-lang/
|
|
||||||
:uri-ci-pipeline: https://app.circleci.com/pipelines/github/apple/pkl
|
|
||||||
|
|
||||||
A configuration as code language with rich validation and tooling.
|
A configuration as code language with rich validation and tooling.
|
||||||
|
|
||||||
@@ -36,78 +34,3 @@ We'd love to hear from you!
|
|||||||
|
|
||||||
* Create an {uri-github-issue}[issue]
|
* Create an {uri-github-issue}[issue]
|
||||||
* Ask a question on {uri-github-discussions}[GitHub Discussions]
|
* Ask a question on {uri-github-discussions}[GitHub Discussions]
|
||||||
|
|
||||||
== Development image:https://circleci.com/gh/apple/pkl.svg?style=svg["Apple", link="https://app.circleci.com/pipelines/github/apple/pkl"]
|
|
||||||
* link:CONTRIBUTING.adoc[] for tips on pull requests and filing issues
|
|
||||||
* link:DEVELOPMENT.adoc[] for build instructions
|
|
||||||
* {uri-ci-artifacts}[Sonatype Repository] for the artifacts/binaries built by our {uri-ci-pipeline}[CI pipelines] (and those of our other tools and packages repositories).
|
|
||||||
|
|
||||||
== Pkl GitHub Repositories
|
|
||||||
|
|
||||||
[%autowidth]
|
|
||||||
|===
|
|
||||||
|Name |Description
|
|
||||||
|
|
||||||
|`apple/pkl`
|
|
||||||
|A configuration as code language with rich validation and tooling.
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-evolution[`apple/pkl-evolution`]
|
|
||||||
|Suggested Pkl Improvements, Changes, or Enhancements (SPICEs)
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-go[`apple/pkl-go`]
|
|
||||||
|Pkl bindings for the Go programming language
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-go-examples[`apple/pkl-go-examples`]
|
|
||||||
|Examples for using Pkl within Go applications
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-intellij[`apple/pkl-intellij`]
|
|
||||||
|JetBrains editor plugins providing Pkl language support
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-jvm-examples[`apple/pkl-jvm-examples`]
|
|
||||||
|Examples for using Pkl within JVM applications
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-k8s[`apple/pkl-k8s`]
|
|
||||||
|Templates for using Pkl with Kubernetes
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-k8s-examples[`apple/pkl-k8s-examples`]
|
|
||||||
|Examples for using Pkl with Kubernetes
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-lang.org[`apple/pkl-lang.org`]
|
|
||||||
|The pkl-lang.org website
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-lsp[`apple/pkl-lsp`]
|
|
||||||
| Language server for Pkl, implementing the server-side of the Language Server Protocol
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-neovim[`apple/pkl-neovim`]
|
|
||||||
|Pkl language support for Neovim
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-package-docs[`apple/pkl-package-docs`]
|
|
||||||
|Documentation for Pkl packages
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-pantry[`apple/pkl-pantry`]
|
|
||||||
|Shared Pkl packages
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-project-commons[`apple/pkl-project-commons`]
|
|
||||||
|Utility libraries for Pkl
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-spring[`apple/pkl-spring`]
|
|
||||||
|Spring Boot extension for configuring Boot apps with Pkl
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-swift[`apple/pkl-swift`]
|
|
||||||
|Pkl bindings for the Swift programming language
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-swift-examples[`apple/pkl-swift-examples`]
|
|
||||||
|Examples for using Pkl within Swift applications
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl-vscode[`apple/pkl-vscode`]
|
|
||||||
|Pkl language support for VS Code
|
|
||||||
|
|
||||||
|https://github.com/apple/pkl.tmbundle[`apple/pkl.tmbundle`]
|
|
||||||
|TextMate bundle for Pkl
|
|
||||||
|
|
||||||
|https://github.com/apple/rules_pkl[`apple/rules_pkl`]
|
|
||||||
| Bazel build rules for Pkl
|
|
||||||
|
|
||||||
|https://github.com/apple/tree-sitter-pkl[`apple/tree-sitter-pkl`]
|
|
||||||
|Tree-sitter parser for Pkl
|
|
||||||
|===
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# Security
|
= Security
|
||||||
|
|
||||||
For the protection of our community, the Pkl team does not disclose, discuss, or confirm security issues until our investigation is complete and any necessary updates are generally available.
|
For the protection of our community, the Pkl team does not disclose, discuss, or confirm security issues until our investigation is complete and any necessary updates are generally available.
|
||||||
|
|
||||||
## Reporting a security vulnerability
|
== Reporting a security vulnerability
|
||||||
|
|
||||||
If you have discovered a security vulnerability within the Pkl project, please report it to us.
|
If you have discovered a security vulnerability within the Pkl project, please report it to us.
|
||||||
We welcome reports from everyone, including security researchers, developers, and users.
|
We welcome reports from everyone, including security researchers, developers, and users.
|
||||||
|
|
||||||
Security vulnerabilities may be reported on the [Report a vulnerability](https://security.apple.com/submit) form.
|
Security vulnerabilities may be reported on the link:https://security.apple.com/submit[Report a vulnerability] form.
|
||||||
When submitting a vulnerability, select "Apple Devices and Software" as the affected platform, and "Open Source" as the affected area.
|
When submitting a vulnerability, select "Apple Devices and Software" as the affected platform, and "Open Source" as the affected area.
|
||||||
|
|
||||||
For more information, see https://pkl-lang.org/security.html.
|
For more information, see https://pkl-lang.org/security.html.
|
||||||
+14
-27
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
plugins {
|
plugins {
|
||||||
pklAllProjects
|
pklAllProjects
|
||||||
pklJavaLibrary
|
pklJavaLibrary
|
||||||
@@ -25,7 +10,7 @@ val graal: Configuration by configurations.creating
|
|||||||
|
|
||||||
@Suppress("UnstableApiUsage")
|
@Suppress("UnstableApiUsage")
|
||||||
dependencies {
|
dependencies {
|
||||||
jmh(projects.pklCore)
|
jmh(project(":pkl-core"))
|
||||||
// necessary because antlr4-runtime is declared as implementation dependency in pkl-core.gradle
|
// necessary because antlr4-runtime is declared as implementation dependency in pkl-core.gradle
|
||||||
jmh(libs.antlrRuntime)
|
jmh(libs.antlrRuntime)
|
||||||
truffle(libs.truffleApi)
|
truffle(libs.truffleApi)
|
||||||
@@ -33,15 +18,14 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jmh {
|
jmh {
|
||||||
// include = ["fib_class_java"]
|
//include = ["fib_class_java"]
|
||||||
// include = ["fib_class_constrained1", "fib_class_constrained2"]
|
//include = ["fib_class_constrained1", "fib_class_constrained2"]
|
||||||
jmhVersion.set(libs.versions.jmh)
|
jmhVersion.set(libs.versions.jmh)
|
||||||
// jvmArgsAppend = "-Dgraal.TruffleCompilationExceptionsAreFatal=true " +
|
// jvmArgsAppend = "-Dgraal.TruffleCompilationExceptionsAreFatal=true " +
|
||||||
// "-Dgraal.Dump=Truffle,TruffleTree -Dgraal.TraceTruffleCompilation=true " +
|
// "-Dgraal.Dump=Truffle,TruffleTree -Dgraal.TraceTruffleCompilation=true " +
|
||||||
// "-Dgraal.TruffleFunctionInlining=false"
|
// "-Dgraal.TruffleFunctionInlining=false"
|
||||||
jvm.set("${buildInfo.graalVmAmd64.baseDir}/bin/java")
|
jvm.set("${buildInfo.graalVm.baseDir}/bin/java")
|
||||||
// see:
|
// see: https://docs.oracle.com/en/graalvm/enterprise/20/docs/graalvm-as-a-platform/implement-language/#disable-class-path-separation
|
||||||
// https://docs.oracle.com/en/graalvm/enterprise/20/docs/graalvm-as-a-platform/implement-language/#disable-class-path-separation
|
|
||||||
jvmArgs.set(
|
jvmArgs.set(
|
||||||
listOf(
|
listOf(
|
||||||
// one JVM arg per list element doesn't work, but the following does
|
// one JVM arg per list element doesn't work, but the following does
|
||||||
@@ -49,13 +33,16 @@ jmh {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
includeTests.set(false)
|
includeTests.set(false)
|
||||||
// threads = Runtime.runtime.availableProcessors() / 2 + 1
|
//threads = Runtime.runtime.availableProcessors() / 2 + 1
|
||||||
// synchronizeIterations = false
|
//synchronizeIterations = false
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("jmh") { dependsOn(":installGraalVmAmd64") }
|
tasks.named("jmh") {
|
||||||
|
dependsOn(":installGraalVm")
|
||||||
|
}
|
||||||
|
|
||||||
// Prevent this error which occurs when building in IntelliJ:
|
// Prevent this error which occurs when building in IntelliJ:
|
||||||
// "Entry org/pkl/core/fib_class_typed.pkl is a duplicate but no duplicate handling strategy has
|
// "Entry org/pkl/core/fib_class_typed.pkl is a duplicate but no duplicate handling strategy has been set."
|
||||||
// been set."
|
tasks.processJmhResources {
|
||||||
tasks.processJmhResources { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
}
|
||||||
|
|||||||
+18
-19
@@ -2,15 +2,15 @@
|
|||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.tunnelvisionlabs:antlr4-runtime:4.9.0=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
com.tunnelvisionlabs:antlr4-runtime:4.9.0=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
net.bytebuddy:byte-buddy:1.14.18=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
net.sf.jopt-simple:jopt-simple:5.0.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
net.sf.jopt-simple:jopt-simple:5.0.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.apache.commons:commons-math3:3.6.1=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.apache.commons:commons-math3:3.2=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.26.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.compiler:compiler:23.0.6=graal
|
org.graalvm.compiler:compiler:22.3.1=graal
|
||||||
org.graalvm.sdk:graal-sdk:23.0.6=graal,jmh,jmhRuntimeClasspath,truffle
|
org.graalvm.sdk:graal-sdk:22.3.1=graal,jmh,jmhRuntimeClasspath,truffle
|
||||||
org.graalvm.truffle:truffle-api:23.0.6=graal,jmh,jmhRuntimeClasspath,truffle
|
org.graalvm.truffle:truffle-api:22.3.1=graal,jmh,jmhRuntimeClasspath,truffle
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
@@ -26,19 +26,18 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=testCompileClasspath,testImplemen
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains:annotations:13.0=kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.11.3=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-params:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-commons:1.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.platform:junit-platform-engine:1.11.3=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-engine:1.9.3=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit:junit-bom:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.msgpack:msgpack-core:0.9.8=jmh,jmhRuntimeClasspath
|
org.openjdk.jmh:jmh-core:1.36=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.openjdk.jmh:jmh-core:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.openjdk.jmh:jmh-generator-asm:1.36=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.openjdk.jmh:jmh-generator-asm:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.openjdk.jmh:jmh-generator-bytecode:1.36=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.openjdk.jmh:jmh-generator-bytecode:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.openjdk.jmh:jmh-generator-reflection:1.36=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.openjdk.jmh:jmh-generator-reflection:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.organicdesign:Paguro:3.10.3=jmh,jmhRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=jmh,jmhRuntimeClasspath
|
||||||
org.ow2.asm:asm:9.0=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.ow2.asm:asm:9.0=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.snakeyaml:snakeyaml-engine:2.5=jmh,jmhRuntimeClasspath
|
org.snakeyaml:snakeyaml-engine:2.5=jmh,jmhRuntimeClasspath
|
||||||
empty=annotationProcessor,apiDependenciesMetadata,compileClasspath,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,jmhAnnotationProcessor,jmhApiDependenciesMetadata,jmhCompileOnlyDependenciesMetadata,jmhIntransitiveDependenciesMetadata,jmhKotlinScriptDef,jmhKotlinScriptDefExtensions,jmhRuntimeOnlyDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtimeClasspath,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions
|
empty=annotationProcessor,apiDependenciesMetadata,archives,compile,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,default,implementationDependenciesMetadata,intransitiveDependenciesMetadata,jmhAnnotationProcessor,jmhApiDependenciesMetadata,jmhCompile,jmhCompileOnly,jmhCompileOnlyDependenciesMetadata,jmhIntransitiveDependenciesMetadata,jmhKotlinScriptDef,jmhKotlinScriptDefExtensions,jmhRuntime,jmhRuntimeOnlyDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeClasspath,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -23,7 +23,6 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import org.openjdk.jmh.annotations.*;
|
import org.openjdk.jmh.annotations.*;
|
||||||
import org.openjdk.jmh.util.TempFile;
|
import org.openjdk.jmh.util.TempFile;
|
||||||
import org.openjdk.jmh.util.TempFileManager;
|
import org.openjdk.jmh.util.TempFileManager;
|
||||||
import org.pkl.core.http.HttpClient;
|
|
||||||
import org.pkl.core.module.ModuleKeyFactories;
|
import org.pkl.core.module.ModuleKeyFactories;
|
||||||
import org.pkl.core.repl.ReplRequest;
|
import org.pkl.core.repl.ReplRequest;
|
||||||
import org.pkl.core.repl.ReplResponse;
|
import org.pkl.core.repl.ReplResponse;
|
||||||
@@ -40,7 +39,6 @@ public class ListSort {
|
|||||||
private static final ReplServer repl =
|
private static final ReplServer repl =
|
||||||
new ReplServer(
|
new ReplServer(
|
||||||
SecurityManagers.defaultManager,
|
SecurityManagers.defaultManager,
|
||||||
HttpClient.dummyClient(),
|
|
||||||
Loggers.stdErr(),
|
Loggers.stdErr(),
|
||||||
List.of(ModuleKeyFactories.standardLibrary),
|
List.of(ModuleKeyFactories.standardLibrary),
|
||||||
List.of(ResourceReaders.file()),
|
List.of(ResourceReaders.file()),
|
||||||
@@ -50,8 +48,7 @@ public class ListSort {
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
IoUtils.getCurrentWorkingDir(),
|
IoUtils.getCurrentWorkingDir(),
|
||||||
StackFrameTransformers.defaultTransformer,
|
StackFrameTransformers.defaultTransformer);
|
||||||
false);
|
|
||||||
private static final List<Object> list = new ArrayList<>(100000);
|
private static final List<Object> list = new ArrayList<>(100000);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -112,10 +109,10 @@ public class ListSort {
|
|||||||
// append `.length` to avoid rendering the list
|
// append `.length` to avoid rendering the list
|
||||||
new ReplRequest.Eval("sort", "nums.sortWith(cmp).length", false, false))
|
new ReplRequest.Eval("sort", "nums.sortWith(cmp).length", false, false))
|
||||||
.get(0);
|
.get(0);
|
||||||
if (!(response instanceof ReplResponse.EvalSuccess success)) {
|
if (!(response instanceof ReplResponse.EvalSuccess)) {
|
||||||
throw new AssertionError(response);
|
throw new AssertionError(response);
|
||||||
}
|
}
|
||||||
return success.getResult();
|
return ((ReplResponse.EvalSuccess) response).getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
// note that this is an uneven comparison
|
// note that this is an uneven comparison
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -30,31 +30,30 @@ public class ParserBenchmark {
|
|||||||
public void run() {
|
public void run() {
|
||||||
new Parser()
|
new Parser()
|
||||||
.parseModule(
|
.parseModule(
|
||||||
"""
|
"a1 {\n"
|
||||||
a1 {
|
+ " a2 {\n"
|
||||||
a2 {
|
+ " a3 {\n"
|
||||||
a3 {
|
+ " a4 {\n"
|
||||||
a4 {
|
+ " a5 {\n"
|
||||||
a5 {
|
+ " a6 {\n"
|
||||||
a6 {
|
+ " a7 {\n"
|
||||||
a7 {
|
+ " a8 {\n"
|
||||||
a8 {
|
+ " a9 {\n"
|
||||||
a9 {
|
+ " a10 {\n"
|
||||||
a10 {
|
+ " a11 {\n"
|
||||||
a11 {
|
+ " a12 {\n"
|
||||||
a12 {
|
+ " a13 = map(map(map((x) -> 1)))\n"
|
||||||
a13 = map(map(map((x) -> 1)))
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ " }\n"
|
||||||
}
|
+ "}");
|
||||||
}""");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-22
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
// https://youtrack.jetbrains.com/issue/KTIJ-19369
|
// https://youtrack.jetbrains.com/issue/KTIJ-19369
|
||||||
@file:Suppress("DSL_SCOPE_VIOLATION")
|
@file:Suppress("DSL_SCOPE_VIOLATION")
|
||||||
|
|
||||||
@@ -55,12 +40,15 @@ idea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val clean by tasks.existing { delete(layout.buildDirectory) }
|
val clean by tasks.registering(Delete::class) {
|
||||||
|
delete(buildDir)
|
||||||
|
}
|
||||||
|
|
||||||
val printVersion by tasks.registering { doFirst { println(buildInfo.pklVersion) } }
|
val printVersion by tasks.registering {
|
||||||
|
doFirst { println(buildInfo.pklVersion) }
|
||||||
|
}
|
||||||
|
|
||||||
val message =
|
val message = """
|
||||||
"""
|
|
||||||
====
|
====
|
||||||
Gradle version : ${gradle.gradleVersion}
|
Gradle version : ${gradle.gradleVersion}
|
||||||
Java version : ${System.getProperty("java.version")}
|
Java version : ${System.getProperty("java.version")}
|
||||||
@@ -75,7 +63,5 @@ Git Commit ID : ${buildInfo.commitId}
|
|||||||
====
|
====
|
||||||
"""
|
"""
|
||||||
|
|
||||||
val formattedMessage =
|
val formattedMessage = message.replace("\n====", "\n" + "=".repeat(message.lines().maxByOrNull { it.length }!!.length))
|
||||||
message.replace("\n====", "\n" + "=".repeat(message.lines().maxByOrNull { it.length }!!.length))
|
|
||||||
|
|
||||||
logger.info(formattedMessage)
|
logger.info(formattedMessage)
|
||||||
|
|||||||
@@ -1,34 +1,17 @@
|
|||||||
/*
|
plugins {
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
`kotlin-dsl`
|
||||||
*
|
}
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
plugins { `kotlin-dsl` }
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.downloadTaskPlugin)
|
implementation(libs.downloadTaskPlugin)
|
||||||
implementation(libs.spotlessPlugin)
|
implementation(libs.spotlessPlugin)
|
||||||
implementation(libs.kotlinPlugin) { exclude(module = "kotlin-android-extensions") }
|
implementation(libs.kotlinPlugin) {
|
||||||
|
exclude(module = "kotlin-android-extensions")
|
||||||
|
}
|
||||||
implementation(libs.shadowPlugin)
|
implementation(libs.shadowPlugin)
|
||||||
|
|
||||||
// fix from the Gradle team: makes version catalog symbols available in build scripts
|
|
||||||
// see here for more: https://github.com/gradle/gradle/issues/15383
|
|
||||||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin { target { compilations.configureEach { kotlinOptions { jvmTarget = "17" } } } }
|
|
||||||
|
|||||||
@@ -1,22 +1,5 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
@file:Suppress("UnstableApiUsage")
|
@file:Suppress("UnstableApiUsage")
|
||||||
|
|
||||||
rootProject.name = "buildSrc"
|
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -27,7 +10,11 @@ pluginManagement {
|
|||||||
// makes ~/.gradle/init.gradle unnecessary and ~/.gradle/gradle.properties optional
|
// makes ~/.gradle/init.gradle unnecessary and ~/.gradle/gradle.properties optional
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
// use same version catalog as main build
|
// use same version catalog as main build
|
||||||
versionCatalogs { register("libs") { from(files("../gradle/libs.versions.toml")) } }
|
versionCatalogs {
|
||||||
|
register("libs") {
|
||||||
|
from(files("../gradle/libs.versions.toml"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||||
|
|||||||
@@ -1,63 +1,81 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
@file:Suppress("MemberVisibilityCanBePrivate")
|
@file:Suppress("MemberVisibilityCanBePrivate")
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.artifacts.VersionCatalog
|
import org.gradle.api.artifacts.VersionCatalog
|
||||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
import org.gradle.api.artifacts.VersionCatalogsExtension
|
||||||
|
import org.gradle.api.artifacts.VersionConstraint
|
||||||
import org.gradle.kotlin.dsl.getByType
|
import org.gradle.kotlin.dsl.getByType
|
||||||
|
|
||||||
// `buildInfo` in main build scripts
|
// `buildInfo` in main build scripts
|
||||||
// `project.extensions.getByType<BuildInfo>()` in precompiled script plugins
|
// `project.extensions.getByType<BuildInfo>()` in precompiled script plugins
|
||||||
open class BuildInfo(project: Project) {
|
open class BuildInfo(project: Project) {
|
||||||
inner class GraalVm(val arch: String) {
|
val self = this
|
||||||
|
|
||||||
|
inner class GraalVm {
|
||||||
val homeDir: String by lazy {
|
val homeDir: String by lazy {
|
||||||
System.getenv("GRAALVM_HOME") ?: "${System.getProperty("user.home")}/.graalvm"
|
System.getenv("GRAALVM_HOME") ?: "${System.getProperty("user.home")}/.graalvm"
|
||||||
}
|
}
|
||||||
|
|
||||||
val version: String by lazy { libs.findVersion("graalVm").get().toString() }
|
val version: String by lazy {
|
||||||
|
libs.findVersion("graalVm").get().toString()
|
||||||
|
}
|
||||||
|
|
||||||
val graalVmJdkVersion: String by lazy { libs.findVersion("graalVmJdkVersion").get().toString() }
|
val isGraal22: Boolean by lazy {
|
||||||
|
version.startsWith("22")
|
||||||
|
}
|
||||||
|
|
||||||
|
val arch by lazy {
|
||||||
|
if (os.isMacOsX && isGraal22) {
|
||||||
|
"amd64"
|
||||||
|
} else {
|
||||||
|
self.arch
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val osName: String by lazy {
|
val osName: String by lazy {
|
||||||
when {
|
when {
|
||||||
|
os.isMacOsX && isGraal22 -> "darwin"
|
||||||
os.isMacOsX -> "macos"
|
os.isMacOsX -> "macos"
|
||||||
os.isLinux -> "linux"
|
os.isLinux -> "linux"
|
||||||
os.isWindows -> "windows"
|
|
||||||
else -> throw RuntimeException("${os.familyName} is not supported.")
|
else -> throw RuntimeException("${os.familyName} is not supported.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val baseName: String by lazy { "graalvm-jdk-${graalVmJdkVersion}_${osName}-${arch}_bin" }
|
val baseName: String by lazy {
|
||||||
|
if (graalVm.isGraal22) {
|
||||||
val downloadUrl: String by lazy {
|
"graalvm-ce-java11-${osName}-${arch}-${version}"
|
||||||
val jdkMajor = graalVmJdkVersion.takeWhile { it != '.' }
|
} else {
|
||||||
val extension = if (os.isWindows) "zip" else "tar.gz"
|
"graalvm-jdk-${graalVM23JdkVersion}_${osName}-${arch}_bin"
|
||||||
"https://download.oracle.com/graalvm/$jdkMajor/archive/$baseName.$extension"
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val installDir: File by lazy { File(homeDir, baseName) }
|
val graalVM23JdkVersion: String by lazy {
|
||||||
|
libs.findVersion("graalVM23JdkVersion").get().requiredVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
val downloadUrl: String by lazy {
|
||||||
|
if (isGraal22) {
|
||||||
|
"https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-" +
|
||||||
|
"${version}/$baseName.tar.gz"
|
||||||
|
} else {
|
||||||
|
val jdkMajor = graalVM23JdkVersion.takeWhile { it != '.' }
|
||||||
|
"https://download.oracle.com/graalvm/$jdkMajor/archive/$baseName.tar.gz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val installDir: File by lazy {
|
||||||
|
File(homeDir, baseName)
|
||||||
|
}
|
||||||
|
|
||||||
val baseDir: String by lazy {
|
val baseDir: String by lazy {
|
||||||
if (os.isMacOsX) "$installDir/Contents/Home" else installDir.toString()
|
if (os.isMacOsX) "$installDir/Contents/Home" else installDir.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Same logic as [org.gradle.internal.os.OperatingSystem#arch], which is protected. */
|
/**
|
||||||
|
* Same logic as [org.gradle.internal.os.OperatingSystem#arch], which is protected.
|
||||||
|
*/
|
||||||
val arch: String by lazy {
|
val arch: String by lazy {
|
||||||
when (val arch = System.getProperty("os.arch")) {
|
when (val arch = System.getProperty("os.arch")) {
|
||||||
"x86" -> "i386"
|
"x86" -> "i386"
|
||||||
@@ -67,13 +85,15 @@ open class BuildInfo(project: Project) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val graalVmAarch64: GraalVm = GraalVm("aarch64")
|
val graalVm: GraalVm = GraalVm()
|
||||||
|
|
||||||
val graalVmAmd64: GraalVm = GraalVm("x64")
|
val isCiBuild: Boolean by lazy {
|
||||||
|
System.getenv("CI") != null
|
||||||
|
}
|
||||||
|
|
||||||
val isCiBuild: Boolean by lazy { System.getenv("CI") != null }
|
val isReleaseBuild: Boolean by lazy {
|
||||||
|
java.lang.Boolean.getBoolean("releaseBuild")
|
||||||
val isReleaseBuild: Boolean by lazy { java.lang.Boolean.getBoolean("releaseBuild") }
|
}
|
||||||
|
|
||||||
val hasMuslToolchain: Boolean by lazy {
|
val hasMuslToolchain: Boolean by lazy {
|
||||||
// see "install musl" in .circleci/jobs/BuildNativeJob.pkl
|
// see "install musl" in .circleci/jobs/BuildNativeJob.pkl
|
||||||
@@ -88,21 +108,17 @@ open class BuildInfo(project: Project) {
|
|||||||
val commitId: String by lazy {
|
val commitId: String by lazy {
|
||||||
// only run command once per build invocation
|
// only run command once per build invocation
|
||||||
if (project === project.rootProject) {
|
if (project === project.rootProject) {
|
||||||
val process =
|
Runtime.getRuntime()
|
||||||
ProcessBuilder()
|
.exec("git rev-parse --short HEAD", arrayOf(), project.rootDir)
|
||||||
.command("git", "rev-parse", "--short", "HEAD")
|
.inputStream.reader().readText().trim()
|
||||||
.directory(project.rootDir)
|
|
||||||
.start()
|
|
||||||
process.waitFor().also { exitCode ->
|
|
||||||
if (exitCode == -1) throw RuntimeException(process.errorStream.reader().readText())
|
|
||||||
}
|
|
||||||
process.inputStream.reader().readText().trim()
|
|
||||||
} else {
|
} else {
|
||||||
project.rootProject.extensions.getByType(BuildInfo::class.java).commitId
|
project.rootProject.extensions.getByType(BuildInfo::class.java).commitId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val commitish: String by lazy { if (isReleaseBuild) project.version.toString() else commitId }
|
val commitish: String by lazy {
|
||||||
|
if (isReleaseBuild) project.version.toString() else commitId
|
||||||
|
}
|
||||||
|
|
||||||
val pklVersion: String by lazy {
|
val pklVersion: String by lazy {
|
||||||
if (isReleaseBuild) {
|
if (isReleaseBuild) {
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import org.gradle.api.DefaultTask
|
import org.gradle.api.DefaultTask
|
||||||
import org.gradle.api.file.RegularFileProperty
|
import org.gradle.api.file.RegularFileProperty
|
||||||
import org.gradle.api.provider.ListProperty
|
import org.gradle.api.provider.ListProperty
|
||||||
@@ -20,33 +5,37 @@ import org.gradle.api.tasks.Input
|
|||||||
import org.gradle.api.tasks.InputFile
|
import org.gradle.api.tasks.InputFile
|
||||||
import org.gradle.api.tasks.OutputFile
|
import org.gradle.api.tasks.OutputFile
|
||||||
import org.gradle.api.tasks.TaskAction
|
import org.gradle.api.tasks.TaskAction
|
||||||
|
import org.gradle.kotlin.dsl.listProperty
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a self-contained Pkl CLI Jar that is directly executable on *nix and executable with `java
|
* Builds a self-contained Pkl CLI Jar that is directly executable on *nix
|
||||||
* -jar` on Windows.
|
* and executable with `java -jar` on Windows.
|
||||||
*
|
*
|
||||||
* For direct execution, the `java` command must be on the PATH.
|
* For direct execution, the `java` command must be on the PATH.
|
||||||
*
|
*
|
||||||
* https://skife.org/java/unix/2011/06/20/really_executable_jars.html
|
* https://skife.org/java/unix/2011/06/20/really_executable_jars.html
|
||||||
*/
|
*/
|
||||||
abstract class ExecutableJar : DefaultTask() {
|
open class ExecutableJar : DefaultTask() {
|
||||||
@get:InputFile abstract val inJar: RegularFileProperty
|
@get:InputFile
|
||||||
|
val inJar: RegularFileProperty = project.objects.fileProperty()
|
||||||
|
|
||||||
@get:OutputFile abstract val outJar: RegularFileProperty
|
@get:OutputFile
|
||||||
|
val outJar: RegularFileProperty = project.objects.fileProperty()
|
||||||
|
|
||||||
@get:Input abstract val jvmArgs: ListProperty<String>
|
@get:Input
|
||||||
|
val jvmArgs: ListProperty<String> = project.objects.listProperty()
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun buildJar() {
|
fun buildJar() {
|
||||||
val inFile = inJar.get().asFile
|
val inFile = inJar.get().asFile
|
||||||
val outFile = outJar.get().asFile
|
val outFile = outJar.get().asFile
|
||||||
val escapedJvmArgs = jvmArgs.get().joinToString(separator = " ") { "\"$it\"" }
|
val escapedJvmArgs = jvmArgs.get().joinToString(separator = " ") { "\"$it\"" }
|
||||||
val startScript =
|
|
||||||
"""
|
val startScript = """
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec java $escapedJvmArgs -jar $0 "$@"
|
exec java $escapedJvmArgs -jar $0 "$@"
|
||||||
"""
|
""".trim().trimMargin() + "\n\n\n"
|
||||||
.trimIndent() + "\n\n\n"
|
|
||||||
outFile.outputStream().use { outStream ->
|
outFile.outputStream().use { outStream ->
|
||||||
startScript.byteInputStream().use { it.copyTo(outStream) }
|
startScript.byteInputStream().use { it.copyTo(outStream) }
|
||||||
inFile.inputStream().use { it.copyTo(outStream) }
|
inFile.inputStream().use { it.copyTo(outStream) }
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
|
|
||||||
open class GradlePluginTests {
|
open class GradlePluginTests {
|
||||||
|
|||||||
@@ -1,21 +1,6 @@
|
|||||||
/*
|
import java.net.URL
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import groovy.json.JsonSlurper
|
|
||||||
import java.net.URI
|
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
|
import groovy.json.JsonSlurper
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
class GradleVersionInfo(json: Map<String, Any>) {
|
class GradleVersionInfo(json: Map<String, Any>) {
|
||||||
@@ -53,36 +38,31 @@ class GradleVersionInfo(json: Map<String, Any>) {
|
|||||||
val wrapperChecksumUrl: String by json
|
val wrapperChecksumUrl: String by json
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private fun fetchAll(): List<GradleVersionInfo> =
|
private fun fetchAll(): List<GradleVersionInfo> = fetchMultiple("https://services.gradle.org/versions/all")
|
||||||
fetchMultiple("https://services.gradle.org/versions/all")
|
|
||||||
|
|
||||||
fun fetchReleases(): List<GradleVersionInfo> = fetchAll().filter { it.isReleaseVersion }
|
fun fetchReleases(): List<GradleVersionInfo> = fetchAll().filter { it.isReleaseVersion }
|
||||||
|
|
||||||
fun fetchCurrent(): GradleVersionInfo =
|
fun fetchCurrent(): GradleVersionInfo = fetchSingle("https://services.gradle.org/versions/current")
|
||||||
fetchSingle("https://services.gradle.org/versions/current")
|
|
||||||
|
|
||||||
fun fetchRc(): GradleVersionInfo? =
|
fun fetchRc(): GradleVersionInfo? = fetchSingleOrNull("https://services.gradle.org/versions/release-candidate")
|
||||||
fetchSingleOrNull("https://services.gradle.org/versions/release-candidate")
|
|
||||||
|
|
||||||
fun fetchNightly(): GradleVersionInfo =
|
fun fetchNightly(): GradleVersionInfo = fetchSingle("https://services.gradle.org/versions/nightly")
|
||||||
fetchSingle("https://services.gradle.org/versions/nightly")
|
|
||||||
|
|
||||||
private fun fetchSingle(url: String): GradleVersionInfo {
|
private fun fetchSingle(url: String): GradleVersionInfo {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
return GradleVersionInfo(JsonSlurper().parse(URI(url).toURL()) as Map<String, Any>)
|
return GradleVersionInfo(JsonSlurper().parse(URL(url)) as Map<String, Any>)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchSingleOrNull(url: String): GradleVersionInfo? {
|
private fun fetchSingleOrNull(url: String): GradleVersionInfo? {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
val json = JsonSlurper().parse(URI(url).toURL()) as Map<String, Any>
|
val json = JsonSlurper().parse(URL(url)) as Map<String, Any>
|
||||||
return if (json.isEmpty()) null else GradleVersionInfo(json)
|
return if (json.isEmpty()) null else GradleVersionInfo(json)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchMultiple(url: String): List<GradleVersionInfo> {
|
private fun fetchMultiple(url: String): List<GradleVersionInfo> {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
return (JsonSlurper().parse(URI(url).toURL()) as List<Map<String, Any>>).map {
|
return (JsonSlurper().parse(URL(url)) as List<Map<String, Any>>)
|
||||||
GradleVersionInfo(it)
|
.map { GradleVersionInfo(it) }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.file.FileCollection
|
import org.gradle.api.file.FileCollection
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.regex.Matcher
|
import java.util.regex.Matcher
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
@@ -30,18 +15,21 @@ import org.gradle.kotlin.dsl.listProperty
|
|||||||
import org.gradle.kotlin.dsl.mapProperty
|
import org.gradle.kotlin.dsl.mapProperty
|
||||||
|
|
||||||
open class MergeSourcesJars : DefaultTask() {
|
open class MergeSourcesJars : DefaultTask() {
|
||||||
@get:InputFiles val inputJars: ConfigurableFileCollection = project.objects.fileCollection()
|
@get:InputFiles
|
||||||
|
val inputJars: ConfigurableFileCollection = project.objects.fileCollection()
|
||||||
|
|
||||||
@get:InputFiles
|
@get:InputFiles
|
||||||
val mergedBinaryJars: ConfigurableFileCollection = project.objects.fileCollection()
|
val mergedBinaryJars: ConfigurableFileCollection = project.objects.fileCollection()
|
||||||
|
|
||||||
@get:Input val relocatedPackages: MapProperty<String, String> = project.objects.mapProperty()
|
@get:Input
|
||||||
|
val relocatedPackages: MapProperty<String, String> = project.objects.mapProperty()
|
||||||
|
|
||||||
@get:Input
|
@get:Input
|
||||||
var sourceFileExtensions: ListProperty<String> =
|
var sourceFileExtensions: ListProperty<String> = project.objects.listProperty<String>()
|
||||||
project.objects.listProperty<String>().convention(listOf(".java", ".kt"))
|
.convention(listOf(".java", ".kt"))
|
||||||
|
|
||||||
@get:OutputFile val outputJar: RegularFileProperty = project.objects.fileProperty()
|
@get:OutputFile
|
||||||
|
val outputJar: RegularFileProperty = project.objects.fileProperty()
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@@ -50,15 +38,12 @@ open class MergeSourcesJars : DefaultTask() {
|
|||||||
|
|
||||||
val relocatedPkgs = relocatedPackages.get()
|
val relocatedPkgs = relocatedPackages.get()
|
||||||
|
|
||||||
val relocatedPaths =
|
val relocatedPaths = relocatedPkgs.entries.associate { (key, value) -> toPath(key) to toPath(value) }
|
||||||
relocatedPkgs.entries.associate { (key, value) -> toPath(key) to toPath(value) }
|
|
||||||
|
|
||||||
// use negative lookbehind to match any that don't precede with
|
// use negative lookbehind to match any that don't precede with
|
||||||
// a word or a period character. should catch most cases.
|
// a word or a period character. should catch most cases.
|
||||||
val importPattern =
|
val importPattern = Pattern.compile("(?<!(\\w|\\.))(" +
|
||||||
Pattern.compile(
|
relocatedPkgs.keys.joinToString("|") { it.replace(".", "\\.") } + ")")
|
||||||
"(?<!(\\w|\\.))(" + relocatedPkgs.keys.joinToString("|") { it.replace(".", "\\.") } + ")"
|
|
||||||
)
|
|
||||||
|
|
||||||
val sourceFileExts = sourceFileExtensions.get()
|
val sourceFileExts = sourceFileExtensions.get()
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import org.gradle.api.DefaultTask
|
import org.gradle.api.DefaultTask
|
||||||
import org.gradle.api.artifacts.Configuration
|
import org.gradle.api.artifacts.Configuration
|
||||||
import org.gradle.api.artifacts.result.ResolvedArtifactResult
|
import org.gradle.api.artifacts.result.ResolvedArtifactResult
|
||||||
@@ -27,29 +12,27 @@ import org.gradle.kotlin.dsl.property
|
|||||||
import org.gradle.language.base.artifact.SourcesArtifact
|
import org.gradle.language.base.artifact.SourcesArtifact
|
||||||
|
|
||||||
open class ResolveSourcesJars : DefaultTask() {
|
open class ResolveSourcesJars : DefaultTask() {
|
||||||
@get:InputFiles val configuration: Property<Configuration> = project.objects.property()
|
@get:InputFiles
|
||||||
|
val configuration: Property<Configuration> = project.objects.property()
|
||||||
|
|
||||||
@get:OutputDirectory val outputDir: DirectoryProperty = project.objects.directoryProperty()
|
@get:OutputDirectory
|
||||||
|
val outputDir: DirectoryProperty = project.objects.directoryProperty()
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
@Suppress("UnstableApiUsage", "unused")
|
@Suppress("UnstableApiUsage", "unused")
|
||||||
fun resolve() {
|
fun resolve() {
|
||||||
val componentIds =
|
val componentIds = configuration.get().incoming.resolutionResult.allDependencies.map {
|
||||||
configuration.get().incoming.resolutionResult.allDependencies.map {
|
(it as ResolvedDependencyResult).selected.id
|
||||||
(it as ResolvedDependencyResult).selected.id
|
}
|
||||||
}
|
|
||||||
|
|
||||||
val resolutionResult =
|
val resolutionResult = project.dependencies.createArtifactResolutionQuery()
|
||||||
project.dependencies
|
.forComponents(componentIds)
|
||||||
.createArtifactResolutionQuery()
|
.withArtifacts(JvmLibrary::class.java, SourcesArtifact::class.java)
|
||||||
.forComponents(componentIds)
|
.execute()
|
||||||
.withArtifacts(JvmLibrary::class.java, SourcesArtifact::class.java)
|
|
||||||
.execute()
|
|
||||||
|
|
||||||
val resolvedJars =
|
val resolvedJars = resolutionResult.resolvedComponents
|
||||||
resolutionResult.resolvedComponents
|
.flatMap { it.getArtifacts(SourcesArtifact::class.java) }
|
||||||
.flatMap { it.getArtifacts(SourcesArtifact::class.java) }
|
.map { (it as ResolvedArtifactResult).file }
|
||||||
.map { (it as ResolvedArtifactResult).file }
|
|
||||||
|
|
||||||
// copying to an output dir because I don't know how else to describe task outputs
|
// copying to an output dir because I don't know how else to describe task outputs
|
||||||
project.sync {
|
project.sync {
|
||||||
|
|||||||
@@ -1,27 +1,10 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import com.diffplug.gradle.spotless.KotlinGradleExtension
|
|
||||||
import org.gradle.accessors.dm.LibrariesForLibs
|
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins { id("com.diffplug.spotless") }
|
|
||||||
|
|
||||||
val buildInfo = extensions.create<BuildInfo>("buildInfo", project)
|
val buildInfo = extensions.create<BuildInfo>("buildInfo", project)
|
||||||
|
|
||||||
dependencyLocking { lockAllConfigurations() }
|
dependencyLocking {
|
||||||
|
lockAllConfigurations()
|
||||||
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
val rejectedVersionSuffix = Regex("-alpha|-beta|-eap|-m|-rc|-snapshot", RegexOption.IGNORE_CASE)
|
val rejectedVersionSuffix = Regex("-alpha|-beta|-eap|-m|-rc|-snapshot", RegexOption.IGNORE_CASE)
|
||||||
@@ -30,10 +13,8 @@ configurations {
|
|||||||
componentSelection {
|
componentSelection {
|
||||||
all {
|
all {
|
||||||
if (rejectedVersionSuffix.containsMatchIn(candidate.version)) {
|
if (rejectedVersionSuffix.containsMatchIn(candidate.version)) {
|
||||||
reject(
|
reject("Rejected dependency $candidate " +
|
||||||
"Rejected dependency $candidate " +
|
"because it has a prelease version suffix matching `$rejectedVersionSuffix`.")
|
||||||
"because it has a prelease version suffix matching `$rejectedVersionSuffix`."
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -43,25 +24,36 @@ configurations {
|
|||||||
|
|
||||||
plugins.withType(JavaPlugin::class).configureEach {
|
plugins.withType(JavaPlugin::class).configureEach {
|
||||||
val java = project.extensions.getByType<JavaPluginExtension>()
|
val java = project.extensions.getByType<JavaPluginExtension>()
|
||||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
java.sourceCompatibility = JavaVersion.VERSION_11
|
||||||
java.targetCompatibility = JavaVersion.VERSION_17
|
java.targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "17"
|
jvmTarget = "11"
|
||||||
freeCompilerArgs = freeCompilerArgs + listOf("-Xjsr305=strict", "-Xjvm-default=all")
|
freeCompilerArgs = freeCompilerArgs + listOf("-Xjsr305=strict", "-Xjvm-default=all")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.withType(IdeaPlugin::class).configureEach {
|
plugins.withType(IdeaPlugin::class).configureEach {
|
||||||
val errorMessage =
|
val errorMessage = "Use IntelliJ Gradle import instead of running the `idea` task. See README for more information."
|
||||||
"Use IntelliJ Gradle import instead of running the `idea` task. See README for more information."
|
|
||||||
|
|
||||||
tasks.named("idea") { doFirst { throw GradleException(errorMessage) } }
|
tasks.named("idea") {
|
||||||
tasks.named("ideaModule") { doFirst { throw GradleException(errorMessage) } }
|
doFirst {
|
||||||
|
throw GradleException(errorMessage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tasks.named("ideaModule") {
|
||||||
|
doFirst {
|
||||||
|
throw GradleException(errorMessage)
|
||||||
|
}
|
||||||
|
}
|
||||||
if (project == rootProject) {
|
if (project == rootProject) {
|
||||||
tasks.named("ideaProject") { doFirst { throw GradleException(errorMessage) } }
|
tasks.named("ideaProject") {
|
||||||
|
doFirst {
|
||||||
|
throw GradleException(errorMessage)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +72,11 @@ plugins.withType(MavenPublishPlugin::class).configureEach {
|
|||||||
// dependency versions in generated POMs
|
// dependency versions in generated POMs
|
||||||
publications {
|
publications {
|
||||||
withType(MavenPublication::class.java) {
|
withType(MavenPublication::class.java) {
|
||||||
versionMapping { allVariants { fromResolutionResult() } }
|
versionMapping {
|
||||||
|
allVariants {
|
||||||
|
fromResolutionResult()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,72 +84,12 @@ plugins.withType(MavenPublishPlugin::class).configureEach {
|
|||||||
|
|
||||||
// settings.gradle.kts sets `--write-locks`
|
// settings.gradle.kts sets `--write-locks`
|
||||||
// if Gradle command line contains this task name
|
// if Gradle command line contains this task name
|
||||||
val updateDependencyLocks by
|
val updateDependencyLocks by tasks.registering {
|
||||||
tasks.registering {
|
doLast {
|
||||||
doLast { configurations.filter { it.isCanBeResolved }.forEach { it.resolve() } }
|
configurations
|
||||||
|
.filter { it.isCanBeResolved }
|
||||||
|
.forEach { it.resolve() }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val allDependencies by tasks.registering(DependencyReportTask::class)
|
val allDependencies by tasks.registering(DependencyReportTask::class)
|
||||||
|
|
||||||
tasks.withType(Test::class).configureEach {
|
|
||||||
System.getProperty("testReportsDir")?.let { reportsDir ->
|
|
||||||
reports.junitXml.outputLocation.set(file(reportsDir).resolve(project.name).resolve(name))
|
|
||||||
}
|
|
||||||
debugOptions {
|
|
||||||
enabled = System.getProperty("jvmdebug")?.toBoolean() ?: false
|
|
||||||
@Suppress("UnstableApiUsage")
|
|
||||||
host = "*"
|
|
||||||
port = 5005
|
|
||||||
suspend = true
|
|
||||||
server = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(JavaExec::class).configureEach {
|
|
||||||
debugOptions {
|
|
||||||
enabled = System.getProperty("jvmdebug")?.toBoolean() ?: false
|
|
||||||
@Suppress("UnstableApiUsage")
|
|
||||||
host = "*"
|
|
||||||
port = 5005
|
|
||||||
suspend = true
|
|
||||||
server = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Version Catalog library symbols.
|
|
||||||
private val libs = the<LibrariesForLibs>()
|
|
||||||
|
|
||||||
private val licenseHeaderFile by lazy {
|
|
||||||
rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt")
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun KotlinGradleExtension.configureFormatter() {
|
|
||||||
ktfmt(libs.versions.ktfmt.get()).googleStyle()
|
|
||||||
licenseHeaderFile(licenseHeaderFile, "([a-zA-Z]|@file|//)")
|
|
||||||
}
|
|
||||||
|
|
||||||
val originalRemoteName = System.getenv("PKL_ORIGINAL_REMOTE_NAME") ?: "origin"
|
|
||||||
|
|
||||||
spotless {
|
|
||||||
ratchetFrom = "$originalRemoteName/main"
|
|
||||||
|
|
||||||
// When building root project, format buildSrc files too.
|
|
||||||
// We need this because buildSrc is not a subproject of the root project, so a top-level
|
|
||||||
// `spotlessApply` will not trigger `buildSrc:spotlessApply`.
|
|
||||||
if (project === rootProject) {
|
|
||||||
kotlinGradle {
|
|
||||||
configureFormatter()
|
|
||||||
target("*.kts", "buildSrc/*.kts", "buildSrc/src/*/kotlin/**/*.kts")
|
|
||||||
}
|
|
||||||
kotlin {
|
|
||||||
ktfmt(libs.versions.ktfmt.get()).googleStyle()
|
|
||||||
target("buildSrc/src/*/kotlin/**/*.kt")
|
|
||||||
licenseHeaderFile(licenseHeaderFile)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
kotlinGradle {
|
|
||||||
configureFormatter()
|
|
||||||
target("*.kts")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import org.gradle.api.GradleException
|
import org.gradle.api.GradleException
|
||||||
import org.gradle.api.artifacts.Configuration
|
import org.gradle.api.artifacts.Configuration
|
||||||
import org.gradle.api.component.AdhocComponentWithVariants
|
import org.gradle.api.component.AdhocComponentWithVariants
|
||||||
@@ -33,43 +18,43 @@ val fatJarConfiguration: Configuration = configurations.create("fatJar")
|
|||||||
val fatJarPublication: MavenPublication = publishing.publications.create<MavenPublication>("fatJar")
|
val fatJarPublication: MavenPublication = publishing.publications.create<MavenPublication>("fatJar")
|
||||||
|
|
||||||
// ideally we'd configure this automatically based on project dependencies
|
// ideally we'd configure this automatically based on project dependencies
|
||||||
val firstPartySourcesJarsConfiguration: Configuration =
|
val firstPartySourcesJarsConfiguration: Configuration = configurations.create("firstPartySourcesJars")
|
||||||
configurations.create("firstPartySourcesJars")
|
|
||||||
|
|
||||||
val relocations =
|
val relocations = mapOf(
|
||||||
mapOf(
|
// pkl-core dependencies
|
||||||
// pkl-core dependencies
|
"org.antlr.v4." to "org.pkl.thirdparty.antlr.v4.",
|
||||||
"org.antlr.v4." to "org.pkl.thirdparty.antlr.v4.",
|
// https://github.com/oracle/graal/issues/1644 has been fixed,
|
||||||
"com.oracle.truffle" to "org.pkl.thirdparty.truffle",
|
// but native-image still fails when shading com.oracle.truffle
|
||||||
"org.graalvm." to "org.pkl.thirdparty.graalvm.",
|
//"com.oracle.truffle" to "org.pkl.thirdparty.truffle",
|
||||||
"org.organicdesign.fp." to "org.pkl.thirdparty.paguro.",
|
"org.graalvm." to "org.pkl.thirdparty.graalvm.",
|
||||||
"org.snakeyaml.engine." to "org.pkl.thirdparty.snakeyaml.engine.",
|
"org.organicdesign.fp." to "org.pkl.thirdparty.paguro.",
|
||||||
"org.msgpack." to "org.pkl.thirdparty.msgpack.",
|
"org.snakeyaml.engine." to "org.pkl.thirdparty.snakeyaml.engine.",
|
||||||
"org.w3c.dom." to "org.pkl.thirdparty.w3c.dom",
|
"org.msgpack." to "org.pkl.thirdparty.msgpack.",
|
||||||
"com.oracle.svm.core." to "org.pkl.thirdparty.svm.",
|
"org.w3c.dom." to "org.pkl.thirdparty.w3c.dom",
|
||||||
|
"com.oracle.svm.core." to "org.pkl.thirdparty.svm.",
|
||||||
|
|
||||||
// pkl-cli dependencies
|
// pkl-cli dependencies
|
||||||
"org.jline." to "org.pkl.thirdparty.jline.",
|
"org.jline." to "org.pkl.thirdparty.jline.",
|
||||||
"com.github.ajalt.clikt." to "org.pkl.thirdparty.clikt.",
|
"com.github.ajalt.clikt." to "org.pkl.thirdparty.clikt.",
|
||||||
"kotlin." to "org.pkl.thirdparty.kotlin.",
|
"kotlin." to "org.pkl.thirdparty.kotlin.",
|
||||||
"kotlinx." to "org.pkl.thirdparty.kotlinx.",
|
"kotlinx." to "org.pkl.thirdparty.kotlinx.",
|
||||||
"org.intellij." to "org.pkl.thirdparty.intellij.",
|
"org.intellij." to "org.pkl.thirdparty.intellij.",
|
||||||
"org.fusesource.jansi." to "org.pkl.thirdparty.jansi",
|
"org.fusesource.jansi." to "org.pkl.thirdparty.jansi",
|
||||||
"org.fusesource.hawtjni." to "org.pkl.thirdparty.hawtjni",
|
"org.fusesource.hawtjni." to "org.pkl.thirdparty.hawtjni",
|
||||||
|
|
||||||
// pkl-doc dependencies
|
// pkl-doc dependencies
|
||||||
"org.commonmark." to "org.pkl.thirdparty.commonmark.",
|
"org.commonmark." to "org.pkl.thirdparty.commonmark.",
|
||||||
"org.jetbrains." to "org.pkl.thirdparty.jetbrains.",
|
"org.jetbrains." to "org.pkl.thirdparty.jetbrains.",
|
||||||
|
|
||||||
// pkl-config-java dependencies
|
// pkl-config-java dependencies
|
||||||
"io.leangen.geantyref." to "org.pkl.thirdparty.geantyref.",
|
"io.leangen.geantyref." to "org.pkl.thirdparty.geantyref.",
|
||||||
|
|
||||||
// pkl-codegen-java dependencies
|
// pkl-codegen-java dependencies
|
||||||
"com.squareup.javapoet." to "org.pkl.thirdparty.javapoet.",
|
"com.squareup.javapoet." to "org.pkl.thirdparty.javapoet.",
|
||||||
|
|
||||||
// pkl-codegen-kotlin dependencies
|
// pkl-codegen-kotlin dependencies
|
||||||
"com.squareup.kotlinpoet." to "org.pkl.thirdparty.kotlinpoet.",
|
"com.squareup.kotlinpoet." to "org.pkl.thirdparty.kotlinpoet.",
|
||||||
)
|
)
|
||||||
|
|
||||||
val nonRelocations = listOf("com/oracle/truffle/")
|
val nonRelocations = listOf("com/oracle/truffle/")
|
||||||
|
|
||||||
@@ -99,81 +84,82 @@ tasks.shadowJar {
|
|||||||
|
|
||||||
// workaround for https://github.com/johnrengelman/shadow/issues/651
|
// workaround for https://github.com/johnrengelman/shadow/issues/651
|
||||||
components.withType(AdhocComponentWithVariants::class.java).forEach { c ->
|
components.withType(AdhocComponentWithVariants::class.java).forEach { c ->
|
||||||
c.withVariantsFromConfiguration(project.configurations.shadowRuntimeElements.get()) { skip() }
|
c.withVariantsFromConfiguration(project.configurations.shadowRuntimeElements.get()) {
|
||||||
|
skip()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val testFatJar by
|
val testFatJar by tasks.registering(Test::class) {
|
||||||
tasks.registering(Test::class) {
|
testClassesDirs = files(tasks.test.get().testClassesDirs)
|
||||||
testClassesDirs = files(tasks.test.get().testClassesDirs)
|
classpath =
|
||||||
classpath =
|
// compiled test classes
|
||||||
// compiled test classes
|
sourceSets.test.get().output +
|
||||||
sourceSets.test.get().output +
|
// fat Jar
|
||||||
// fat Jar
|
tasks.shadowJar.get().outputs.files +
|
||||||
tasks.shadowJar.get().outputs.files +
|
// test-only dependencies
|
||||||
// test-only dependencies
|
// (test dependencies that are also main dependencies must already be contained in fat Jar;
|
||||||
// (test dependencies that are also main dependencies must already be contained in fat Jar;
|
// to verify that, we don't want to include them here)
|
||||||
// to verify that, we don't want to include them here)
|
(configurations.testRuntimeClasspath.get() - configurations.runtimeClasspath.get())
|
||||||
(configurations.testRuntimeClasspath.get() - configurations.runtimeClasspath.get())
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tasks.check { dependsOn(testFatJar) }
|
tasks.check {
|
||||||
|
dependsOn(testFatJar)
|
||||||
|
}
|
||||||
|
|
||||||
val validateFatJar by
|
val validateFatJar by tasks.registering {
|
||||||
tasks.registering {
|
val outputFile = file("$buildDir/validateFatJar/result.txt")
|
||||||
val outputFile = layout.buildDirectory.file("validateFatJar/result.txt")
|
inputs.files(tasks.shadowJar)
|
||||||
inputs.files(tasks.shadowJar)
|
inputs.property("nonRelocations", nonRelocations)
|
||||||
inputs.property("nonRelocations", nonRelocations)
|
outputs.file(outputFile)
|
||||||
outputs.file(outputFile)
|
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
val unshadowedFiles = mutableListOf<String>()
|
val unshadowedFiles = mutableListOf<String>()
|
||||||
zipTree(tasks.shadowJar.get().outputs.files.singleFile).visit {
|
zipTree(tasks.shadowJar.get().outputs.files.singleFile).visit {
|
||||||
val fileDetails = this
|
val fileDetails = this
|
||||||
val path = fileDetails.relativePath.pathString
|
val path = fileDetails.relativePath.pathString
|
||||||
if (
|
if (!(fileDetails.isDirectory ||
|
||||||
!(fileDetails.isDirectory ||
|
path.startsWith("org/pkl/") ||
|
||||||
path.startsWith("org/pkl/") ||
|
path.startsWith("META-INF/") ||
|
||||||
path.startsWith("META-INF/") ||
|
nonRelocations.any { path.startsWith(it) })) {
|
||||||
nonRelocations.any { path.startsWith(it) })
|
// don't throw exception inside `visit`
|
||||||
) {
|
// as this gives a misleading "Could not expand ZIP" error message
|
||||||
// don't throw exception inside `visit`
|
unshadowedFiles.add(path)
|
||||||
// as this gives a misleading "Could not expand ZIP" error message
|
|
||||||
unshadowedFiles.add(path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (unshadowedFiles.isEmpty()) {
|
|
||||||
outputFile.get().asFile.writeText("SUCCESS")
|
|
||||||
} else {
|
|
||||||
outputFile.get().asFile.writeText("FAILURE")
|
|
||||||
throw GradleException("Found unshadowed files:\n" + unshadowedFiles.joinToString("\n"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (unshadowedFiles.isEmpty()) {
|
||||||
|
outputFile.writeText("SUCCESS")
|
||||||
|
} else {
|
||||||
|
outputFile.writeText("FAILURE")
|
||||||
|
throw GradleException("Found unshadowed files:\n" + unshadowedFiles.joinToString("\n"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
tasks.check {
|
||||||
|
dependsOn(validateFatJar)
|
||||||
|
}
|
||||||
|
|
||||||
tasks.check { dependsOn(validateFatJar) }
|
val resolveSourcesJars by tasks.registering(ResolveSourcesJars::class) {
|
||||||
|
configuration.set(configurations.runtimeClasspath)
|
||||||
|
outputDir.set(project.file("$buildDir/resolveSourcesJars"))
|
||||||
|
}
|
||||||
|
|
||||||
val resolveSourcesJars by
|
val fatSourcesJar by tasks.registering(MergeSourcesJars::class) {
|
||||||
tasks.registering(ResolveSourcesJars::class) {
|
plugins.withId("pklJavaLibrary") {
|
||||||
configuration.set(configurations.runtimeClasspath)
|
inputJars.from(tasks.named("sourcesJar"))
|
||||||
outputDir.set(layout.buildDirectory.dir("resolveSourcesJars"))
|
|
||||||
}
|
}
|
||||||
|
inputJars.from(firstPartySourcesJarsConfiguration)
|
||||||
|
inputJars.from(resolveSourcesJars.map { fileTree(it.outputDir) })
|
||||||
|
|
||||||
val fatSourcesJar by
|
mergedBinaryJars.from(tasks.shadowJar)
|
||||||
tasks.registering(MergeSourcesJars::class) {
|
relocatedPackages.set(relocations)
|
||||||
plugins.withId("pklJavaLibrary") { inputJars.from(tasks.named("sourcesJar")) }
|
outputJar.fileProvider(provider {
|
||||||
inputJars.from(firstPartySourcesJarsConfiguration)
|
file(tasks.shadowJar.get().archiveFile.get().asFile.path.replace(".jar", "-sources.jar"))
|
||||||
inputJars.from(resolveSourcesJars.map { fileTree(it.outputDir) })
|
})
|
||||||
|
}
|
||||||
|
|
||||||
mergedBinaryJars.from(tasks.shadowJar)
|
artifacts {
|
||||||
relocatedPackages.set(relocations)
|
add("fatJar", tasks.shadowJar)
|
||||||
outputJar.fileProvider(
|
}
|
||||||
provider {
|
|
||||||
file(tasks.shadowJar.get().archiveFile.get().asFile.path.replace(".jar", "-sources.jar"))
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts { add("fatJar", tasks.shadowJar) }
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
@@ -181,12 +167,16 @@ publishing {
|
|||||||
project.shadow.component(this)
|
project.shadow.component(this)
|
||||||
|
|
||||||
// sources Jar is fat
|
// sources Jar is fat
|
||||||
artifact(fatSourcesJar.flatMap { it.outputJar.asFile }) { classifier = "sources" }
|
artifact(fatSourcesJar.flatMap { it.outputJar.asFile }) {
|
||||||
|
classifier = "sources"
|
||||||
|
}
|
||||||
|
|
||||||
plugins.withId("pklJavaLibrary") {
|
plugins.withId("pklJavaLibrary") {
|
||||||
val javadocJar by tasks.existing(Jar::class)
|
val javadocJar by tasks.existing(Jar::class)
|
||||||
// Javadoc Jar is not fat (didn't invest effort)
|
// Javadoc Jar is not fat (didn't invest effort)
|
||||||
artifact(javadocJar.flatMap { it.archiveFile }) { classifier = "javadoc" }
|
artifact(javadocJar.flatMap { it.archiveFile }) {
|
||||||
|
classifier = "javadoc"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,129 +1,84 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import de.undercouch.gradle.tasks.download.Download
|
|
||||||
import de.undercouch.gradle.tasks.download.Verify
|
|
||||||
import java.nio.file.*
|
import java.nio.file.*
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
import kotlin.io.path.createDirectories
|
import de.undercouch.gradle.tasks.download.Download
|
||||||
|
import de.undercouch.gradle.tasks.download.Verify
|
||||||
|
|
||||||
plugins { id("de.undercouch.download") }
|
plugins {
|
||||||
|
id("de.undercouch.download")
|
||||||
|
}
|
||||||
|
|
||||||
val buildInfo = project.extensions.getByType<BuildInfo>()
|
val buildInfo = project.extensions.getByType<BuildInfo>()
|
||||||
|
|
||||||
val BuildInfo.GraalVm.downloadFile
|
val homeDir = buildInfo.graalVm.homeDir
|
||||||
get(): File {
|
val baseName = buildInfo.graalVm.baseName
|
||||||
val extension = if (buildInfo.os.isWindows) "zip" else "tar.gz"
|
val installDir = buildInfo.graalVm.installDir
|
||||||
return file(homeDir).resolve("${baseName}.$extension")
|
val downloadUrl = buildInfo.graalVm.downloadUrl
|
||||||
}
|
val downloadFile = file(homeDir).resolve("$baseName.tar.gz")
|
||||||
|
|
||||||
// tries to minimize chance of corruption by download-to-temp-file-and-move
|
// tries to minimize chance of corruption by download-to-temp-file-and-move
|
||||||
val downloadGraalVmAarch64 by
|
val downloadGraalVm by tasks.registering(Download::class) {
|
||||||
tasks.registering(Download::class) { configureDownloadGraalVm(buildInfo.graalVmAarch64) }
|
onlyIf {
|
||||||
|
!installDir.exists()
|
||||||
|
}
|
||||||
|
|
||||||
val downloadGraalVmAmd64 by
|
src(downloadUrl)
|
||||||
tasks.registering(Download::class) { configureDownloadGraalVm(buildInfo.graalVmAmd64) }
|
dest(downloadFile)
|
||||||
|
|
||||||
fun Download.configureDownloadGraalVm(graalvm: BuildInfo.GraalVm) {
|
|
||||||
onlyIf { !graalvm.installDir.exists() }
|
|
||||||
doLast { println("Downloaded GraalVm to ${graalvm.downloadFile}") }
|
|
||||||
|
|
||||||
src(graalvm.downloadUrl)
|
|
||||||
dest(graalvm.downloadFile)
|
|
||||||
overwrite(false)
|
overwrite(false)
|
||||||
tempAndMove(true)
|
tempAndMove(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
val verifyGraalVmAarch64 by
|
val verifyGraalVm by tasks.registering(Verify::class) {
|
||||||
tasks.registering(Verify::class) {
|
onlyIf {
|
||||||
configureVerifyGraalVm(buildInfo.graalVmAarch64)
|
!installDir.exists()
|
||||||
dependsOn(downloadGraalVmAarch64)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val verifyGraalVmAmd64 by
|
dependsOn(downloadGraalVm)
|
||||||
tasks.registering(Verify::class) {
|
src(downloadFile)
|
||||||
configureVerifyGraalVm(buildInfo.graalVmAmd64)
|
checksum(buildInfo.libs.findVersion("graalVmSha256-${buildInfo.graalVm.osName}-${buildInfo.graalVm.arch}").get().toString())
|
||||||
dependsOn(downloadGraalVmAmd64)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Verify.configureVerifyGraalVm(graalvm: BuildInfo.GraalVm) {
|
|
||||||
onlyIf { !graalvm.installDir.exists() }
|
|
||||||
|
|
||||||
src(graalvm.downloadFile)
|
|
||||||
checksum(
|
|
||||||
buildInfo.libs.findVersion("graalVmSha256-${graalvm.osName}-${graalvm.arch}").get().toString()
|
|
||||||
)
|
|
||||||
algorithm("SHA-256")
|
algorithm("SHA-256")
|
||||||
}
|
}
|
||||||
|
|
||||||
// minimize chance of corruption by extract-to-random-dir-and-flip-symlink
|
// minimize chance of corruption by extract-to-random-dir-and-flip-symlink
|
||||||
val installGraalVmAarch64 by
|
val installGraalVm by tasks.registering {
|
||||||
tasks.registering {
|
dependsOn(verifyGraalVm)
|
||||||
dependsOn(verifyGraalVmAarch64)
|
|
||||||
configureInstallGraalVm(buildInfo.graalVmAarch64)
|
|
||||||
}
|
|
||||||
|
|
||||||
// minimize chance of corruption by extract-to-random-dir-and-flip-symlink
|
onlyIf {
|
||||||
val installGraalVmAmd64 by
|
!installDir.exists()
|
||||||
tasks.registering {
|
|
||||||
dependsOn(verifyGraalVmAmd64)
|
|
||||||
configureInstallGraalVm(buildInfo.graalVmAmd64)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Task.configureInstallGraalVm(graalVm: BuildInfo.GraalVm) {
|
|
||||||
onlyIf { !graalVm.installDir.exists() }
|
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
val distroDir = Paths.get(graalVm.homeDir, UUID.randomUUID().toString())
|
val distroDir = "$homeDir/${UUID.randomUUID()}"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
distroDir.createDirectories()
|
mkdir(distroDir)
|
||||||
println("Extracting ${graalVm.downloadFile} into $distroDir")
|
|
||||||
|
println("Extracting $downloadFile into $distroDir")
|
||||||
// faster and more reliable than Gradle's `copy { from tarTree() }`
|
// faster and more reliable than Gradle's `copy { from tarTree() }`
|
||||||
exec {
|
exec {
|
||||||
workingDir = file(distroDir)
|
workingDir = file(distroDir)
|
||||||
executable = "tar"
|
executable = "tar"
|
||||||
args("--strip-components=1", "-xzf", graalVm.downloadFile)
|
args("--strip-components=1", "-xzf", downloadFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
val distroBinDir =
|
val distroBinDir = if (buildInfo.os.isMacOsX) "$distroDir/Contents/Home/bin" else "$distroDir/bin"
|
||||||
if (buildInfo.os.isMacOsX) distroDir.resolve("Contents/Home/bin")
|
|
||||||
else distroDir.resolve("bin")
|
|
||||||
|
|
||||||
println("Installing native-image into $distroDir")
|
println("Installing native-image into $distroDir")
|
||||||
exec {
|
exec {
|
||||||
val executableName = if (buildInfo.os.isWindows) "gu.cmd" else "gu"
|
executable = "$distroBinDir/gu"
|
||||||
executable = distroBinDir.resolve(executableName).toString()
|
|
||||||
args("install", "--no-progress", "native-image")
|
args("install", "--no-progress", "native-image")
|
||||||
}
|
}
|
||||||
|
|
||||||
println("Creating symlink ${graalVm.installDir} for $distroDir")
|
println("Creating symlink $installDir for $distroDir")
|
||||||
val tempLink = Paths.get(graalVm.homeDir, UUID.randomUUID().toString())
|
val tempLink = Paths.get("$homeDir/${UUID.randomUUID()}")
|
||||||
Files.createSymbolicLink(tempLink, distroDir)
|
Files.createSymbolicLink(tempLink, Paths.get(distroDir))
|
||||||
try {
|
try {
|
||||||
Files.move(tempLink, graalVm.installDir.toPath(), StandardCopyOption.ATOMIC_MOVE)
|
Files.move(tempLink, installDir.toPath(), StandardCopyOption.ATOMIC_MOVE)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
try {
|
try { delete(tempLink.toFile()) } catch (ignored: Exception) {}
|
||||||
delete(tempLink.toFile())
|
|
||||||
} catch (ignored: Exception) {}
|
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
try {
|
try { delete(distroDir) } catch (ignored: Exception) {}
|
||||||
delete(distroDir)
|
|
||||||
} catch (ignored: Exception) {}
|
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Allows to run Gradle plugin tests against different Gradle versions.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Adds a `compatibilityTestX` task for every Gradle version X
|
||||||
* you may not use this file except in compliance with the License.
|
* between `ext.minSupportedGradleVersion` and `ext.maxSupportedGradleVersion`
|
||||||
* You may obtain a copy of the License at
|
* that is not in `ext.gradleVersionsExcludedFromTesting`.
|
||||||
*
|
* The list of available Gradle versions is obtained from services.gradle.org.
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
* Adds lifecycle tasks to test against multiple Gradle versions at once, for example all Gradle release versions.
|
||||||
*
|
* Compatibility test tasks run the same tests and use the same task configuration as the project's `test` task.
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* They set system properties for the Gradle version and distribution URL to be used.
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* These properties are consumed by the `AbstractTest` class.
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
*/
|
||||||
plugins { java }
|
|
||||||
|
plugins {
|
||||||
|
java
|
||||||
|
}
|
||||||
|
|
||||||
val gradlePluginTests = extensions.create<GradlePluginTests>("gradlePluginTests")
|
val gradlePluginTests = extensions.create<GradlePluginTests>("gradlePluginTests")
|
||||||
|
|
||||||
@@ -24,23 +24,18 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
|||||||
when (val taskNameSuffix = matchResult.groupValues[1]) {
|
when (val taskNameSuffix = matchResult.groupValues[1]) {
|
||||||
"All" ->
|
"All" ->
|
||||||
task("compatibilityTestAll") {
|
task("compatibilityTestAll") {
|
||||||
dependsOn(
|
dependsOn("compatibilityTestReleases", "compatibilityTestCandidate", "compatibilityTestNightly")
|
||||||
"compatibilityTestReleases",
|
|
||||||
"compatibilityTestCandidate",
|
|
||||||
"compatibilityTestNightly"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
// releases in configured range
|
// releases in configured range
|
||||||
"Releases" ->
|
"Releases" ->
|
||||||
task("compatibilityTestReleases") {
|
task("compatibilityTestReleases") {
|
||||||
val versionInfos = GradleVersionInfo.fetchReleases()
|
val versionInfos = GradleVersionInfo.fetchReleases()
|
||||||
val versionsToTestAgainst =
|
val versionsToTestAgainst = versionInfos.filter { versionInfo ->
|
||||||
versionInfos.filter { versionInfo ->
|
val v = versionInfo.gradleVersion
|
||||||
val v = versionInfo.gradleVersion
|
!versionInfo.broken &&
|
||||||
!versionInfo.broken &&
|
|
||||||
v in gradlePluginTests.minGradleVersion..gradlePluginTests.maxGradleVersion &&
|
v in gradlePluginTests.minGradleVersion..gradlePluginTests.maxGradleVersion &&
|
||||||
v !in gradlePluginTests.skippedGradleVersions
|
v !in gradlePluginTests.skippedGradleVersions
|
||||||
}
|
}
|
||||||
|
|
||||||
dependsOn(versionsToTestAgainst.map { createCompatibilityTestTask(it) })
|
dependsOn(versionsToTestAgainst.map { createCompatibilityTestTask(it) })
|
||||||
}
|
}
|
||||||
@@ -50,10 +45,8 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
|||||||
val versionInfo = GradleVersionInfo.fetchCurrent()
|
val versionInfo = GradleVersionInfo.fetchCurrent()
|
||||||
if (versionInfo.version == gradle.gradleVersion) {
|
if (versionInfo.version == gradle.gradleVersion) {
|
||||||
doLast {
|
doLast {
|
||||||
println(
|
println("No new Gradle release available. " +
|
||||||
"No new Gradle release available. " +
|
"(Run `gradlew test` to test against ${versionInfo.version}.)")
|
||||||
"(Run `gradlew test` to test against ${versionInfo.version}.)"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dependsOn(createCompatibilityTestTask(versionInfo))
|
dependsOn(createCompatibilityTestTask(versionInfo))
|
||||||
@@ -66,7 +59,9 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
|||||||
if (versionInfo?.activeRc == true) {
|
if (versionInfo?.activeRc == true) {
|
||||||
dependsOn(createCompatibilityTestTask(versionInfo))
|
dependsOn(createCompatibilityTestTask(versionInfo))
|
||||||
} else {
|
} else {
|
||||||
doLast { println("No active Gradle release candidate available.") }
|
doLast {
|
||||||
|
println("No active Gradle release candidate available.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// latest nightly
|
// latest nightly
|
||||||
@@ -78,14 +73,14 @@ tasks.addRule("Pattern: compatibilityTest[All|Releases|Latest|Candidate|Nightly|
|
|||||||
// explicit version
|
// explicit version
|
||||||
else ->
|
else ->
|
||||||
createCompatibilityTestTask(
|
createCompatibilityTestTask(
|
||||||
taskNameSuffix,
|
taskNameSuffix,
|
||||||
"https://services.gradle.org/distributions-snapshots/gradle-$taskNameSuffix-bin.zip"
|
"https://services.gradle.org/distributions-snapshots/gradle-$taskNameSuffix-bin.zip"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun createCompatibilityTestTask(versionInfo: GradleVersionInfo): Task =
|
fun createCompatibilityTestTask(versionInfo: GradleVersionInfo): Task =
|
||||||
createCompatibilityTestTask(versionInfo.version, versionInfo.downloadUrl)
|
createCompatibilityTestTask(versionInfo.version, versionInfo.downloadUrl)
|
||||||
|
|
||||||
fun createCompatibilityTestTask(version: String, downloadUrl: String): Task {
|
fun createCompatibilityTestTask(version: String, downloadUrl: String): Task {
|
||||||
return tasks.create("compatibilityTest$version", Test::class.java) {
|
return tasks.create("compatibilityTest$version", Test::class.java) {
|
||||||
|
|||||||
@@ -1,33 +1,20 @@
|
|||||||
/*
|
plugins {
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
base
|
||||||
*
|
}
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
plugins { base }
|
|
||||||
|
|
||||||
val htmlValidator = extensions.create<HtmlValidator>("htmlValidator", project)
|
val htmlValidator = extensions.create<HtmlValidator>("htmlValidator", project)
|
||||||
|
|
||||||
val buildInfo = project.extensions.getByType<BuildInfo>()
|
val buildInfo = project.extensions.getByType<BuildInfo>()
|
||||||
|
|
||||||
val validatorConfiguration: Configuration =
|
val validatorConfiguration: Configuration = configurations.create("validator") {
|
||||||
configurations.create("validator") {
|
resolutionStrategy.eachDependency {
|
||||||
resolutionStrategy.eachDependency {
|
if (requested.group == "log4j" && requested.name == "log4j") {
|
||||||
if (requested.group == "log4j" && requested.name == "log4j") {
|
@Suppress("UnstableApiUsage")
|
||||||
@Suppress("UnstableApiUsage") useTarget(buildInfo.libs.findLibrary("log4j12Api").get())
|
useTarget(buildInfo.libs.findLibrary("log4j12Api").get())
|
||||||
because("mitigate critical security vulnerabilities")
|
because("mitigate critical security vulnerabilities")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@Suppress("UnstableApiUsage")
|
@Suppress("UnstableApiUsage")
|
||||||
@@ -45,29 +32,27 @@ dependencies {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val validateHtml by
|
val validateHtml by tasks.registering(JavaExec::class) {
|
||||||
tasks.registering(JavaExec::class) {
|
val resultFile = file("$buildDir/validateHtml/result.txt")
|
||||||
val resultFile = layout.buildDirectory.file("validateHtml/result.txt")
|
inputs.files(htmlValidator.sources)
|
||||||
inputs.files(htmlValidator.sources)
|
outputs.file(resultFile)
|
||||||
outputs.file(resultFile)
|
|
||||||
|
|
||||||
classpath = validatorConfiguration
|
classpath = validatorConfiguration
|
||||||
mainClass.set("nu.validator.client.SimpleCommandLineValidator")
|
mainClass.set("nu.validator.client.SimpleCommandLineValidator")
|
||||||
args(
|
args("--skip-non-html") // --also-check-css doesn't work (still checks css as html), so limit to html files
|
||||||
"--skip-non-html"
|
args("--filterpattern", "(.*)Consider adding “lang=(.*)")
|
||||||
) // --also-check-css doesn't work (still checks css as html), so limit to html files
|
args("--filterpattern", "(.*)Consider adding a “lang” attribute(.*)")
|
||||||
args("--filterpattern", "(.*)Consider adding “lang=(.*)")
|
args("--filterpattern", "(.*)unrecognized media “amzn-kf8”(.*)") // kindle
|
||||||
args("--filterpattern", "(.*)Consider adding a “lang” attribute(.*)")
|
// for debugging
|
||||||
args("--filterpattern", "(.*)unrecognized media “amzn-kf8”(.*)") // kindle
|
// args "--verbose"
|
||||||
// for debugging
|
args(htmlValidator.sources)
|
||||||
// args "--verbose"
|
|
||||||
args(htmlValidator.sources)
|
|
||||||
|
|
||||||
// write a basic result file s.t. gradle can consider task up-to-date
|
// write a basic result file s.t. gradle can consider task up-to-date
|
||||||
// writing a result file in case validation fails is not easily possible with JavaExec, but also
|
// writing a result file in case validation fails is not easily possible with JavaExec, but also not strictly necessary
|
||||||
// not strictly necessary
|
doFirst { project.delete(resultFile) }
|
||||||
doFirst { project.delete(resultFile) }
|
doLast { resultFile.writeText("Success.") }
|
||||||
doLast { resultFile.get().asFile.writeText("Success.") }
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tasks.check { dependsOn(validateHtml) }
|
tasks.check {
|
||||||
|
dependsOn(validateHtml)
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,22 +1,5 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
@file:Suppress("HttpUrlsUsage")
|
@file:Suppress("HttpUrlsUsage")
|
||||||
|
|
||||||
import org.gradle.accessors.dm.LibrariesForLibs
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
id("pklKotlinTest")
|
id("pklKotlinTest")
|
||||||
@@ -26,9 +9,6 @@ plugins {
|
|||||||
// make sources Jar available to other subprojects
|
// make sources Jar available to other subprojects
|
||||||
val sourcesJarConfiguration = configurations.register("sourcesJar")
|
val sourcesJarConfiguration = configurations.register("sourcesJar")
|
||||||
|
|
||||||
// Version Catalog library symbols.
|
|
||||||
val libs = the<LibrariesForLibs>()
|
|
||||||
|
|
||||||
java {
|
java {
|
||||||
withSourcesJar() // creates `sourcesJar` task
|
withSourcesJar() // creates `sourcesJar` task
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
@@ -41,18 +21,15 @@ artifacts {
|
|||||||
|
|
||||||
spotless {
|
spotless {
|
||||||
java {
|
java {
|
||||||
googleJavaFormat(libs.versions.googleJavaFormat.get())
|
googleJavaFormat("1.15.0")
|
||||||
target("src/*/java/**/*.java")
|
targetExclude("**/generated/**", "**/build/**")
|
||||||
licenseHeaderFile(rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"))
|
|
||||||
}
|
|
||||||
kotlin {
|
|
||||||
ktfmt(libs.versions.ktfmt.get()).googleStyle()
|
|
||||||
target("src/*/kotlin/**/*.kt")
|
|
||||||
licenseHeaderFile(rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"))
|
licenseHeaderFile(rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.compileKotlin { enabled = false }
|
tasks.compileKotlin {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
manifest {
|
manifest {
|
||||||
@@ -67,22 +44,16 @@ tasks.javadoc {
|
|||||||
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
|
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
|
||||||
}
|
}
|
||||||
|
|
||||||
val workAroundKotlinGradlePluginBug by
|
val workAroundKotlinGradlePluginBug by tasks.registering {
|
||||||
tasks.registering {
|
doLast {
|
||||||
doLast {
|
// Works around this problem, which sporadically appears and disappears in different subprojects:
|
||||||
// Works around this problem, which sporadically appears and disappears in different
|
// A problem was found with the configuration of task ':pkl-executor:compileJava' (type 'JavaCompile').
|
||||||
// subprojects:
|
// > Directory '[...]/pkl/pkl-executor/build/classes/kotlin/main'
|
||||||
// A problem was found with the configuration of task ':pkl-executor:compileJava' (type
|
// specified for property 'compileKotlinOutputClasses' does not exist.
|
||||||
// 'JavaCompile').
|
file("$buildDir/classes/kotlin/main").mkdirs()
|
||||||
// > Directory '[...]/pkl/pkl-executor/build/classes/kotlin/main'
|
|
||||||
// specified for property 'compileKotlinOutputClasses' does not exist.
|
|
||||||
layout.buildDirectory.dir("classes/kotlin/main").get().asFile.mkdirs()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.compileJava {
|
tasks.compileJava {
|
||||||
dependsOn(workAroundKotlinGradlePluginBug)
|
dependsOn(workAroundKotlinGradlePluginBug)
|
||||||
// TODO: determine correct limits for Truffle specializations
|
|
||||||
// (see https://graalvm.slack.com/archives/CNQSB2DHD/p1712380902746829)
|
|
||||||
options.compilerArgs.add("-Atruffle.dsl.SuppressWarnings=truffle-limit")
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import org.gradle.accessors.dm.LibrariesForLibs
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("pklJavaLibrary")
|
id("pklJavaLibrary")
|
||||||
|
|
||||||
@@ -23,9 +6,6 @@ plugins {
|
|||||||
|
|
||||||
val buildInfo = project.extensions.getByType<BuildInfo>()
|
val buildInfo = project.extensions.getByType<BuildInfo>()
|
||||||
|
|
||||||
// Version Catalog library symbols.
|
|
||||||
val libs = the<LibrariesForLibs>()
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// At least some of our kotlin APIs contain Kotlin stdlib types
|
// At least some of our kotlin APIs contain Kotlin stdlib types
|
||||||
// that aren't compiled away by kotlinc (e.g., `kotlin.Function`).
|
// that aren't compiled away by kotlinc (e.g., `kotlin.Function`).
|
||||||
@@ -38,3 +18,11 @@ dependencies {
|
|||||||
tasks.compileKotlin {
|
tasks.compileKotlin {
|
||||||
enabled = true // disabled by pklJavaLibrary
|
enabled = true // disabled by pklJavaLibrary
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spotless {
|
||||||
|
kotlin {
|
||||||
|
ktfmt("0.44").googleStyle()
|
||||||
|
targetExclude("**/generated/**", "**/build/**")
|
||||||
|
licenseHeaderFile(rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,22 +1,9 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import java.net.URI
|
|
||||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||||
|
import java.net.URI
|
||||||
|
|
||||||
plugins { kotlin("jvm") }
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
}
|
||||||
|
|
||||||
val buildInfo = project.extensions.getByType<BuildInfo>()
|
val buildInfo = project.extensions.getByType<BuildInfo>()
|
||||||
|
|
||||||
@@ -37,36 +24,34 @@ tasks.withType<Test>().configureEach {
|
|||||||
// enable checking of stdlib return types
|
// enable checking of stdlib return types
|
||||||
systemProperty("org.pkl.testMode", "true")
|
systemProperty("org.pkl.testMode", "true")
|
||||||
|
|
||||||
reports.named("html") { enabled = true }
|
reports.named("html") {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
|
||||||
testLogging { exceptionFormat = TestExceptionFormat.FULL }
|
testLogging {
|
||||||
|
exceptionFormat = TestExceptionFormat.FULL
|
||||||
|
}
|
||||||
|
|
||||||
addTestListener(
|
addTestListener(object : TestListener {
|
||||||
object : TestListener {
|
override fun beforeSuite(suite: TestDescriptor) {}
|
||||||
override fun beforeSuite(suite: TestDescriptor) {}
|
override fun beforeTest(testDescriptor: TestDescriptor) {}
|
||||||
|
override fun afterTest(testDescriptor: TestDescriptor, result: TestResult) {}
|
||||||
|
|
||||||
override fun beforeTest(testDescriptor: TestDescriptor) {}
|
// print report link at end of task, not just at end of build
|
||||||
|
override fun afterSuite(descriptor: TestDescriptor, result: TestResult) {
|
||||||
|
if (descriptor.parent != null) return // only interested in overall result
|
||||||
|
|
||||||
override fun afterTest(testDescriptor: TestDescriptor, result: TestResult) {}
|
if (result.resultType == TestResult.ResultType.FAILURE) {
|
||||||
|
println("\nThere were failing tests. See the report at: ${fixFileUri(testTask.reports.html.entryPoint.toURI())}")
|
||||||
// print report link at end of task, not just at end of build
|
|
||||||
override fun afterSuite(descriptor: TestDescriptor, result: TestResult) {
|
|
||||||
if (descriptor.parent != null) return // only interested in overall result
|
|
||||||
|
|
||||||
if (result.resultType == TestResult.ResultType.FAILURE) {
|
|
||||||
println(
|
|
||||||
"\nThere were failing tests. See the report at: ${fixFileUri(testTask.reports.html.entryPoint.toURI())}"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// makes links clickable on macOS
|
|
||||||
private fun fixFileUri(uri: URI): URI {
|
|
||||||
if ("file" == uri.scheme && !uri.schemeSpecificPart.startsWith("//")) {
|
|
||||||
return URI.create("file://" + uri.schemeSpecificPart)
|
|
||||||
}
|
|
||||||
return uri
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
// makes links clickable on macOS
|
||||||
|
private fun fixFileUri(uri: URI): URI {
|
||||||
|
if ("file" == uri.scheme && !uri.schemeSpecificPart.startsWith("//")) {
|
||||||
|
return URI.create("file://" + uri.schemeSpecificPart)
|
||||||
|
}
|
||||||
|
return uri
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,7 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
val assembleNative by tasks.registering {}
|
val assembleNative by tasks.registering {}
|
||||||
|
|
||||||
val testNative by tasks.registering {}
|
val checkNative by tasks.registering {}
|
||||||
|
|
||||||
val checkNative by tasks.registering { dependsOn(testNative) }
|
val buildNative by tasks.registering {
|
||||||
|
dependsOn(assembleNative, checkNative)
|
||||||
val buildNative by tasks.registering { dependsOn(assembleNative, checkNative) }
|
}
|
||||||
|
|||||||
@@ -1,21 +1,6 @@
|
|||||||
/*
|
import org.gradle.api.publish.maven.tasks.GenerateMavenPom
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
import java.util.Base64
|
import java.util.Base64
|
||||||
import org.gradle.api.publish.maven.tasks.GenerateMavenPom
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
@@ -25,7 +10,9 @@ plugins {
|
|||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
components.findByName("java")?.let { javaComponent ->
|
components.findByName("java")?.let { javaComponent ->
|
||||||
create<MavenPublication>("library") { from(javaComponent) }
|
create<MavenPublication>("library") {
|
||||||
|
from(javaComponent)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
withType<MavenPublication>().configureEach {
|
withType<MavenPublication>().configureEach {
|
||||||
pom {
|
pom {
|
||||||
@@ -62,78 +49,62 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val validatePom by
|
val validatePom by tasks.registering {
|
||||||
tasks.registering {
|
val generatePomFileForLibraryPublication by tasks.existing(GenerateMavenPom::class)
|
||||||
if (tasks.findByName("generatePomFileForLibraryPublication") == null) {
|
val outputFile = file("$buildDir/validatePom") // dummy output to satisfy up-to-date check
|
||||||
return@registering
|
|
||||||
}
|
|
||||||
val generatePomFileForLibraryPublication by tasks.existing(GenerateMavenPom::class)
|
|
||||||
val outputFile =
|
|
||||||
layout.buildDirectory.file("validatePom") // dummy output to satisfy up-to-date check
|
|
||||||
|
|
||||||
dependsOn(generatePomFileForLibraryPublication)
|
dependsOn(generatePomFileForLibraryPublication)
|
||||||
inputs.file(generatePomFileForLibraryPublication.get().destination)
|
inputs.file(generatePomFileForLibraryPublication.get().destination)
|
||||||
outputs.file(outputFile)
|
outputs.file(outputFile)
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
outputFile.get().asFile.delete()
|
outputFile.delete()
|
||||||
|
|
||||||
val pomFile = generatePomFileForLibraryPublication.get().destination
|
val pomFile = generatePomFileForLibraryPublication.get().destination
|
||||||
assert(pomFile.exists())
|
assert(pomFile.exists())
|
||||||
|
|
||||||
val text = pomFile.readText()
|
val text = pomFile.readText()
|
||||||
|
|
||||||
run {
|
run {
|
||||||
val unresolvedVersion = Regex("<version>.*[+,()\\[\\]].*</version>")
|
val unresolvedVersion = Regex("<version>.*[+,()\\[\\]].*</version>")
|
||||||
val matches = unresolvedVersion.findAll(text).toList()
|
val matches = unresolvedVersion.findAll(text).toList()
|
||||||
if (matches.isNotEmpty()) {
|
if (matches.isNotEmpty()) {
|
||||||
throw GradleException(
|
throw GradleException(
|
||||||
"""
|
"""
|
||||||
Found unresolved version selector(s) in generated POM:
|
Found unresolved version selector(s) in generated POM:
|
||||||
${matches.joinToString("\n") { it.groupValues[0] }}
|
${matches.joinToString("\n") { it.groupValues[0] }}
|
||||||
"""
|
""".trimIndent()
|
||||||
.trimIndent()
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val buildInfo = project.extensions.getByType<BuildInfo>()
|
val buildInfo = project.extensions.getByType<BuildInfo>()
|
||||||
if (buildInfo.isReleaseBuild) {
|
if (buildInfo.isReleaseBuild) {
|
||||||
val snapshotVersion = Regex("<version>.*-SNAPSHOT</version>")
|
val snapshotVersion = Regex("<version>.*-SNAPSHOT</version>")
|
||||||
val matches = snapshotVersion.findAll(text).toList()
|
val matches = snapshotVersion.findAll(text).toList()
|
||||||
if (matches.isNotEmpty()) {
|
if (matches.isNotEmpty()) {
|
||||||
throw GradleException(
|
throw GradleException(
|
||||||
"""
|
"""
|
||||||
Found snapshot version(s) in generated POM of Pkl release version:
|
Found snapshot version(s) in generated POM of Pkl release version:
|
||||||
${matches.joinToString("\n") { it.groupValues[0] }}
|
${matches.joinToString("\n") { it.groupValues[0] }}
|
||||||
"""
|
""".trimIndent()
|
||||||
.trimIndent()
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
outputFile.get().asFile.writeText("OK")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outputFile.writeText("OK")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.publish { dependsOn(validatePom) }
|
tasks.publish {
|
||||||
|
dependsOn(validatePom)
|
||||||
// Workaround for maven publish plugin not setting up dependencies correctly.
|
|
||||||
// Taken from https://github.com/gradle/gradle/issues/26091#issuecomment-1798137734
|
|
||||||
val dependsOnTasks = mutableListOf<String>()
|
|
||||||
|
|
||||||
tasks.withType<AbstractPublishToMaven>().configureEach {
|
|
||||||
dependsOnTasks.add(name.replace("publish", "sign").replaceAfter("Publication", ""))
|
|
||||||
dependsOn(dependsOnTasks)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
// provided as env vars `ORG_GRADLE_PROJECT_signingKey` and `ORG_GRADLE_PROJECT_signingPassword`
|
// provided as env vars `ORG_GRADLE_PROJECT_signingKey` and `ORG_GRADLE_PROJECT_signingPassword`
|
||||||
// in CI.
|
// in CI.
|
||||||
val signingKey =
|
val signingKey = (findProperty("signingKey") as String?)
|
||||||
(findProperty("signingKey") as String?)?.let {
|
?.let { Base64.getDecoder().decode(it).toString(StandardCharsets.US_ASCII) }
|
||||||
Base64.getDecoder().decode(it).toString(StandardCharsets.US_ASCII)
|
|
||||||
}
|
|
||||||
val signingPassword = findProperty("signingPassword") as String?
|
val signingPassword = findProperty("signingPassword") as String?
|
||||||
if (signingKey != null && signingPassword != null) {
|
if (signingKey != null && signingPassword != null) {
|
||||||
useInMemoryPgpKeys(signingKey, signingPassword)
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Copyright © $YEAR Apple Inc. and the Pkl project authors. All rights reserved.
|
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © $YEAR Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: main
|
name: main
|
||||||
title: Main Project
|
title: Main Project
|
||||||
version: 0.27.2
|
version: 0.25.3
|
||||||
prerelease: false
|
prerelease: false
|
||||||
nav:
|
nav:
|
||||||
- nav.adoc
|
- nav.adoc
|
||||||
|
|||||||
+12
-26
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@@ -25,25 +10,26 @@ sourceSets {
|
|||||||
java {
|
java {
|
||||||
srcDir(file("modules/pkl-core/examples"))
|
srcDir(file("modules/pkl-core/examples"))
|
||||||
srcDir(file("modules/pkl-config-java/examples"))
|
srcDir(file("modules/pkl-config-java/examples"))
|
||||||
srcDir(file("modules/java-binding/examples"))
|
|
||||||
}
|
}
|
||||||
val kotlin = project.extensions.getByType<KotlinJvmProjectExtension>().sourceSets[name].kotlin
|
val kotlin = project.extensions
|
||||||
kotlin.srcDir(file("modules/kotlin-binding/examples"))
|
.getByType<KotlinJvmProjectExtension>()
|
||||||
|
.sourceSets[name]
|
||||||
|
.kotlin
|
||||||
|
kotlin.srcDir(file("modules/pkl-config-kotlin/examples"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation(projects.pklCore)
|
testImplementation(project(":pkl-core"))
|
||||||
testImplementation(projects.pklConfigJava)
|
testImplementation(project(":pkl-config-java"))
|
||||||
testImplementation(projects.pklConfigKotlin)
|
testImplementation(project(":pkl-config-kotlin"))
|
||||||
testImplementation(projects.pklCommonsTest)
|
testImplementation(project(":pkl-commons-test"))
|
||||||
testImplementation(libs.junitEngine)
|
testImplementation(libs.junitEngine)
|
||||||
testImplementation(libs.antlrRuntime)
|
testImplementation(libs.antlrRuntime)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
inputs
|
inputs.files(fileTree("modules").matching {
|
||||||
.files(fileTree("modules").matching { include("**/pages/*.adoc") })
|
include("**/pages/*.adoc")
|
||||||
.withPropertyName("asciiDocFiles")
|
})
|
||||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-14
@@ -2,13 +2,13 @@
|
|||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.tunnelvisionlabs:antlr4-runtime:4.9.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.tunnelvisionlabs:antlr4-runtime:4.9.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
|
io.leangen.geantyref:geantyref:1.3.14=testRuntimeClasspath
|
||||||
net.bytebuddy:byte-buddy:1.14.18=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.26.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:23.0.6=testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:22.3.1=testRuntimeClasspath
|
||||||
org.graalvm.truffle:truffle-api:23.0.6=testRuntimeClasspath
|
org.graalvm.truffle:truffle-api:22.3.1=testRuntimeClasspath
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
@@ -24,14 +24,13 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=testCompileClasspath,testImplemen
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains:annotations:13.0=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-params:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-commons:1.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.platform:junit-platform-engine:1.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-engine:1.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit:junit-bom:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.msgpack:msgpack-core:0.9.8=testRuntimeClasspath
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
|
||||||
org.snakeyaml:snakeyaml-engine:2.5=testRuntimeClasspath
|
org.snakeyaml:snakeyaml-engine:2.5=testRuntimeClasspath
|
||||||
empty=annotationProcessor,apiDependenciesMetadata,compileClasspath,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtimeClasspath,runtimeOnlyDependenciesMetadata,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions
|
empty=annotationProcessor,apiDependenciesMetadata,archives,compile,compileClasspath,compileOnly,compileOnlyDependenciesMetadata,default,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeClasspath,runtimeOnlyDependenciesMetadata,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
= Evolution and Roadmap
|
|
||||||
|
|
||||||
:uri-pkl-roadmap: https://github.com/orgs/apple/projects/12/views/1
|
|
||||||
:uri-pkl-evolution: https://github.com/apple/pkl-evolution
|
|
||||||
|
|
||||||
== Evolution
|
|
||||||
|
|
||||||
Sometimes, a change to Pkl is large enough that it makes sense to create a proposal for the change so that it can be discussed in detail and vetted.
|
|
||||||
|
|
||||||
Pkl has a process for managing such designs in a repository called {uri-pkl-evolution}[Pkl Evolutiuon].
|
|
||||||
|
|
||||||
== Roadmap
|
|
||||||
|
|
||||||
To discover what might be coming in future versions, reference the {uri-pkl-roadmap}[Pkl Roadmap] project on GitHub.
|
|
||||||
|
|
||||||
The roadmap describes estimates.
|
|
||||||
The Pkl team aims to cut a release in February, June, and October of each year.
|
|
||||||
If an item is not complete by the release cutoff date, the roadmap item may be bumped to the next release.
|
|
||||||
|
|
||||||
Additionally, as priorities change, it is possible that items can be moved around, or backlogged.
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
= User Manual
|
= User Manual
|
||||||
include::../partials/component-attributes.adoc[]
|
include::../partials/component-attributes.adoc[]
|
||||||
|
|
||||||
Quick Links:
|
Quick Links: xref:pkl-cli:index.adoc#installation[Installation] | xref:language-reference:index.adoc[Language Reference]
|
||||||
xref:pkl-cli:index.adoc#installation[Installation]
|
|
||||||
| xref:language-reference:index.adoc[Language Reference]
|
|
||||||
| https://pkl-lang.org/package-docs/pkl/current/index.html[Standard Library]
|
|
||||||
|
|
||||||
Pkl -- pronounced _Pickle_ -- is an embeddable configuration language which provides rich support for data templating and validation.
|
Pkl -- pronounced _Pickle_ -- is an embeddable configuration language which provides rich support for data templating and validation.
|
||||||
It can be used from the command line, integrated in a build pipeline, or embedded in a program.
|
It can be used from the command line, integrated in a build pipeline, or embedded in a program.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// the following attributes must be updated immediately before a release
|
// the following attributes must be updated immediately before a release
|
||||||
|
|
||||||
// pkl version corresponding to current git commit without -dev suffix or git hash
|
// pkl version corresponding to current git commit without -dev suffix or git hash
|
||||||
:pkl-version-no-suffix: 0.27.2
|
:pkl-version-no-suffix: 0.25.3
|
||||||
// tells whether pkl version corresponding to current git commit
|
// tells whether pkl version corresponding to current git commit
|
||||||
// is a release version (:is-release-version: '') or dev version (:!is-release-version:)
|
// is a release version (:is-release-version: '') or dev version (:!is-release-version:)
|
||||||
:is-release-version: ''
|
:is-release-version: ''
|
||||||
@@ -68,18 +68,15 @@ endif::[]
|
|||||||
:uri-pkldoc-example: {uri-pkl-examples-tree}/pkldoc
|
:uri-pkldoc-example: {uri-pkl-examples-tree}/pkldoc
|
||||||
|
|
||||||
:uri-stdlib-baseModule: {uri-pkl-stdlib-docs}/base
|
:uri-stdlib-baseModule: {uri-pkl-stdlib-docs}/base
|
||||||
:uri-stdlib-analyzeModule: {uri-pkl-stdlib-docs}/analyze
|
|
||||||
:uri-stdlib-jsonnetModule: {uri-pkl-stdlib-docs}/jsonnet
|
:uri-stdlib-jsonnetModule: {uri-pkl-stdlib-docs}/jsonnet
|
||||||
:uri-stdlib-reflectModule: {uri-pkl-stdlib-docs}/reflect
|
:uri-stdlib-reflectModule: {uri-pkl-stdlib-docs}/reflect
|
||||||
:uri-stdlib-xmlModule: {uri-pkl-stdlib-docs}/xml
|
:uri-stdlib-xmlModule: {uri-pkl-stdlib-docs}/xml
|
||||||
:uri-stdlib-protobufModule: {uri-pkl-stdlib-docs}/protobuf
|
:uri-stdlib-protobufModule: {uri-pkl-stdlib-docs}/protobuf
|
||||||
:uri-stdlib-evaluatorSettingsModule: {uri-pkl-stdlib-docs}/EvaluatorSettings
|
|
||||||
:uri-stdlib-Boolean: {uri-stdlib-baseModule}/Boolean
|
:uri-stdlib-Boolean: {uri-stdlib-baseModule}/Boolean
|
||||||
:uri-stdlib-xor: {uri-stdlib-baseModule}/Boolean#xor()
|
:uri-stdlib-xor: {uri-stdlib-baseModule}/Boolean#xor()
|
||||||
:uri-stdlib-implies: {uri-stdlib-baseModule}/Boolean#implies()
|
:uri-stdlib-implies: {uri-stdlib-baseModule}/Boolean#implies()
|
||||||
:uri-stdlib-Any: {uri-stdlib-baseModule}/Any
|
:uri-stdlib-Any: {uri-stdlib-baseModule}/Any
|
||||||
:uri-stdlib-String: {uri-stdlib-baseModule}/String
|
:uri-stdlib-String: {uri-stdlib-baseModule}/String
|
||||||
:uri-stdlib-StringToInt: {uri-stdlib-baseModule}/String#toInt()
|
|
||||||
:uri-stdlib-Int: {uri-stdlib-baseModule}/Int
|
:uri-stdlib-Int: {uri-stdlib-baseModule}/Int
|
||||||
:uri-stdlib-Float: {uri-stdlib-baseModule}/Float
|
:uri-stdlib-Float: {uri-stdlib-baseModule}/Float
|
||||||
:uri-stdlib-Number: {uri-stdlib-baseModule}/Number
|
:uri-stdlib-Number: {uri-stdlib-baseModule}/Number
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Currently, Pkl must be embedded as a child process, by shelling out to the CLI u
|
|||||||
When embedded, communication between a host application and Pkl happens via message passing.
|
When embedded, communication between a host application and Pkl happens via message passing.
|
||||||
The message passing specification can be found in xref:message-passing-api.adoc[].
|
The message passing specification can be found in xref:message-passing-api.adoc[].
|
||||||
|
|
||||||
For examples of language bindings in practice, review the link:{uri-pkl-go-github}[pkl-go], or the link:{uri-pkl-swift-github}[pkl-swift] codebases.
|
For examples of language bindings in practice, review the xref:{uri-pkl-go-github}[pkl-go], or the xref:{uri-pkl-swift-github}[pkl-swift] codebases.
|
||||||
|
|
||||||
NOTE: Pkl's Java and Kotlin libraries binds to Pkl directly, and do not use message passing.
|
NOTE: Pkl's Java and Kotlin libraries binds to Pkl directly, and do not use message passing.
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ The first element of the array is a code that designates the message's type, enc
|
|||||||
The second element of the array is the message body, encoded as a map.
|
The second element of the array is the message body, encoded as a map.
|
||||||
|
|
||||||
Messages are passed between the _client_ and the _server_.
|
Messages are passed between the _client_ and the _server_.
|
||||||
When hosting Pkl (for example, the Swift application when using pkl-swift), the _client_ is the host program and the _server_ is the entity that provides controls for interacting with Pkl.
|
The _client_ is the host language (for example, the Swift application when using pkl-swift).
|
||||||
When implementing an xref:language-reference:index.adoc#external-readers[external reader], the _client_ is the external reader process and the _server_ is the Pkl evaluator.
|
The _server_ is the entity that provides controls for interacting with Pkl.
|
||||||
|
|
||||||
For example, in JSON representation:
|
For example, in JSON representation:
|
||||||
|
|
||||||
@@ -121,11 +121,6 @@ outputFormat: String?
|
|||||||
/// The project dependency settings.
|
/// The project dependency settings.
|
||||||
project: Project?
|
project: Project?
|
||||||
|
|
||||||
/// Configuration of outgoing HTTP(s) requests.
|
|
||||||
///
|
|
||||||
/// Added in Pkl 0.26.0.
|
|
||||||
http: Http?
|
|
||||||
|
|
||||||
class ClientResourceReader {
|
class ClientResourceReader {
|
||||||
/// The URI scheme this reader is responsible for reading.
|
/// The URI scheme this reader is responsible for reading.
|
||||||
scheme: String
|
scheme: String
|
||||||
@@ -194,62 +189,7 @@ class Checksums {
|
|||||||
/// The sha-256 checksum of this dependency's metadata.
|
/// The sha-256 checksum of this dependency's metadata.
|
||||||
sha256: String
|
sha256: String
|
||||||
}
|
}
|
||||||
|
|
||||||
class Http {
|
|
||||||
/// PEM format certificates to trust when making HTTP requests.
|
|
||||||
///
|
|
||||||
/// If [null], Pkl will trust its own built-in certificates.
|
|
||||||
caCertificates: Binary?
|
|
||||||
|
|
||||||
/// Configuration of the HTTP proxy to use.
|
|
||||||
///
|
|
||||||
/// If [null], uses the operating system's proxy configuration.
|
|
||||||
proxy: Proxy?
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Settings that control how Pkl talks to HTTP proxies.
|
|
||||||
class Proxy {
|
|
||||||
/// The proxy to use for HTTP(S) connections.
|
|
||||||
///
|
|
||||||
/// At the moment, only HTTP proxies are supported.
|
|
||||||
///
|
|
||||||
/// Example:
|
|
||||||
/// ```
|
|
||||||
/// address = "http://my.proxy.example.com:5080"
|
|
||||||
/// ```
|
|
||||||
address: Uri(startsWith("http://"))?
|
|
||||||
|
|
||||||
/// Hosts to which all connections should bypass a proxy.
|
|
||||||
///
|
|
||||||
/// Values can be either hostnames, or IP addresses.
|
|
||||||
/// IP addresses can optionally be provided using [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation).
|
|
||||||
///
|
|
||||||
/// The only wildcard is `"*"`, which disables all proxying.
|
|
||||||
///
|
|
||||||
/// A hostname matches all subdomains.
|
|
||||||
/// For example, `example.com` matches `foo.example.com`, but not `fooexample.com`.
|
|
||||||
/// A hostname that is prefixed with a dot matches the hostname itself,
|
|
||||||
/// so `.example.com` matches `example.com`.
|
|
||||||
///
|
|
||||||
/// Optionally, a port can be specified.
|
|
||||||
/// If a port is omitted, all ports are matched.
|
|
||||||
///
|
|
||||||
/// Example:
|
|
||||||
///
|
|
||||||
/// ```
|
|
||||||
/// noProxy {
|
|
||||||
/// "127.0.0.1"
|
|
||||||
/// "169.254.0.0/16"
|
|
||||||
/// "example.com"
|
|
||||||
/// "localhost:5050"
|
|
||||||
/// }
|
|
||||||
/// ```
|
|
||||||
noProxy: Listing<String>(isDistinct)
|
|
||||||
}
|
|
||||||
|
|
||||||
typealias Binary = Any // <1>
|
|
||||||
----
|
----
|
||||||
<1> link:{uri-messagepack-bin}[bin format] (not expressable in Pkl)
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
[source,json5]
|
[source,json5]
|
||||||
@@ -414,8 +354,6 @@ The response to <<read-resource-request>>.
|
|||||||
If successful, `contents` is set.
|
If successful, `contents` is set.
|
||||||
Otherwise, `error` is set.
|
Otherwise, `error` is set.
|
||||||
|
|
||||||
If neither is set, `contents` defaults to an empty byte array.
|
|
||||||
|
|
||||||
[source,pkl]
|
[source,pkl]
|
||||||
----
|
----
|
||||||
/// A number identifying this request.
|
/// A number identifying this request.
|
||||||
@@ -465,8 +403,6 @@ The response to <<read-module-request>>.
|
|||||||
If successful, `contents` is set.
|
If successful, `contents` is set.
|
||||||
Otherwise, `error` is set.
|
Otherwise, `error` is set.
|
||||||
|
|
||||||
If neither is set, `contents` defaults to an empty string.
|
|
||||||
|
|
||||||
[source,pkl]
|
[source,pkl]
|
||||||
----
|
----
|
||||||
/// A number identifying this request.
|
/// A number identifying this request.
|
||||||
@@ -515,8 +451,6 @@ The response to <<list-resources-request>>.
|
|||||||
If successful, `pathElements` is set.
|
If successful, `pathElements` is set.
|
||||||
Otherwise, `error` is set.
|
Otherwise, `error` is set.
|
||||||
|
|
||||||
If neither are set, `pathElements` default to an empty list.
|
|
||||||
|
|
||||||
[source,pkl]
|
[source,pkl]
|
||||||
----
|
----
|
||||||
/// A number identifying this request.
|
/// A number identifying this request.
|
||||||
@@ -573,8 +507,6 @@ The response to <<list-modules-request>>.
|
|||||||
If successful, `pathElements` is set.
|
If successful, `pathElements` is set.
|
||||||
Otherwise, `error` is set.
|
Otherwise, `error` is set.
|
||||||
|
|
||||||
If neither are set, `pathElements` default to an empty list.
|
|
||||||
|
|
||||||
[source,pkl]
|
[source,pkl]
|
||||||
----
|
----
|
||||||
/// A number identifying this request.
|
/// A number identifying this request.
|
||||||
@@ -597,96 +529,3 @@ class PathElement {
|
|||||||
isDirectory: Boolean
|
isDirectory: Boolean
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
[[initialize-module-reader-request]]
|
|
||||||
=== Initialize Module Reader Request
|
|
||||||
|
|
||||||
Code: `0x2e` +
|
|
||||||
Type: <<server-message,Server>> <<request-message,Request>>
|
|
||||||
|
|
||||||
Initialize an xref:language-reference:index.adoc#external-readers[External Module Reader].
|
|
||||||
This message is sent to external reader processes the first time a module scheme it is registered for is read.
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
/// A number identifying this request.
|
|
||||||
requestId: Int
|
|
||||||
|
|
||||||
/// The module scheme to initialize.
|
|
||||||
scheme: String
|
|
||||||
----
|
|
||||||
|
|
||||||
[[initialize-module-reader-response]]
|
|
||||||
=== Initialize Module Reader Response
|
|
||||||
|
|
||||||
Code: `0x2f` +
|
|
||||||
Type: <<client-message,Client>> <<response-message,Response>>
|
|
||||||
|
|
||||||
Return the requested external module reader specification.
|
|
||||||
The `spec` field should be set to `null` when the external process does not implement the requested module scheme.
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
/// A number identifying this request.
|
|
||||||
requestId: Int
|
|
||||||
|
|
||||||
/// Client-side module reader spec.
|
|
||||||
///
|
|
||||||
/// Null when the external process does not implement the requested module scheme.
|
|
||||||
spec: ClientModuleReader?
|
|
||||||
----
|
|
||||||
|
|
||||||
`ClientModuleReader` is defined above by <<create-evaluator-request,Create Evaluator Request>>.
|
|
||||||
|
|
||||||
[[initialize-resource-reader-request]]
|
|
||||||
=== Initialize Resource Reader Request
|
|
||||||
|
|
||||||
Code: `0x30` +
|
|
||||||
Type: <<server-message,Server>> <<request-message,Request>>
|
|
||||||
|
|
||||||
Initialize an xref:language-reference:index.adoc#external-readers[External Resource Reader].
|
|
||||||
This message is sent to external reader processes the first time a resource scheme it is registered for is read.
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
/// A number identifying this request.
|
|
||||||
requestId: Int
|
|
||||||
|
|
||||||
/// The resource scheme to initialize.
|
|
||||||
scheme: String
|
|
||||||
----
|
|
||||||
|
|
||||||
[[initialize-resource-reader-response]]
|
|
||||||
=== Initialize Resource Reader Response
|
|
||||||
|
|
||||||
Code: `0x31` +
|
|
||||||
Type: <<client-message,Client>> <<response-message,Response>>
|
|
||||||
|
|
||||||
Return the requested external resource reader specification.
|
|
||||||
The `spec` field should be set to `null` when the external process does not implement the requested resource scheme.
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
/// A number identifying this request.
|
|
||||||
requestId: Int
|
|
||||||
|
|
||||||
/// Client-side resource reader spec.
|
|
||||||
///
|
|
||||||
/// Null when the external process does not implement the requested resource scheme.
|
|
||||||
spec: ClientResourceReader?
|
|
||||||
----
|
|
||||||
|
|
||||||
`ClientResourceReader` is defined above by <<create-evaluator-request,Create Evaluator Request>>.
|
|
||||||
|
|
||||||
[[close-external-process]]
|
|
||||||
=== Close External Process
|
|
||||||
|
|
||||||
Code: `0x32` +
|
|
||||||
Type: <<server-message,Server>> <<one-way-message,One Way>>
|
|
||||||
|
|
||||||
Initiate graceful shutdown of the external reader process.
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
/// This message has no properties.
|
|
||||||
----
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import org.pkl.config.java.Config;
|
import org.pkl.config.java.Config;
|
||||||
import org.pkl.config.java.ConfigEvaluator;
|
import org.pkl.config.java.ConfigEvaluator;
|
||||||
import org.pkl.config.java.JavaType;
|
import org.pkl.config.java.JavaType;
|
||||||
import org.pkl.core.ModuleSource;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
@@ -12,8 +11,8 @@ public class JavaConfigExample {
|
|||||||
// tag::usage[]
|
// tag::usage[]
|
||||||
Config config;
|
Config config;
|
||||||
try (var evaluator = ConfigEvaluator.preconfigured()) { // <1>
|
try (var evaluator = ConfigEvaluator.preconfigured()) { // <1>
|
||||||
config = evaluator.evaluate(
|
config = evaluator.evaluateText(
|
||||||
ModuleSource.text("pigeon { age = 5; diet = new Listing { \"Seeds\" } }")); // <2>
|
"pigeon { age = 5; diet = \"Seeds\" }"); // <2>
|
||||||
}
|
}
|
||||||
var pigeon = config.get("pigeon"); // <3>
|
var pigeon = config.get("pigeon"); // <3>
|
||||||
var age = pigeon.get("age").as(int.class); // <4>
|
var age = pigeon.get("age").as(int.class); // <4>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ See xref:pkl-gradle:index.adoc#installation[Installation] in the Gradle plugin c
|
|||||||
=== Java Library
|
=== Java Library
|
||||||
|
|
||||||
The `pkl-codegen-java` library is available {uri-pkl-codgen-java-maven-module}[from Maven Central].
|
The `pkl-codegen-java` library is available {uri-pkl-codgen-java-maven-module}[from Maven Central].
|
||||||
It requires Java 17 or higher.
|
It requires Java 11 or higher.
|
||||||
|
|
||||||
ifndef::is-release-version[]
|
ifndef::is-release-version[]
|
||||||
NOTE: Snapshots are published to repository `{uri-sonatype}`.
|
NOTE: Snapshots are published to repository `{uri-sonatype}`.
|
||||||
@@ -36,32 +36,13 @@ To use the library in a Gradle project, declare the following dependency:
|
|||||||
|
|
||||||
[tabs]
|
[tabs]
|
||||||
====
|
====
|
||||||
Kotlin::
|
|
||||||
+
|
|
||||||
.build.gradle.kts
|
|
||||||
[source,kotlin,subs="+attributes"]
|
|
||||||
----
|
|
||||||
dependencies {
|
|
||||||
implementation("org.pkl-lang:pkl-codegen-java:{pkl-artifact-version}")
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
ifdef::is-release-version[]
|
|
||||||
mavenCentral()
|
|
||||||
endif::[]
|
|
||||||
ifndef::is-release-version[]
|
|
||||||
maven(url = "{uri-sonatype}")
|
|
||||||
endif::[]
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
Groovy::
|
Groovy::
|
||||||
+
|
+
|
||||||
.build.gradle
|
.build.gradle
|
||||||
[source,groovy,subs="+attributes"]
|
[source,groovy,subs="+attributes"]
|
||||||
----
|
----
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.pkl-lang:pkl-codegen-java:{pkl-artifact-version}"
|
compile "org.pkl-lang:pkl-codegen-java:{pkl-artifact-version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -73,6 +54,25 @@ ifndef::is-release-version[]
|
|||||||
endif::[]
|
endif::[]
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Kotlin::
|
||||||
|
+
|
||||||
|
.build.gradle.kts
|
||||||
|
[source,kotlin,subs="+attributes"]
|
||||||
|
----
|
||||||
|
dependencies {
|
||||||
|
compile("org.pkl-lang:pkl-codegen-java:{pkl-artifact-version}")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
ifdef::is-release-version[]
|
||||||
|
mavenCentral()
|
||||||
|
endif::[]
|
||||||
|
ifndef::is-release-version[]
|
||||||
|
maven { url = uri("{uri-sonatype}") }
|
||||||
|
endif::[]
|
||||||
|
}
|
||||||
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
==== Maven
|
==== Maven
|
||||||
@@ -164,6 +164,13 @@ This annotation is required to have `java.lang.annotation.ElementType.TYPE_USE`
|
|||||||
or it may generate code that does not compile.
|
or it may generate code that does not compile.
|
||||||
====
|
====
|
||||||
|
|
||||||
|
.--implement-serializable
|
||||||
|
[%collapsible]
|
||||||
|
====
|
||||||
|
Default: (flag not set) +
|
||||||
|
Whether to make generated classes implement `java.io.Serializable`.
|
||||||
|
====
|
||||||
|
|
||||||
Common code generator options:
|
Common code generator options:
|
||||||
|
|
||||||
include::{partialsdir}/cli-codegen-options.adoc[]
|
include::{partialsdir}/cli-codegen-options.adoc[]
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ It offers a higher-level API specifically designed for consuming application run
|
|||||||
== Installation
|
== Installation
|
||||||
|
|
||||||
The _pkl-config-java_ library is available {uri-pkl-config-java-maven-module}[from Maven Central].
|
The _pkl-config-java_ library is available {uri-pkl-config-java-maven-module}[from Maven Central].
|
||||||
It requires Java 17 or higher.
|
It requires Java 11 or higher.
|
||||||
|
|
||||||
=== Gradle
|
=== Gradle
|
||||||
|
|
||||||
@@ -31,32 +31,13 @@ To use the library in a Gradle project, declare the following dependency:
|
|||||||
|
|
||||||
[tabs]
|
[tabs]
|
||||||
====
|
====
|
||||||
Kotlin::
|
|
||||||
+
|
|
||||||
.build.gradle.kts
|
|
||||||
[source,kotlin,subs="+attributes"]
|
|
||||||
----
|
|
||||||
dependencies {
|
|
||||||
implementation("org.pkl-lang:pkl-config-java:{pkl-artifact-version}")
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
ifdef::is-release-version[]
|
|
||||||
mavenCentral()
|
|
||||||
endif::[]
|
|
||||||
ifndef::is-release-version[]
|
|
||||||
maven(url = "{uri-sonatype}")
|
|
||||||
endif::[]
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
Groovy::
|
Groovy::
|
||||||
+
|
+
|
||||||
.build.gradle
|
.build.gradle
|
||||||
[source,groovy,subs="+attributes"]
|
[source,groovy,subs="+attributes"]
|
||||||
----
|
----
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.pkl-lang:pkl-config-java:{pkl-artifact-version}"
|
compile "org.pkl-lang:pkl-config-java:{pkl-artifact-version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
ifdef::is-release-version[]
|
ifdef::is-release-version[]
|
||||||
@@ -70,6 +51,25 @@ repositories {
|
|||||||
}
|
}
|
||||||
endif::[]
|
endif::[]
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Kotlin::
|
||||||
|
+
|
||||||
|
.build.gradle.kts
|
||||||
|
[source,kotlin,subs="+attributes"]
|
||||||
|
----
|
||||||
|
dependencies {
|
||||||
|
compile("org.pkl-lang:pkl-config-java:{pkl-artifact-version}")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
ifdef::is-release-version[]
|
||||||
|
mavenCentral()
|
||||||
|
endif::[]
|
||||||
|
ifndef::is-release-version[]
|
||||||
|
maven { url = uri("{uri-sonatype}") }
|
||||||
|
endif::[]
|
||||||
|
}
|
||||||
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
Unlike `pkl-config-java`, `pkl-config-java__-all__` is a fat Jar with renamed third-party packages to avoid version conflicts.
|
Unlike `pkl-config-java`, `pkl-config-java__-all__` is a fat Jar with renamed third-party packages to avoid version conflicts.
|
||||||
|
|||||||
@@ -21,57 +21,3 @@ Relative paths are resolved against the working directory.
|
|||||||
Default: (not set) +
|
Default: (not set) +
|
||||||
Flag that indicates to generate config classes for use with Spring Boot.
|
Flag that indicates to generate config classes for use with Spring Boot.
|
||||||
====
|
====
|
||||||
|
|
||||||
.--implement-serializable
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: (not set) +
|
|
||||||
Whether to make generated classes implement `java.io.Serializable`.
|
|
||||||
====
|
|
||||||
|
|
||||||
.--rename
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: (none) +
|
|
||||||
Example: `foo.=com.example.foo.` +
|
|
||||||
Allows to change default class and package names (derived from Pkl module names) in the generated code.
|
|
||||||
|
|
||||||
When you need the generated class or package names to be different from the default names derived from the Pkl module names, you can define a rename mapping, where the key is the original Pkl module name prefix, and the value is its replacement.
|
|
||||||
When you do, the generated code's `package` declarations, class names, as well as file locations, will be modified according to this mapping.
|
|
||||||
|
|
||||||
The prefixes are replaced literally, which means that dots at the end are important.
|
|
||||||
If you want to rename packages only, in most cases, you must ensure that you have an ending dot on both sides of a mapping (except for an empty mapping, if you use it), otherwise you may get unexpected results:
|
|
||||||
|
|
||||||
----
|
|
||||||
// Assuming the following arguments:
|
|
||||||
--rename com.foo.=x // Dot on the left only
|
|
||||||
--rename org.bar=y. // Dot on the right only
|
|
||||||
--rename net.baz=z // No dots
|
|
||||||
|
|
||||||
// The following renames will be made:
|
|
||||||
"com.foo.bar" -> "xbar" // Target prefix merged into the suffix
|
|
||||||
"org.bar.baz" -> "y..baz" // Double dot, invalid name
|
|
||||||
"net.baz.qux" -> "z.qux" // Looks okay, but...
|
|
||||||
"net.bazqux" -> "zqux" // ...may cut the name in the middle.
|
|
||||||
----
|
|
||||||
|
|
||||||
When computing the appropriate target name, the longest matching prefix is used:
|
|
||||||
|
|
||||||
----
|
|
||||||
// Assuming the following arguments:
|
|
||||||
--rename com.foo.Main=w.Main
|
|
||||||
--rename com.foo.=x.
|
|
||||||
--rename com.=y.
|
|
||||||
--rename =z.
|
|
||||||
|
|
||||||
// The following renames will be made:
|
|
||||||
com.foo.Main -> w.Main
|
|
||||||
com.foo.bar -> x.bar
|
|
||||||
com.baz.qux -> y.baz.qux
|
|
||||||
org.foo.bar -> z.org.foo.bar
|
|
||||||
----
|
|
||||||
|
|
||||||
Repeat this option to define multiple mappings.
|
|
||||||
Keys can be arbitrary strings, including an empty string.
|
|
||||||
Values must be valid dot-separated fully qualified class name prefixes, possibly terminated by a dot.
|
|
||||||
====
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
import org.pkl.config.java.ConfigEvaluator
|
import org.pkl.config.java.ConfigEvaluator
|
||||||
import org.pkl.config.kotlin.forKotlin
|
import org.pkl.config.kotlin.forKotlin
|
||||||
import org.pkl.config.kotlin.to
|
import org.pkl.config.kotlin.to
|
||||||
import org.pkl.core.ModuleSource
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
// the pkl/pkl-examples repo has a similar example
|
// the pkl/pkl-examples repo has a similar example
|
||||||
@@ -13,7 +12,7 @@ class KotlinConfigExample {
|
|||||||
// tag::usage[]
|
// tag::usage[]
|
||||||
val evaluator = ConfigEvaluator.preconfigured().forKotlin() // <1>
|
val evaluator = ConfigEvaluator.preconfigured().forKotlin() // <1>
|
||||||
val config = evaluator.use { // <2>
|
val config = evaluator.use { // <2>
|
||||||
it.evaluate(ModuleSource.text("""pigeon { age = 5; diet = new Listing { "Seeds" } }"""))
|
it.evaluateText("""pigeon { age = 5; diet = "Seeds" }""")
|
||||||
}
|
}
|
||||||
val pigeon = config["pigeon"] // <3>
|
val pigeon = config["pigeon"] // <3>
|
||||||
val age = pigeon["age"].to<Int>() // <4>
|
val age = pigeon["age"].to<Int>() // <4>
|
||||||
@@ -26,7 +25,7 @@ class KotlinConfigExample {
|
|||||||
// tag::nullable[]
|
// tag::nullable[]
|
||||||
val evaluator = ConfigEvaluator.preconfigured().forKotlin()
|
val evaluator = ConfigEvaluator.preconfigured().forKotlin()
|
||||||
val config = evaluator.use {
|
val config = evaluator.use {
|
||||||
it.evaluate(ModuleSource.text("name = null")) // <1>
|
it.evaluateText("name = null") // <1>
|
||||||
}
|
}
|
||||||
val name = config["name"].to<String?>() // <2>
|
val name = config["name"].to<String?>() // <2>
|
||||||
// end::nullable[]
|
// end::nullable[]
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ See xref:pkl-gradle:index.adoc#installation[Installation] in the Gradle plugin c
|
|||||||
=== Java Library
|
=== Java Library
|
||||||
|
|
||||||
The `pkl-codegen-kotlin` library is available {uri-pkl-codegen-kotlin-maven-module}[from Maven Central].
|
The `pkl-codegen-kotlin` library is available {uri-pkl-codegen-kotlin-maven-module}[from Maven Central].
|
||||||
It requires Java 17 or higher and Kotlin 1.3 or higher.
|
It requires Java 11 or higher and Kotlin 1.3 or higher.
|
||||||
|
|
||||||
==== Gradle
|
==== Gradle
|
||||||
|
|
||||||
@@ -27,32 +27,13 @@ To use the library in a Gradle project, declare the following dependency:
|
|||||||
|
|
||||||
[tabs]
|
[tabs]
|
||||||
====
|
====
|
||||||
Kotlin::
|
|
||||||
+
|
|
||||||
.build.gradle.kts
|
|
||||||
[source,kotlin,subs="+attributes"]
|
|
||||||
----
|
|
||||||
dependencies {
|
|
||||||
implementation("org.pkl-lang:pkl-codegen-kotlin:{pkl-artifact-version}")
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
ifdef::is-release-version[]
|
|
||||||
mavenCentral()
|
|
||||||
endif::[]
|
|
||||||
ifndef::is-release-version[]
|
|
||||||
maven(url = "{uri-sonatype}")
|
|
||||||
endif::[]
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
Groovy::
|
Groovy::
|
||||||
+
|
+
|
||||||
.build.gradle
|
.build.gradle
|
||||||
[source,groovy,subs="+attributes"]
|
[source,groovy,subs="+attributes"]
|
||||||
----
|
----
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.pkl-lang:pkl-codegen-kotlin:{pkl-artifact-version}"
|
compile "org.pkl-lang:pkl-codegen-kotlin:{pkl-artifact-version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -64,6 +45,25 @@ ifndef::is-release-version[]
|
|||||||
endif::[]
|
endif::[]
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Kotlin::
|
||||||
|
+
|
||||||
|
.build.gradle.kts
|
||||||
|
[source,kotlin,subs="+attributes"]
|
||||||
|
----
|
||||||
|
dependencies {
|
||||||
|
compile("org.pkl-lang:pkl-codegen-kotlin:{pkl-artifact-version}")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
ifdef::is-release-version[]
|
||||||
|
mavenCentral()
|
||||||
|
endif::[]
|
||||||
|
ifndef::is-release-version[]
|
||||||
|
maven { url = uri("{uri-sonatype}") }
|
||||||
|
endif::[]
|
||||||
|
}
|
||||||
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
==== Maven
|
==== Maven
|
||||||
@@ -109,7 +109,7 @@ To run the CLI, execute the library Jar or its `org.pkl.codegen.kotlin.Main` mai
|
|||||||
*Synopsis:* `java -cp <classpath> -jar pkl-codegen-kotlin.jar [<options>] <modules>`
|
*Synopsis:* `java -cp <classpath> -jar pkl-codegen-kotlin.jar [<options>] <modules>`
|
||||||
|
|
||||||
`<modules>`::
|
`<modules>`::
|
||||||
The absolute or relative URIs of the modules to generate classes for.
|
The absolute or relative URIs of the modules to generate classe for.
|
||||||
Relative URIs are resolved against the working directory.
|
Relative URIs are resolved against the working directory.
|
||||||
|
|
||||||
==== Options
|
==== Options
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ We recommend that Kotlin projects depend on this library instead of _pkl-config-
|
|||||||
== Installation
|
== Installation
|
||||||
|
|
||||||
The _pkl-config-kotlin_ library is available {uri-pkl-config-kotlin-maven-module}[from Maven Central].
|
The _pkl-config-kotlin_ library is available {uri-pkl-config-kotlin-maven-module}[from Maven Central].
|
||||||
It requires Java 17 or higher and Kotlin 1.5 or higher.
|
It requires Java 11 or higher and Kotlin 1.5 or higher.
|
||||||
|
|
||||||
=== Gradle
|
=== Gradle
|
||||||
|
|
||||||
@@ -39,6 +39,7 @@ endif::[]
|
|||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
Groovy::
|
Groovy::
|
||||||
+
|
+
|
||||||
.build.gradle
|
.build.gradle
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
@@ -33,7 +33,7 @@ parrot = (bird) {
|
|||||||
----
|
----
|
||||||
|
|
||||||
Parrot and Pigeon have nearly identical properties.
|
Parrot and Pigeon have nearly identical properties.
|
||||||
They only differ in their name and taxonomy, so if you have already written out `bird`, you can say that `parrot` is just like `bird` except `name` is `"Parrot"`, diet is `"Berries"` the `taxonomy.order` is `"Psittaciformes"`.
|
They only differ in their name and taxonomy, so if you have already written out `bird`, you can say that `parrot` is just like `pigeon` except `name` is `"Parrot"`, diet is `"Berries"` the `taxonomy.order` is `"Psittaciformes"`.
|
||||||
When you run this, Pkl expands everything fully.
|
When you run this, Pkl expands everything fully.
|
||||||
|
|
||||||
[source,{pkl}]
|
[source,{pkl}]
|
||||||
@@ -58,12 +58,9 @@ parrot {
|
|||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
[NOTE]
|
[IMPORTANT]
|
||||||
====
|
====
|
||||||
So far, you have only worked with link:{uri-stdlib-Dynamic}[Dynamic] objects.
|
_Amending_ does not allow us to _add_ properties to the (typed) object we are amending.
|
||||||
Pkl also offers link:{uri-stdlib-Typed}[Typed] objects.
|
|
||||||
_Amending_ allows you to override, amend, and add new properties to a dynamic object.
|
|
||||||
Typed objects will only let you amend or override existing properties, not add entirely new ones.
|
|
||||||
The xref:03_writing_a_template.adoc[next part of the tutorial] discusses types in more detail.
|
The xref:03_writing_a_template.adoc[next part of the tutorial] discusses types in more detail.
|
||||||
There, you see that amending _never changes the type_ of the object.
|
There, you see that amending _never changes the type_ of the object.
|
||||||
====
|
====
|
||||||
@@ -75,25 +72,22 @@ Consider the following example.
|
|||||||
[source,{pkl}]
|
[source,{pkl}]
|
||||||
.nestedAmends.pkl
|
.nestedAmends.pkl
|
||||||
----
|
----
|
||||||
stockPigeon {
|
woodPigeon {
|
||||||
name = "Stock pigeon"
|
name = "Common wood pigeon"
|
||||||
diet = "Seeds"
|
diet = "Seeds"
|
||||||
taxonomy {
|
taxonomy {
|
||||||
kingdom = "Animalia"
|
|
||||||
clade = "Columbimorphae"
|
|
||||||
order = "Columbiformes"
|
|
||||||
species = "Columba oenas"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
woodPigeon = (stockPigeon) {
|
|
||||||
name = "Common wood pigeon"
|
|
||||||
taxonomy { // <1>
|
|
||||||
species = "Columba palumbus"
|
species = "Columba palumbus"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dodo = (woodPigeon) { // <2>
|
stockPigeon = (woodPigeon) {
|
||||||
|
name = "Stock pigeon"
|
||||||
|
taxonomy { // <1>
|
||||||
|
species = "Columba oenas"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dodo = (stockPigeon) { // <2>
|
||||||
name = "Dodo"
|
name = "Dodo"
|
||||||
extinct = true // <3>
|
extinct = true // <3>
|
||||||
taxonomy {
|
taxonomy {
|
||||||
@@ -106,7 +100,7 @@ dodo = (woodPigeon) { // <2>
|
|||||||
<3> New fields can be added to objects when amending.
|
<3> New fields can be added to objects when amending.
|
||||||
|
|
||||||
Notice how you only have to change `taxonomy.species`.
|
Notice how you only have to change `taxonomy.species`.
|
||||||
In this example, `stockPigeon.taxonomy` has `kingdom`, `clade`, `order` and `species`.
|
In this example, `bird.taxonomy` has `kingdom`, `clade`, `order` and `species`.
|
||||||
You are amending `stockPigeon`, to define `woodPigeon`.
|
You are amending `stockPigeon`, to define `woodPigeon`.
|
||||||
They have the same `taxonomy`, except for `species`.
|
They have the same `taxonomy`, except for `species`.
|
||||||
This notation says that everything in `taxonomy` should be what it is in the object you are amending (`stockPigeon`), except for `species`, which should be `"Columba palumbus"` .
|
This notation says that everything in `taxonomy` should be what it is in the object you are amending (`stockPigeon`), except for `species`, which should be `"Columba palumbus"` .
|
||||||
@@ -114,36 +108,27 @@ This notation says that everything in `taxonomy` should be what it is in the obj
|
|||||||
For the input above, Pkl produces the following output.
|
For the input above, Pkl produces the following output.
|
||||||
[source,{pkl}]
|
[source,{pkl}]
|
||||||
----
|
----
|
||||||
stockPigeon {
|
|
||||||
name = "Stock pigeon"
|
|
||||||
diet = "Seeds"
|
|
||||||
taxonomy {
|
|
||||||
kingdom = "Animalia"
|
|
||||||
clade = "Columbimorphae"
|
|
||||||
order = "Columbiformes"
|
|
||||||
species = "Columba oenas"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
woodPigeon {
|
woodPigeon {
|
||||||
name = "Common wood pigeon"
|
name = "Common wood pigeon"
|
||||||
diet = "Seeds"
|
diet = "Seeds"
|
||||||
taxonomy {
|
taxonomy {
|
||||||
kingdom = "Animalia"
|
|
||||||
clade = "Columbimorphae"
|
|
||||||
order = "Columbiformes"
|
|
||||||
species = "Columba palumbus"
|
species = "Columba palumbus"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stockPigeon {
|
||||||
|
name = "Stock pigeon"
|
||||||
|
diet = "Seeds"
|
||||||
|
taxonomy {
|
||||||
|
species = "Columba oenas"
|
||||||
|
}
|
||||||
|
}
|
||||||
dodo {
|
dodo {
|
||||||
name = "Dodo"
|
name = "Dodo"
|
||||||
diet = "Seeds"
|
diet = "Seeds"
|
||||||
|
extinct = true
|
||||||
taxonomy {
|
taxonomy {
|
||||||
kingdom = "Animalia"
|
|
||||||
clade = "Columbimorphae"
|
|
||||||
order = "Columbiformes"
|
|
||||||
species = "Raphus cucullatus"
|
species = "Raphus cucullatus"
|
||||||
}
|
}
|
||||||
extinct = true
|
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -221,8 +206,6 @@ Going back to the example above, you can write `parrot` as a separate module.
|
|||||||
name = "Common wood pigeon"
|
name = "Common wood pigeon"
|
||||||
diet = "Seeds"
|
diet = "Seeds"
|
||||||
taxonomy {
|
taxonomy {
|
||||||
kingdom = "Animalia"
|
|
||||||
clade = "Dinosauria"
|
|
||||||
species = "Columba palumbus"
|
species = "Columba palumbus"
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@@ -253,8 +236,6 @@ $ pkl eval /Users/me/tutorial/pigeon.pkl
|
|||||||
name = "Common wood pigeon"
|
name = "Common wood pigeon"
|
||||||
diet = "Seeds"
|
diet = "Seeds"
|
||||||
taxonomy {
|
taxonomy {
|
||||||
kingdom = "Animalia"
|
|
||||||
clade = "Dinosauria"
|
|
||||||
species = "Columba palumbus"
|
species = "Columba palumbus"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,8 +244,6 @@ parrot {
|
|||||||
name = "Great green macaw"
|
name = "Great green macaw"
|
||||||
diet = "Berries"
|
diet = "Berries"
|
||||||
taxonomy {
|
taxonomy {
|
||||||
kingdom = "Animalia"
|
|
||||||
clade = "Dinosauria"
|
|
||||||
species = "Ara ambiguus"
|
species = "Ara ambiguus"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -296,9 +275,9 @@ This terminology describes the _intended use_ of the module and doesn't imply an
|
|||||||
In other words: just by looking at Pkl code, you can't tell whether it is a template or a "normal" module.
|
In other words: just by looking at Pkl code, you can't tell whether it is a template or a "normal" module.
|
||||||
|
|
||||||
[source,{pkl}]
|
[source,{pkl}]
|
||||||
.AcmeCICD.pkl
|
.acmecicd.pkl
|
||||||
----
|
----
|
||||||
module AcmeCICD
|
module acmecicd
|
||||||
|
|
||||||
class Pipeline {
|
class Pipeline {
|
||||||
name: String(nameRequiresBranchName)?
|
name: String(nameRequiresBranchName)?
|
||||||
@@ -328,7 +307,7 @@ Next, add a time-out of one minute for your job.
|
|||||||
[source,{pkl}]
|
[source,{pkl}]
|
||||||
.cicd.pkl
|
.cicd.pkl
|
||||||
----
|
----
|
||||||
amends "AcmeCICD.pkl"
|
amends "acmecicd.pkl"
|
||||||
|
|
||||||
timeout = 1
|
timeout = 1
|
||||||
----
|
----
|
||||||
@@ -341,7 +320,7 @@ Value: 1 // <3>
|
|||||||
|
|
||||||
225 | timeout: Int(this >= 3)? // <4>
|
225 | timeout: Int(this >= 3)? // <4>
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
at AcmeCICD#timeout (file:///Users/me/tutorial/AcmeCICD.pkl, line 8)
|
at acmecicd#timeout (file:///Users/me/tutorial/acmecicd.pkl, line 8)
|
||||||
|
|
||||||
3 | timeout = 1 // <5>
|
3 | timeout = 1 // <5>
|
||||||
^
|
^
|
||||||
@@ -381,7 +360,7 @@ Start off by specifying the name of the pipeline and nothing else.
|
|||||||
[source,{pkl}]
|
[source,{pkl}]
|
||||||
.cicd.pkl
|
.cicd.pkl
|
||||||
----
|
----
|
||||||
amends "AcmeCICD.pkl"
|
amends "acmecicd.pkl"
|
||||||
|
|
||||||
timeout = 3
|
timeout = 3
|
||||||
pipelines {
|
pipelines {
|
||||||
@@ -393,11 +372,11 @@ pipelines {
|
|||||||
<1> There is no pipeline object to amend. The `new` keyword gives you an object to amend.
|
<1> There is no pipeline object to amend. The `new` keyword gives you an object to amend.
|
||||||
|
|
||||||
So far, you've defined objects the same way you amended them.
|
So far, you've defined objects the same way you amended them.
|
||||||
If the name `foo` didn't occur before, `foo { ... }` _creates_ a property called `foo` and assigns to it the contents in place of the `...` (given that `...` is not valid Pkl, but an abbreviation for illustration purposes).
|
When the `name` didn't occur before, `new { ... }` _creates_ a property called `name` and assigns to it the object specified on the `Listing`.
|
||||||
If `foo` is an existing object, this notation is an _amend expression_; resulting in a new _object_ (value), but _not_ a new (named) property.
|
If `name` is an existing object, this notation is an _amend expression_; resulting in a new _object_ (value), but _not_ a new (named) property.
|
||||||
Since `pipelines` is a listing, you can _add_ elements by writing expressions in an amend expression.
|
Since `pipelines` is a listing, you can _add_ elements by writing expressions in an amend expression.
|
||||||
|
|
||||||
In this case, though, there is no object to amend. Writing `myNewPipeline { ... }` defines a _property_, but listings may only include _elements_.
|
In this case, though, there is no object to amend. Writing `pipelines { ... }` defines a _property_, but listings may only include _elements_.
|
||||||
This is where you can use the keyword `new`.
|
This is where you can use the keyword `new`.
|
||||||
|
|
||||||
`new` gives you an object to amend.
|
`new` gives you an object to amend.
|
||||||
@@ -415,7 +394,7 @@ Pipelines that set a 'name' must also set a 'branchName'.
|
|||||||
|
|
||||||
8 | throw("Pipelines that set a 'name' must also set a 'branchName'.")
|
8 | throw("Pipelines that set a 'name' must also set a 'branchName'.")
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
at AcmeCICD#Pipeline.nameRequiresBranchName.<function#1> (file:///Users/me/tutorial/AcmeCICD.pkl, line 8)
|
at acmecicd#Pipeline.nameRequiresBranchName.<function#1> (file:///Users/me/tutorial/acmecicd.pkl, line 8)
|
||||||
|
|
||||||
6 | name = "prb"
|
6 | name = "prb"
|
||||||
^^^^^
|
^^^^^
|
||||||
@@ -436,7 +415,7 @@ The message is quite instructive, so you can fix the error by adding a `branchNa
|
|||||||
[source,{pkl}]
|
[source,{pkl}]
|
||||||
.cicd.pkl
|
.cicd.pkl
|
||||||
----
|
----
|
||||||
amends "AcmeCICD.pkl"
|
amends "acmecicd.pkl"
|
||||||
|
|
||||||
timeout = 3
|
timeout = 3
|
||||||
pipelines {
|
pipelines {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ include::ROOT:partial$component-attributes.adoc[]
|
|||||||
|
|
||||||
In parts xref:01_basic_config.adoc[one] and xref:02_filling_out_a_template.adoc[two], you saw that Pkl provides _validation_ of our configurations.
|
In parts xref:01_basic_config.adoc[one] and xref:02_filling_out_a_template.adoc[two], you saw that Pkl provides _validation_ of our configurations.
|
||||||
It checks syntax, types and constraints.
|
It checks syntax, types and constraints.
|
||||||
As you saw in the `AcmeCICD` example xref:02_filling_out_a_template.adoc#amending-templates[here], the template can provide informative error messages when an amending module violates a type constraint.
|
As you saw in the `acmecicd` example xref:02_filling_out_a_template.adoc#amending-templates[here], the template can provide informative error messages when an amending module violates a type constraint.
|
||||||
|
|
||||||
In this final part, you will see some of Pkl's techniques that are particularly relevant for writing a template.
|
In this final part, you will see some of Pkl's techniques that are particularly relevant for writing a template.
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ amountLearned: Float = 13.37
|
|||||||
|
|
||||||
duration: Duration = 30.min
|
duration: Duration = 30.min
|
||||||
|
|
||||||
bandwidthRequirementPerSecond: DataSize = 52.4288.mb
|
bandwidthRequirementPerSecond: DataSize = 50.mb
|
||||||
----
|
----
|
||||||
|
|
||||||
In the above, you've explicitly annotated the code with type signatures.
|
In the above, you've explicitly annotated the code with type signatures.
|
||||||
@@ -45,7 +45,7 @@ part = 3
|
|||||||
hasExercises = true
|
hasExercises = true
|
||||||
amountLearned = 13.37
|
amountLearned = 13.37
|
||||||
duration = 30.min
|
duration = 30.min
|
||||||
bandwidthRequirementPerSecond = 52.4288.mb
|
bandwidthRequirementPerSecond = 50.mb
|
||||||
----
|
----
|
||||||
|
|
||||||
Note how `Duration` and `DataSize` help you prevent https://en.wikipedia.org/wiki/Mars_Climate_Orbiter[unit errors] in these common (for configuration) domains.
|
Note how `Duration` and `DataSize` help you prevent https://en.wikipedia.org/wiki/Mars_Climate_Orbiter[unit errors] in these common (for configuration) domains.
|
||||||
@@ -146,7 +146,7 @@ pklTutorialPart1 {
|
|||||||
hasExercises = true
|
hasExercises = true
|
||||||
amountLearned = 13.37
|
amountLearned = 13.37
|
||||||
duration = 30.min
|
duration = 30.min
|
||||||
bandwidthRequirementPerSecond = 52.4288.mb
|
bandwidthRequirementPerSecond = 50.mb
|
||||||
}
|
}
|
||||||
pklTutorialPart2 {
|
pklTutorialPart2 {
|
||||||
name = "Filling out a Template"
|
name = "Filling out a Template"
|
||||||
@@ -154,7 +154,7 @@ pklTutorialPart2 {
|
|||||||
hasExercises = true
|
hasExercises = true
|
||||||
amountLearned = 13.37
|
amountLearned = 13.37
|
||||||
duration = 30.min
|
duration = 30.min
|
||||||
bandwidthRequirementPerSecond = 52.4288.mb
|
bandwidthRequirementPerSecond = 50.mb
|
||||||
}
|
}
|
||||||
pklTutorialPart3 {
|
pklTutorialPart3 {
|
||||||
name = "Writing a Template"
|
name = "Writing a Template"
|
||||||
@@ -162,7 +162,7 @@ pklTutorialPart3 {
|
|||||||
hasExercises = true
|
hasExercises = true
|
||||||
amountLearned = 13.37
|
amountLearned = 13.37
|
||||||
duration = 30.min
|
duration = 30.min
|
||||||
bandwidthRequirementPerSecond = 52.4288.mb
|
bandwidthRequirementPerSecond = 50.mb
|
||||||
}
|
}
|
||||||
|
|
||||||
----
|
----
|
||||||
@@ -199,7 +199,7 @@ amountLearned: Float = 13.37 // <2>
|
|||||||
|
|
||||||
duration: Duration = 30.min // <2>
|
duration: Duration = 30.min // <2>
|
||||||
|
|
||||||
bandwidthRequirementPerSecond: DataSize = 52.4288.mb // <2>
|
bandwidthRequirementPerSecond: DataSize = 50.mb // <2>
|
||||||
----
|
----
|
||||||
<1> No default value given.
|
<1> No default value given.
|
||||||
<2> Default value given.
|
<2> Default value given.
|
||||||
@@ -239,7 +239,7 @@ part = 3
|
|||||||
hasExercises = true
|
hasExercises = true
|
||||||
amountLearned = 13.37
|
amountLearned = 13.37
|
||||||
duration = 30.min
|
duration = 30.min
|
||||||
bandwidthRequirementPerSecond = 52.4288.mb
|
bandwidthRequirementPerSecond = 50.mb
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -256,7 +256,7 @@ By "precisely" we mean, that amending an object also can't "turn it into" an ins
|
|||||||
== A new template
|
== A new template
|
||||||
|
|
||||||
Now that you know about types, you can start writing your first template.
|
Now that you know about types, you can start writing your first template.
|
||||||
So far, you've written configurations with Pkl, either without a template, or using the `AcmeCICD` template from xref:02_filling_out_a_template.adoc#amending-templates[Amending templates].
|
So far, you've written configurations with Pkl, either without a template, or using the `acmecicd` template from xref:02_filling_out_a_template.adoc#amending-templates[Amending templates].
|
||||||
It is often easiest to first write a (typical) configuration for which you want to create a template.
|
It is often easiest to first write a (typical) configuration for which you want to create a template.
|
||||||
Suppose you want to define what a live workshop for this tutorial looks like.
|
Suppose you want to define what a live workshop for this tutorial looks like.
|
||||||
Consider this example:
|
Consider this example:
|
||||||
|
|||||||
@@ -2,14 +2,12 @@
|
|||||||
include::ROOT:partial$component-attributes.adoc[]
|
include::ROOT:partial$component-attributes.adoc[]
|
||||||
:uri-homebrew: https://brew.sh
|
:uri-homebrew: https://brew.sh
|
||||||
|
|
||||||
:uri-sonatype-snapshot-download: https://s01.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.pkl-lang&v={pkl-artifact-version}
|
:uri-pkl-macos-amd64-download: {uri-maven-repo}/org/pkl-lang/pkl-cli-macos-amd64/{pkl-artifact-version}/pkl-cli-macos-amd64-{pkl-artifact-version}.bin
|
||||||
:uri-pkl-macos-amd64-download: {uri-sonatype-snapshot-download}&a=pkl-cli-macos-amd64&e=bin
|
:uri-pkl-macos-aarch64-download: {uri-maven-repo}/org/pkl-lang/pkl-cli-macos-aarch64/{pkl-artifact-version}/pkl-cli-macos-aarch64-{pkl-artifact-version}.bin
|
||||||
:uri-pkl-macos-aarch64-download: {uri-sonatype-snapshot-download}&a=pkl-cli-macos-aarch64&e=bin
|
:uri-pkl-linux-amd64-download: {uri-maven-repo}/org/pkl-lang/pkl-cli-linux-amd64/{pkl-artifact-version}/pkl-cli-linux-amd64-{pkl-artifact-version}.bin
|
||||||
:uri-pkl-linux-amd64-download: {uri-sonatype-snapshot-download}&a=pkl-cli-linux-amd64&e=bin
|
:uri-pkl-linux-aarch64-download: {uri-maven-repo}/org/pkl-lang/pkl-cli-linux-aarch64/{pkl-artifact-version}/pkl-cli-linux-aarch64-{pkl-artifact-version}.bin
|
||||||
:uri-pkl-linux-aarch64-download: {uri-sonatype-snapshot-download}&a=pkl-cli-linux-aarch64&e=bin
|
:uri-pkl-alpine-download: {uri-maven-repo}/org/pkl-lang/pkl-cli-alpine-linux-amd64/{pkl-artifact-version}/pkl-cli-alpine-linux-amd64-{pkl-artifact-version}.bin
|
||||||
:uri-pkl-alpine-download: {uri-sonatype-snapshot-download}&a=pkl-cli-alpine-linux-amd64&e=bin
|
:uri-pkl-java-download: https://repo1.maven.org/maven2/org/pkl-lang/pkl-cli-java/{pkl-artifact-version}/pkl-cli-java-{pkl-artifact-version}.jar
|
||||||
:uri-pkl-windows-download: {uri-sonatype-snapshot-download}&a=pkl-cli-windows-amd64&e=exe
|
|
||||||
:uri-pkl-java-download: {uri-sonatype-snapshot-download}&a=pkl-cli-java&e=jar
|
|
||||||
|
|
||||||
ifdef::is-release-version[]
|
ifdef::is-release-version[]
|
||||||
:uri-pkl-macos-amd64-download: {github-releases}/pkl-macos-amd64
|
:uri-pkl-macos-amd64-download: {github-releases}/pkl-macos-amd64
|
||||||
@@ -17,7 +15,6 @@ ifdef::is-release-version[]
|
|||||||
:uri-pkl-linux-amd64-download: {github-releases}/pkl-linux-amd64
|
:uri-pkl-linux-amd64-download: {github-releases}/pkl-linux-amd64
|
||||||
:uri-pkl-linux-aarch64-download: {github-releases}/pkl-linux-aarch64
|
:uri-pkl-linux-aarch64-download: {github-releases}/pkl-linux-aarch64
|
||||||
:uri-pkl-alpine-download: {github-releases}/pkl-alpine-linux-amd64
|
:uri-pkl-alpine-download: {github-releases}/pkl-alpine-linux-amd64
|
||||||
:uri-pkl-windows-download: {github-releases}/pkl-windows-amd64.exe
|
|
||||||
:uri-pkl-java-download: {uri-maven-repo}/org/pkl-lang/pkl-cli-java/{pkl-artifact-version}/pkl-cli-java-{pkl-artifact-version}.jar
|
:uri-pkl-java-download: {uri-maven-repo}/org/pkl-lang/pkl-cli-java/{pkl-artifact-version}/pkl-cli-java-{pkl-artifact-version}.jar
|
||||||
endif::[]
|
endif::[]
|
||||||
|
|
||||||
@@ -25,7 +22,6 @@ endif::[]
|
|||||||
:uri-pkl-cli-main-sources: {uri-github-tree}/pkl-cli/src/main/kotlin/org/pkl/cli
|
:uri-pkl-cli-main-sources: {uri-github-tree}/pkl-cli/src/main/kotlin/org/pkl/cli
|
||||||
:uri-pkl-cli-CliEvaluatorOptions: {uri-pkl-cli-main-sources}/CliEvaluatorOptions.kt
|
:uri-pkl-cli-CliEvaluatorOptions: {uri-pkl-cli-main-sources}/CliEvaluatorOptions.kt
|
||||||
:uri-certificates: {uri-github-tree}/pkl-commons-cli/src/main/resources/org/pkl/commons/cli/commands
|
:uri-certificates: {uri-github-tree}/pkl-commons-cli/src/main/resources/org/pkl/commons/cli/commands
|
||||||
:uri-ci-artifacts: https://s01.oss.sonatype.org/content/groups/public/org/pkl-lang/
|
|
||||||
|
|
||||||
The `pkl` command-line interface (CLI) evaluates Pkl modules and writes their output to the console or a file.
|
The `pkl` command-line interface (CLI) evaluates Pkl modules and writes their output to the console or a file.
|
||||||
For interactive development, the CLI includes a Read-Eval-Print Loop (REPL).
|
For interactive development, the CLI includes a Read-Eval-Print Loop (REPL).
|
||||||
@@ -39,10 +35,9 @@ The CLI comes in multiple flavors:
|
|||||||
* Native Linux executable for amd64
|
* Native Linux executable for amd64
|
||||||
* Native Linux executable for aarch64
|
* Native Linux executable for aarch64
|
||||||
* Native Alpine Linux executable for amd64 (cross-compiled and tested on Oracle Linux 8)
|
* Native Alpine Linux executable for amd64 (cross-compiled and tested on Oracle Linux 8)
|
||||||
* Native Windows executable for amd64 (tested on Windows Server 2022)
|
* Java executable (tested with Java 11/17 on macOS and Oracle Linux)
|
||||||
* Java executable (tested with Java 17/21 on macOS and Oracle Linux)
|
|
||||||
|
|
||||||
On macOS, Linux, and Windows, we recommend using the native executables.
|
On macOS and Linux, we recommend using the native executables.
|
||||||
They are self-contained, start up instantly, and run complex Pkl code much faster than the Java executable.
|
They are self-contained, start up instantly, and run complex Pkl code much faster than the Java executable.
|
||||||
|
|
||||||
.What is the Difference Between the Linux and Alpine Linux Executables?
|
.What is the Difference Between the Linux and Alpine Linux Executables?
|
||||||
@@ -53,7 +48,7 @@ whereas, the Alpine Linux executable is statically linked against _musl libc_ an
|
|||||||
====
|
====
|
||||||
|
|
||||||
The Java executable works on multiple platforms and has a smaller binary size than the native executables.
|
The Java executable works on multiple platforms and has a smaller binary size than the native executables.
|
||||||
However, it requires a Java 17 (or higher) runtime on the system path, has a noticeable startup delay,
|
However, it requires a Java 11 (or higher) runtime on the system path, has a noticeable startup delay,
|
||||||
and runs complex Pkl code slower than the native executables.
|
and runs complex Pkl code slower than the native executables.
|
||||||
|
|
||||||
All flavors are built from the same codebase and undergo the same automated testing.
|
All flavors are built from the same codebase and undergo the same automated testing.
|
||||||
@@ -62,7 +57,7 @@ Except where noted otherwise, the rest of this page discusses the native executa
|
|||||||
[[homebrew]]
|
[[homebrew]]
|
||||||
=== Homebrew
|
=== Homebrew
|
||||||
|
|
||||||
On macOS and Linux, release versions can be installed with {uri-homebrew}[Homebrew].
|
Release versions can be installed with {uri-homebrew}[Homebrew].
|
||||||
|
|
||||||
ifdef::is-release-version[]
|
ifdef::is-release-version[]
|
||||||
To install Pkl, run:
|
To install Pkl, run:
|
||||||
@@ -97,7 +92,7 @@ On aarch64:
|
|||||||
[source,shell]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
curl -L -o pkl '{uri-pkl-macos-aarch64-download}'
|
curl -L -o pkl {uri-pkl-macos-aarch64-download}
|
||||||
chmod +x pkl
|
chmod +x pkl
|
||||||
./pkl --version
|
./pkl --version
|
||||||
----
|
----
|
||||||
@@ -107,14 +102,14 @@ On amd64:
|
|||||||
[source,shell]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
curl -L -o pkl '{uri-pkl-macos-amd64-download}'
|
curl -L -o pkl {uri-pkl-macos-amd64-download}
|
||||||
chmod +x pkl
|
chmod +x pkl
|
||||||
./pkl --version
|
./pkl --version
|
||||||
----
|
----
|
||||||
|
|
||||||
This should print something similar to:
|
This should print something similar to:
|
||||||
|
|
||||||
[source]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
Pkl {pkl-version} (macOS, native)
|
Pkl {pkl-version} (macOS, native)
|
||||||
@@ -131,7 +126,7 @@ On aarch64:
|
|||||||
[source,shell]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
curl -L -o pkl '{uri-pkl-linux-aarch64-download}'
|
curl -L -o pkl {uri-pkl-linux-aarch64-download}
|
||||||
chmod +x pkl
|
chmod +x pkl
|
||||||
./pkl --version
|
./pkl --version
|
||||||
----
|
----
|
||||||
@@ -141,14 +136,14 @@ On amd64:
|
|||||||
[source,shell]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
curl -L -o pkl '{uri-pkl-linux-amd64-download}'
|
curl -L -o pkl {uri-pkl-linux-amd64-download}
|
||||||
chmod +x pkl
|
chmod +x pkl
|
||||||
./pkl --version
|
./pkl --version
|
||||||
----
|
----
|
||||||
|
|
||||||
This should print something similar to:
|
This should print something similar to:
|
||||||
|
|
||||||
[source]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
Pkl {pkl-version} (Linux, native)
|
Pkl {pkl-version} (Linux, native)
|
||||||
@@ -163,14 +158,14 @@ For a dynamically linked executable, see <<Linux Executable>>.
|
|||||||
[source,shell]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
curl -L -o pkl '{uri-pkl-alpine-download}'
|
curl -L -o pkl {uri-pkl-alpine-download}
|
||||||
chmod +x pkl
|
chmod +x pkl
|
||||||
./pkl --version
|
./pkl --version
|
||||||
----
|
----
|
||||||
|
|
||||||
This should print something similar to:
|
This should print something similar to:
|
||||||
|
|
||||||
[source]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
Pkl {pkl-version} (Linux, native)
|
Pkl {pkl-version} (Linux, native)
|
||||||
@@ -178,33 +173,12 @@ Pkl {pkl-version} (Linux, native)
|
|||||||
|
|
||||||
NOTE: We currently do not support the aarch64 architecture for Alpine Linux.
|
NOTE: We currently do not support the aarch64 architecture for Alpine Linux.
|
||||||
|
|
||||||
[[windows-executable]]
|
|
||||||
=== Windows Executable
|
|
||||||
|
|
||||||
[source,PowerShell]
|
|
||||||
[subs="+attributes"]
|
|
||||||
----
|
|
||||||
Invoke-WebRequest '{uri-pkl-windows-download}' -OutFile pkl.exe
|
|
||||||
.\pkl --version
|
|
||||||
----
|
|
||||||
|
|
||||||
This should print something similar to:
|
|
||||||
|
|
||||||
[source]
|
|
||||||
[subs="+attributes"]
|
|
||||||
----
|
|
||||||
Pkl {pkl-version} (Windows 10.0, native)
|
|
||||||
----
|
|
||||||
|
|
||||||
NOTE: We currently do not support the aarch64 architecture for Windows.
|
|
||||||
|
|
||||||
[[java-executable]]
|
|
||||||
=== Java Executable
|
=== Java Executable
|
||||||
|
|
||||||
[source,shell]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
curl -L -o jpkl '{uri-pkl-java-download}'
|
curl -L -o jpkl {uri-pkl-java-download}
|
||||||
chmod +x jpkl
|
chmod +x jpkl
|
||||||
./jpkl --version
|
./jpkl --version
|
||||||
----
|
----
|
||||||
@@ -214,12 +188,9 @@ This should print something similar to:
|
|||||||
[source,shell]
|
[source,shell]
|
||||||
[subs="+attributes"]
|
[subs="+attributes"]
|
||||||
----
|
----
|
||||||
Pkl {pkl-version} (macOS 14.2, Java 17.0.10)
|
Pkl {pkl-version} (macOS 10.16, Java 11.0.9)
|
||||||
----
|
----
|
||||||
|
|
||||||
NOTE: The Java executable does not work as an executable file on Windows.
|
|
||||||
However, it will work as a jar, for example, with `java -jar jpkl`.
|
|
||||||
|
|
||||||
[[usage]]
|
[[usage]]
|
||||||
== Usage
|
== Usage
|
||||||
|
|
||||||
@@ -394,7 +365,7 @@ This command also takes <<common-options, common options>>.
|
|||||||
[[command-server]]
|
[[command-server]]
|
||||||
=== `pkl server`
|
=== `pkl server`
|
||||||
|
|
||||||
*Synopsis:* `pkl server`
|
*Synopsys:* `pkl server`
|
||||||
|
|
||||||
Run as a server that communicates over standard input/output.
|
Run as a server that communicates over standard input/output.
|
||||||
|
|
||||||
@@ -403,16 +374,12 @@ This option is used for embedding Pkl in an external client, such as xref:swift:
|
|||||||
[[command-test]]
|
[[command-test]]
|
||||||
=== `pkl test`
|
=== `pkl test`
|
||||||
|
|
||||||
*Synopsis:* `pkl test [<options>] [<modules>]`
|
*Synopsys:* `pkl test [<options>] [<modules>]`
|
||||||
|
|
||||||
Evaluate the given `<modules>` as _tests_, producing a test report and appropriate exit code.
|
Evaluate the given `<modules>` as _tests_, producing a test report and appropriate exit code.
|
||||||
|
|
||||||
Renderers defined in test files will be ignored by the `test` command.
|
Renderers defined in test files will be ignored by the `test` command.
|
||||||
|
|
||||||
Tests that result in writing `pkl-expected.pcf` files are considered failing tests.
|
|
||||||
If these are the only failures, the command exits with exit code 10.
|
|
||||||
Otherwise, failures result in exit code 1.
|
|
||||||
|
|
||||||
<modules>::
|
<modules>::
|
||||||
The absolute or relative URIs of the modules to test. Relative URIs are resolved against the working directory.
|
The absolute or relative URIs of the modules to test. Relative URIs are resolved against the working directory.
|
||||||
|
|
||||||
@@ -442,7 +409,7 @@ This command also takes <<common-options, common options>>.
|
|||||||
[[command-repl]]
|
[[command-repl]]
|
||||||
=== `pkl repl`
|
=== `pkl repl`
|
||||||
|
|
||||||
*Synopsis:* `pkl repl [<options>]`
|
*Synopsys:* `pkl repl [<options>]`
|
||||||
|
|
||||||
Start a REPL session.
|
Start a REPL session.
|
||||||
|
|
||||||
@@ -562,64 +529,14 @@ package already exists in the cache directory, this command is a no-op.
|
|||||||
|
|
||||||
This command accepts <<common-options,common options>>.
|
This command accepts <<common-options,common options>>.
|
||||||
|
|
||||||
[[command-analyze-imports]]
|
|
||||||
=== `pkl analyze imports`
|
|
||||||
|
|
||||||
*Synopsis*: `pkl analyze imports [<modules>]`
|
|
||||||
|
|
||||||
This command builds a graph of imports declared in the provided modules.
|
|
||||||
|
|
||||||
This is a lower level command that is meant to be useful for Pkl-related tooling.
|
|
||||||
For example, this command feeds into the xref:pkl-gradle:index.adoc[] to determine if tasks are considered up-to-date or not.
|
|
||||||
|
|
||||||
This command produces an object with two properties, `imports` and `resolvedImports`.
|
|
||||||
|
|
||||||
The `imports` property is a mapping of a module's absolute URI, to the set of imports declared within that module.
|
|
||||||
|
|
||||||
The `resolvedImports` property is a mapping of a module's absolute URI (as stated in `imports`), to the resolved absolute URI that might be useful for fetching the module's contents.
|
|
||||||
For example, a xref:language-reference:index.adoc#local-dependencies[local dependency] import will have an in-language URI with scheme `projectpackage:`, and may have resolved URI with scheme `file:` (assuming that the project is file-based).
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
[source,shell]
|
|
||||||
----
|
|
||||||
# Analyze the imports of a single module
|
|
||||||
pkl analyze imports myModule.pkl
|
|
||||||
|
|
||||||
# Same as the previous command, but output in JSON.
|
|
||||||
pkl analyze imports -f json myModule.pkl
|
|
||||||
|
|
||||||
# Analyze imports of all modules declared within src/
|
|
||||||
pkl analyze imports src/*.pkl
|
|
||||||
----
|
|
||||||
|
|
||||||
<modules>::
|
|
||||||
The absolute or relative URIs of the modules to analyze. Relative URIs are resolved against the working directory.
|
|
||||||
|
|
||||||
==== Options
|
|
||||||
|
|
||||||
.-f, --format
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Same meaning as <<format>> in <<command-eval>>.
|
|
||||||
====
|
|
||||||
|
|
||||||
.-o, --output-path
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Same meaning as <<output-path>> in <<command-eval>>.
|
|
||||||
====
|
|
||||||
|
|
||||||
This command also takes <<common-options,common options>>.
|
|
||||||
|
|
||||||
[[common-options]]
|
[[common-options]]
|
||||||
=== Common options
|
=== Common options
|
||||||
|
|
||||||
The <<command-eval>>, <<command-test>>, <<command-repl>>, <<command-project-resolve>>, <<command-project-package>>, <<command-download-package>>, and <<command-analyze-imports>> commands support the following common options:
|
The <<command-eval>>, <<command-test>>, <<command-repl>>, <<command-project-resolve>>, <<command-project-package>>, and <<command-download-package>> commands support the following common options:
|
||||||
|
|
||||||
include::../../pkl-cli/partials/cli-common-options.adoc[]
|
include::../../pkl-cli/partials/cli-common-options.adoc[]
|
||||||
|
|
||||||
The <<command-eval>>, <<command-test>>, <<command-repl>>, <<command-download-package>>, and <<command-analyze-imports>> commands also take the following options:
|
The <<command-eval>>, <<command-test>>, <<command-repl>>, and <<command-download-package>> commands also take the following options:
|
||||||
|
|
||||||
include::../../pkl-cli/partials/cli-project-options.adoc[]
|
include::../../pkl-cli/partials/cli-project-options.adoc[]
|
||||||
|
|
||||||
@@ -885,48 +802,3 @@ These certificates can be overridden via either of the two options:
|
|||||||
Both these options will *replace* the default CA certificates bundled with Pkl. +
|
Both these options will *replace* the default CA certificates bundled with Pkl. +
|
||||||
The CLI option takes precedence over the certificates in `~/.pkl/cacerts/`. +
|
The CLI option takes precedence over the certificates in `~/.pkl/cacerts/`. +
|
||||||
Certificates need to be X.509 certificates in PEM format.
|
Certificates need to be X.509 certificates in PEM format.
|
||||||
|
|
||||||
[[http-proxy]]
|
|
||||||
== HTTP Proxying
|
|
||||||
|
|
||||||
When making HTTP(s) requests, Pkl can possibly make use of an HTTP proxy.
|
|
||||||
|
|
||||||
There are two values that determine proxy settings; the proxy address and list of noproxy rules.
|
|
||||||
When determining proxy settings, Pkl will look at the following locations, in order of precedence (lowest to highest):
|
|
||||||
|
|
||||||
1. OS settings (on macOS, Windows, and GNOME environments)
|
|
||||||
2. <<settings-file,Settings file>>
|
|
||||||
3. xref:language-reference:index.adoc#projects[PklProject file]
|
|
||||||
4. `--http-proxy` and `--http-no-proxy` CLI flags
|
|
||||||
|
|
||||||
[NOTE]
|
|
||||||
====
|
|
||||||
The proxy and noproxy values are individually set.
|
|
||||||
For example, using the `--http-no-proxy` flag but not the `--http-proxy` flag will cause Pkl to look at the PklProject file, then the settings file, then system settings for the proxy address.
|
|
||||||
|
|
||||||
One exception to this rule is that setting a proxy address will cause Pkl to ignore any noproxy values set at the OS level.
|
|
||||||
====
|
|
||||||
|
|
||||||
Pkl only supports HTTP proxies, so neither HTTPS nor SOCKS proxies are supported.
|
|
||||||
Pkl does not support authentication with a proxy.
|
|
||||||
|
|
||||||
When specifying a proxy address, it must have scheme `http`, and may not contain anything other than a host and port.
|
|
||||||
|
|
||||||
=== Proxy exclusions
|
|
||||||
|
|
||||||
Pkl can be configured to bypass the proxy for specific requests via a proxy exclusion rule (i.e. the `--http-no-proxy` flag).
|
|
||||||
It may be provided either as a hostname, an IP address, or an IP range via https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR notation].
|
|
||||||
When determining whether a proxy should be excluded, hostnames do not get resolved to their IP address.
|
|
||||||
For example, a request to `localhost` will not match `--http-no-proxy=127.0.0.1`.
|
|
||||||
|
|
||||||
For individual hosts (not CIDRs), ports can be specified.
|
|
||||||
When no port is specified for a given host, connections to all ports bypass the proxy.
|
|
||||||
|
|
||||||
A hostname will match all of its subdomains.
|
|
||||||
For example, `example.com` will match `foo.example.com`, and `bar.foo.example.com`, but not `fooexample.com`.
|
|
||||||
|
|
||||||
The value `*` is a special wildcard that matches all hosts.
|
|
||||||
|
|
||||||
A port can optionally be specified. If omitted, it matches all ports.
|
|
||||||
|
|
||||||
NOTE: Pkl follows the rules described in https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/#standardizing-no_proxy[Standardizing `no_proxy`], except it does not look at environment variables.
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Comma-separated list of URI patterns that determine which modules can be loaded
|
|||||||
Patterns are matched against the beginning of module URIs.
|
Patterns are matched against the beginning of module URIs.
|
||||||
(File paths have been converted to `file:` URLs at this stage.)
|
(File paths have been converted to `file:` URLs at this stage.)
|
||||||
At least one pattern needs to match for a module to be loadable.
|
At least one pattern needs to match for a module to be loadable.
|
||||||
|
Both source modules and transitive modules are subject to this check.
|
||||||
====
|
====
|
||||||
|
|
||||||
[[allowed-resources]]
|
[[allowed-resources]]
|
||||||
@@ -19,19 +20,6 @@ Patterns are matched against the beginning of resource URIs.
|
|||||||
At least one pattern needs to match for a resource to be readable.
|
At least one pattern needs to match for a resource to be readable.
|
||||||
====
|
====
|
||||||
|
|
||||||
[[color]]
|
|
||||||
.--color
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: `auto` +
|
|
||||||
When to format messages with ANSI color codes.
|
|
||||||
Possible values:
|
|
||||||
|
|
||||||
- `"never"`: Never format
|
|
||||||
- `"auto"`: Format if `stdin`, `stdout`, or `stderr` are connected to a console.
|
|
||||||
- `"always"`: Always format
|
|
||||||
====
|
|
||||||
|
|
||||||
[[cache-dir]]
|
[[cache-dir]]
|
||||||
.--cache-dir
|
.--cache-dir
|
||||||
[%collapsible]
|
[%collapsible]
|
||||||
@@ -44,7 +32,7 @@ The cache directory for storing packages.
|
|||||||
.--no-cache
|
.--no-cache
|
||||||
[%collapsible]
|
[%collapsible]
|
||||||
====
|
====
|
||||||
Disable caching of packages.
|
Disable cacheing of packages.
|
||||||
====
|
====
|
||||||
|
|
||||||
.-e, --env-var
|
.-e, --env-var
|
||||||
@@ -134,21 +122,3 @@ Certificates need to be X.509 certificates in PEM format.
|
|||||||
|
|
||||||
For other methods of configuring certificates, see xref:pkl-cli:index.adoc#ca-certs[CA Certificates].
|
For other methods of configuring certificates, see xref:pkl-cli:index.adoc#ca-certs[CA Certificates].
|
||||||
====
|
====
|
||||||
|
|
||||||
.--http-proxy
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: (none) +
|
|
||||||
Example: `\http://proxy.example.com:1234` +
|
|
||||||
Configures HTTP connections to connect to the provided proxy address.
|
|
||||||
The URI must have scheme `http`, and may not contain anything other than a host and port.
|
|
||||||
====
|
|
||||||
|
|
||||||
.--http-no-proxy
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: (none) +
|
|
||||||
Example: `example.com,169.254.0.0/16` +
|
|
||||||
Comma separated list of hosts to which all connections should bypass the proxy.
|
|
||||||
Hosts can be specified by name, IP address, or IP range using https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR notation].
|
|
||||||
====
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ The library can also be used to embed Pkl in Java libraries and applications.
|
|||||||
== Installation
|
== Installation
|
||||||
|
|
||||||
The _pkl-core_ library is available {uri-pkl-core-maven-module}[from Maven Central].
|
The _pkl-core_ library is available {uri-pkl-core-maven-module}[from Maven Central].
|
||||||
It requires Java 17 or higher.
|
It requires Java 11 or higher.
|
||||||
|
|
||||||
=== Gradle
|
=== Gradle
|
||||||
|
|
||||||
@@ -30,32 +30,13 @@ To use the library in a Gradle project, declare the following dependency:
|
|||||||
|
|
||||||
[tabs]
|
[tabs]
|
||||||
====
|
====
|
||||||
Kotlin::
|
|
||||||
+
|
|
||||||
.build.gradle.kts
|
|
||||||
[source,kotlin,subs="+attributes"]
|
|
||||||
----
|
|
||||||
dependencies {
|
|
||||||
implementation("org.pkl-lang:pkl-core:{pkl-artifact-version}")
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
ifdef::is-release-version[]
|
|
||||||
mavenCentral()
|
|
||||||
endif::[]
|
|
||||||
ifndef::is-release-version[]
|
|
||||||
maven(url = "{uri-sonatype}")
|
|
||||||
endif::[]
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
Groovy::
|
Groovy::
|
||||||
+
|
+
|
||||||
.build.gradle
|
.build.gradle
|
||||||
[source,groovy,subs="+attributes"]
|
[source,groovy,subs="+attributes"]
|
||||||
----
|
----
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.pkl-lang:pkl-core:{pkl-artifact-version}"
|
compile "org.pkl-lang:pkl-core:{pkl-artifact-version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -67,6 +48,25 @@ ifndef::is-release-version[]
|
|||||||
endif::[]
|
endif::[]
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Kotlin::
|
||||||
|
+
|
||||||
|
.build.gradle.kts
|
||||||
|
[source,kotlin,subs="+attributes"]
|
||||||
|
----
|
||||||
|
dependencies {
|
||||||
|
compile("org.pkl-lang:pkl-core:{pkl-artifact-version}")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
ifdef::is-release-version[]
|
||||||
|
mavenCentral()
|
||||||
|
endif::[]
|
||||||
|
ifndef::is-release-version[]
|
||||||
|
maven { url = uri("{uri-sonatype}") }
|
||||||
|
endif::[]
|
||||||
|
}
|
||||||
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
=== Maven
|
=== Maven
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ See xref:pkl-gradle:index.adoc#installation[Installation] in the _Gradle Plugin_
|
|||||||
=== Java Library
|
=== Java Library
|
||||||
|
|
||||||
The `pkl-doc` library is available {uri-pkl-doc-maven}[from Maven Central].
|
The `pkl-doc` library is available {uri-pkl-doc-maven}[from Maven Central].
|
||||||
It requires Java 17 or higher.
|
It requires Java 11 or higher.
|
||||||
|
|
||||||
ifndef::is-release-version[]
|
ifndef::is-release-version[]
|
||||||
NOTE: Snapshots are published to repository `{uri-sonatype}`.
|
NOTE: Snapshots are published to repository `{uri-sonatype}`.
|
||||||
@@ -86,32 +86,13 @@ To use the library in a Gradle project, declare the following dependency:
|
|||||||
|
|
||||||
[tabs]
|
[tabs]
|
||||||
====
|
====
|
||||||
Kotlin::
|
|
||||||
+
|
|
||||||
.build.gradle.kts
|
|
||||||
[source,kotlin,subs="+attributes"]
|
|
||||||
----
|
|
||||||
dependencies {
|
|
||||||
implementation("org.pkl-lang:pkl-doc:{pkl-artifact-version}")
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
ifdef::is-release-version[]
|
|
||||||
mavenCentral()
|
|
||||||
endif::[]
|
|
||||||
ifndef::is-release-version[]
|
|
||||||
maven(url = "{uri-sonatype}")
|
|
||||||
endif::[]
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
Groovy::
|
Groovy::
|
||||||
+
|
+
|
||||||
.build.gradle
|
.build.gradle
|
||||||
[source,groovy,subs="+attributes"]
|
[source,groovy,subs="+attributes"]
|
||||||
----
|
----
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.pkl-lang:pkl-doc:{pkl-artifact-version}"
|
compile "org.pkl-lang:pkl-doc:{pkl-artifact-version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -123,6 +104,25 @@ ifndef::is-release-version[]
|
|||||||
endif::[]
|
endif::[]
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Kotlin::
|
||||||
|
+
|
||||||
|
.build.gradle.kts
|
||||||
|
[source,kotlin,subs="+attributes"]
|
||||||
|
----
|
||||||
|
dependencies {
|
||||||
|
compile("org.pkl-lang:pkl-doc:{pkl-artifact-version}")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
ifdef::is-release-version[]
|
||||||
|
mavenCentral()
|
||||||
|
endif::[]
|
||||||
|
ifndef::is-release-version[]
|
||||||
|
maven { url = uri("{uri-sonatype}") }
|
||||||
|
endif::[]
|
||||||
|
}
|
||||||
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
==== Maven
|
==== Maven
|
||||||
@@ -162,7 +162,7 @@ We recommend to provision it with a Maven compatible build tool as shown in <<in
|
|||||||
The Pkldoc tool is offered as Gradle plugin, Java library, and CLI.
|
The Pkldoc tool is offered as Gradle plugin, Java library, and CLI.
|
||||||
It can generate documentation either for modules directly, or generate documentation for _package uris_.
|
It can generate documentation either for modules directly, or generate documentation for _package uris_.
|
||||||
|
|
||||||
The tool requires an argument of a module named _docsite-info.pkl_, that amends link:{uri-DocsiteInfo}[pkl.DocsiteInfo].
|
The tool requires an argument of a module named `_docsite-info.pkl`, that amends link:{uri-DocsiteInfo}[pkl.DocsiteInfo].
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
==== Generating documentation for modules directly
|
==== Generating documentation for modules directly
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ That is, plugin version `x.y.z` uses Pkl version `x.y.z`.
|
|||||||
== Installation
|
== Installation
|
||||||
|
|
||||||
The Gradle plugin is available {uri-pkl-gradle-maven-module}[from Maven Central].
|
The Gradle plugin is available {uri-pkl-gradle-maven-module}[from Maven Central].
|
||||||
It requires Java 17 or higher and Gradle 8.1 or higher.
|
It requires Java 11 or higher and Gradle 6.8 or higher.
|
||||||
Earlier Gradle versions are not supported.
|
Earlier Gradle versions are not supported.
|
||||||
|
|
||||||
ifndef::is-release-version[]
|
ifndef::is-release-version[]
|
||||||
@@ -32,31 +32,6 @@ The plugin is applied as follows:
|
|||||||
|
|
||||||
[tabs]
|
[tabs]
|
||||||
====
|
====
|
||||||
Kotlin::
|
|
||||||
+
|
|
||||||
.build.gradle.kts
|
|
||||||
[source,kotlin,subs="+attributes"]
|
|
||||||
----
|
|
||||||
plugins {
|
|
||||||
id("org.pkl-lang") version "{pkl-artifact-version}"
|
|
||||||
}
|
|
||||||
----
|
|
||||||
+
|
|
||||||
.settings.gradle.kts
|
|
||||||
[source,kotlin,subs="+attributes"]
|
|
||||||
----
|
|
||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
ifdef::is-release-version[]
|
|
||||||
mavenCentral()
|
|
||||||
endif::[]
|
|
||||||
ifndef::is-release-version[]
|
|
||||||
maven(url = "{uri-sonatype}")
|
|
||||||
endif::[]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
Groovy::
|
Groovy::
|
||||||
+
|
+
|
||||||
.build.gradle
|
.build.gradle
|
||||||
@@ -81,6 +56,31 @@ endif::[]
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Kotlin::
|
||||||
|
+
|
||||||
|
.build.gradle.kts
|
||||||
|
[source,kotlin,subs="+attributes"]
|
||||||
|
----
|
||||||
|
plugins {
|
||||||
|
id("org.pkl-lang") version "{pkl-artifact-version}"
|
||||||
|
}
|
||||||
|
----
|
||||||
|
+
|
||||||
|
.settings.gradle.kts
|
||||||
|
[source,kotlin,subs="+attributes"]
|
||||||
|
----
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
ifdef::is-release-version[]
|
||||||
|
mavenCentral()
|
||||||
|
endif::[]
|
||||||
|
ifndef::is-release-version[]
|
||||||
|
maven { url = uri("{uri-sonatype}") }
|
||||||
|
endif::[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
[[module-evaluation]]
|
[[module-evaluation]]
|
||||||
@@ -102,6 +102,7 @@ pkl {
|
|||||||
evaluators {
|
evaluators {
|
||||||
evalPkl {
|
evalPkl {
|
||||||
sourceModules.add(file("module1.pkl"))
|
sourceModules.add(file("module1.pkl"))
|
||||||
|
transitiveModules.from file("module2.pkl")
|
||||||
outputFile = layout.buildDirectory.file("module1.yaml")
|
outputFile = layout.buildDirectory.file("module1.yaml")
|
||||||
outputFormat = "yaml"
|
outputFormat = "yaml"
|
||||||
}
|
}
|
||||||
@@ -117,6 +118,7 @@ pkl {
|
|||||||
evaluators {
|
evaluators {
|
||||||
register("evalPkl") {
|
register("evalPkl") {
|
||||||
sourceModules.add(file("module1.pkl"))
|
sourceModules.add(file("module1.pkl"))
|
||||||
|
transitiveModules.from(file("module2.pkl"))
|
||||||
outputFile.set(layout.buildDirectory.file("module1.yaml"))
|
outputFile.set(layout.buildDirectory.file("module1.yaml"))
|
||||||
outputFormat.set("yaml")
|
outputFormat.set("yaml")
|
||||||
}
|
}
|
||||||
@@ -125,6 +127,9 @@ pkl {
|
|||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
|
To guarantee correct Gradle up-to-date behavior,
|
||||||
|
`transitiveModules` needs to contain all module files transitively referenced by `sourceModules`.
|
||||||
|
|
||||||
For each declared evaluator, the Pkl plugin creates an equally named task.
|
For each declared evaluator, the Pkl plugin creates an equally named task.
|
||||||
Hence the above evaluator can be run with:
|
Hence the above evaluator can be run with:
|
||||||
|
|
||||||
@@ -621,7 +626,7 @@ Default: `false` +
|
|||||||
Whether to ignore expected example files and generate them again.
|
Whether to ignore expected example files and generate them again.
|
||||||
====
|
====
|
||||||
|
|
||||||
Common properties:
|
Common propeties:
|
||||||
|
|
||||||
include::../partials/gradle-common-properties.adoc[]
|
include::../partials/gradle-common-properties.adoc[]
|
||||||
|
|
||||||
@@ -683,64 +688,6 @@ Example: `projectDirectories.from(file("pkl-config/""))` +
|
|||||||
The project directories to create packages for.
|
The project directories to create packages for.
|
||||||
====
|
====
|
||||||
|
|
||||||
Common properties:
|
Common propeties:
|
||||||
|
|
||||||
include::../partials/gradle-common-properties.adoc[]
|
include::../partials/gradle-common-properties.adoc[]
|
||||||
|
|
||||||
[[analyze-imports]]
|
|
||||||
== Analyze Imports
|
|
||||||
|
|
||||||
This feature is the Gradle analogy for the xref:pkl-cli:index.adoc#command-analyze-imports[analyze imports] command in the CLI. It builds a graph of imports of the provided source modules.
|
|
||||||
|
|
||||||
=== Usage
|
|
||||||
|
|
||||||
[tabs]
|
|
||||||
====
|
|
||||||
build.gradle::
|
|
||||||
+
|
|
||||||
[source,groovy]
|
|
||||||
----
|
|
||||||
pkl {
|
|
||||||
analyzers {
|
|
||||||
imports {
|
|
||||||
appConfig {
|
|
||||||
sourceModules.add(file("src/main/resources/appConfig.pkl"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
build.gradle.kts::
|
|
||||||
+
|
|
||||||
[source,kotlin]
|
|
||||||
----
|
|
||||||
pkl {
|
|
||||||
analyzers {
|
|
||||||
imports {
|
|
||||||
register("appConfig") {
|
|
||||||
sourceModules.add(file("src/main/resources/appConfig.pkl"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
====
|
|
||||||
|
|
||||||
=== Configuration Options
|
|
||||||
|
|
||||||
.outputFormat: Property<String>
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Same meaning as <<output-format,outputFormat>> in <<module-evaluation>>.
|
|
||||||
====
|
|
||||||
|
|
||||||
.outputFile: RegularFileProperty<String>
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Same meaning as <<output-file,outputFile>> in <<module-evaluation>>.
|
|
||||||
====
|
|
||||||
|
|
||||||
Common properties:
|
|
||||||
|
|
||||||
include::../partials/gradle-modules-properties.adoc[]
|
|
||||||
|
|||||||
@@ -36,54 +36,4 @@ Example: `generateSpringBootConfig = true` +
|
|||||||
Whether to generate config classes for use with Spring Boot.
|
Whether to generate config classes for use with Spring Boot.
|
||||||
====
|
====
|
||||||
|
|
||||||
.renames: MapProperty<String, String>
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: `[:]` +
|
|
||||||
Example: `renames = ["foo.": "com.example.foo.", "bar.Config": "com.example.bar.Config"]` +
|
|
||||||
Allows to change default class and package names (derived from Pkl module names) in the generated code.
|
|
||||||
|
|
||||||
When you need the generated class or package names to be different from the default names derived from the Pkl module names, you can define a rename mapping, where the key is the original Pkl module name prefix, and the value is its replacement.
|
|
||||||
When you do, the generated code's `package` declarations, class names, as well as file locations, will be modified according to this mapping.
|
|
||||||
|
|
||||||
The prefixes are replaced literally, which means that dots at the end are important.
|
|
||||||
If you want to rename packages only, in most cases, you must ensure that you have an ending dot on both sides of a mapping (except for an empty mapping, if you use it), otherwise you may get unexpected results:
|
|
||||||
|
|
||||||
----
|
|
||||||
// Assuming the following mapping configuration:
|
|
||||||
renames = [
|
|
||||||
"com.foo.": "x", // Dot on the left only
|
|
||||||
"org.bar": "y.", // Dot on the right only
|
|
||||||
"net.baz": "z" // No dots
|
|
||||||
]
|
|
||||||
|
|
||||||
// The following renames will be made:
|
|
||||||
"com.foo.bar" -> "xbar" // Target prefix merged into the suffix
|
|
||||||
"org.bar.baz" -> "y..baz" // Double dot, invalid name
|
|
||||||
"net.baz.qux" -> "z.qux" // Looks okay, but...
|
|
||||||
"net.bazqux" -> "zqux" // ...may cut the name in the middle.
|
|
||||||
----
|
|
||||||
|
|
||||||
When computing the appropriate target name, the longest matching prefix is used:
|
|
||||||
|
|
||||||
----
|
|
||||||
// Assuming the following mapping configuration:
|
|
||||||
renames = [
|
|
||||||
"com.foo.Main": "w.Main",
|
|
||||||
"com.foo.": "x.",
|
|
||||||
"com.": "y.",
|
|
||||||
"": "z."
|
|
||||||
]
|
|
||||||
|
|
||||||
// The following renames will be made:
|
|
||||||
com.foo.Main -> w.Main
|
|
||||||
com.foo.bar -> x.bar
|
|
||||||
com.baz.qux -> y.baz.qux
|
|
||||||
org.foo.bar -> z.org.foo.bar
|
|
||||||
----
|
|
||||||
|
|
||||||
Keys in this mapping can be arbitrary strings, including an empty string.
|
|
||||||
Values must be valid dot-separated fully qualifed class name prefixes, possibly terminated by a dot.
|
|
||||||
====
|
|
||||||
|
|
||||||
// TODO: fixme (implementSerializable)
|
// TODO: fixme (implementSerializable)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ URI patterns that determine which modules can be loaded and evaluated.
|
|||||||
Patterns are matched against the beginning of module URIs.
|
Patterns are matched against the beginning of module URIs.
|
||||||
(File paths have been converted to `file:` URLs at this stage.)
|
(File paths have been converted to `file:` URLs at this stage.)
|
||||||
At least one pattern needs to match for a module to be loadable.
|
At least one pattern needs to match for a module to be loadable.
|
||||||
|
Both source modules and transitive modules are subject to this check.
|
||||||
====
|
====
|
||||||
|
|
||||||
.allowedResources: ListProperty<String>
|
.allowedResources: ListProperty<String>
|
||||||
@@ -67,18 +68,11 @@ The cache directory for storing packages.
|
|||||||
If `null`, defaults to `~/.pkl/cache`.
|
If `null`, defaults to `~/.pkl/cache`.
|
||||||
====
|
====
|
||||||
|
|
||||||
.color: Property<Boolean>
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: `false` +
|
|
||||||
Format messages using ANSI color.
|
|
||||||
====
|
|
||||||
|
|
||||||
.noCache: Property<Boolean>
|
.noCache: Property<Boolean>
|
||||||
[%collapsible]
|
[%collapsible]
|
||||||
====
|
====
|
||||||
Default: `false` +
|
Default: `false` +
|
||||||
Disable caching of packages.
|
Disable cacheing of packages.
|
||||||
====
|
====
|
||||||
|
|
||||||
.modulePath: ConfigurableFileCollection
|
.modulePath: ConfigurableFileCollection
|
||||||
@@ -89,21 +83,3 @@ Example: `modulePath.from files("dir1", "zip1.zip", "jar1.jar")` +
|
|||||||
The directories, ZIP archives, or JAR archives to search when resolving `modulepath:` URIs.
|
The directories, ZIP archives, or JAR archives to search when resolving `modulepath:` URIs.
|
||||||
Relative paths are resolved against the project directory.
|
Relative paths are resolved against the project directory.
|
||||||
====
|
====
|
||||||
|
|
||||||
.proxy: Property<URI>
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: `null` +
|
|
||||||
Example: `proxy = uri("http://proxy.example.com:1234")` +
|
|
||||||
Configures HTTP connections to connect to the provided proxy address.
|
|
||||||
The URI must have scheme `http`, and may not contain anything other than a host and port.
|
|
||||||
====
|
|
||||||
|
|
||||||
.noProxy: ListProperty<String>
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Default: `null` +
|
|
||||||
Example: `noProxy = ["example.com", "169.254.0.0/16"]` +
|
|
||||||
Hosts to which all connections should bypass the proxy.
|
|
||||||
Hosts can be specified by name, IP address, or IP range using https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR notation].
|
|
||||||
====
|
|
||||||
|
|||||||
@@ -20,17 +20,11 @@ This property accepts the following types to represent a module:
|
|||||||
.transitiveModules: ConfigurableFileCollection
|
.transitiveModules: ConfigurableFileCollection
|
||||||
[%collapsible]
|
[%collapsible]
|
||||||
====
|
====
|
||||||
Default: [computed by pkl-gradle] +
|
Default: `files()` (empty collection) +
|
||||||
Example 1: `transitiveModules.from files("module1.pkl", "module2.pkl")` +
|
Example 1: `transitiveModules.from files("module1.pkl", "module2.pkl")` +
|
||||||
Example 2: `+transitiveModules.from fileTree("config").include("**/*.pkl")+` +
|
Example 2: `+transitiveModules.from fileTree("config").include("**/*.pkl")+` +
|
||||||
|
|
||||||
File paths of modules that are directly or indirectly used by source modules.
|
File paths of modules that are directly or indirectly used by source modules.
|
||||||
|
Setting this option enables correct Gradle up-to-date checks, which ensures that your Pkl tasks are executed if any of the transitive files are modified; it does not affect evaluation otherwise.
|
||||||
This property, along with `sourceModules`, is the set of input files used to determine whether this task is up-to-date or not.
|
|
||||||
|
|
||||||
By default, Pkl computes this property by analyzing the imports of the source modules.
|
|
||||||
Setting this property explicitly causes Pkl to skip the analyze imports step.
|
|
||||||
|
|
||||||
Including source modules in `transitiveModules` is permitted but not required.
|
Including source modules in `transitiveModules` is permitted but not required.
|
||||||
Relative paths are resolved against the project directory.
|
Relative paths are resolved against the project directory.
|
||||||
====
|
====
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB |
@@ -1,6 +1,6 @@
|
|||||||
= Pkl 0.25 Release Notes
|
= Pkl 0.25 Release Notes
|
||||||
:version: 0.25
|
:version: 0.25
|
||||||
:version-minor: 0.25.1
|
:version-minor: 0.25.3
|
||||||
:release-date: February 1st, 2024
|
:release-date: February 1st, 2024
|
||||||
|
|
||||||
Pkl {version} was released on {release-date}. +
|
Pkl {version} was released on {release-date}. +
|
||||||
|
|||||||
@@ -1,523 +0,0 @@
|
|||||||
= Pkl 0.26 Release Notes
|
|
||||||
:version: 0.26
|
|
||||||
:version-minor: 0.26.3
|
|
||||||
:release-date: June 17th, 2024
|
|
||||||
|
|
||||||
include::ROOT:partial$component-attributes.adoc[]
|
|
||||||
|
|
||||||
Pkl {version} was released on {release-date}. +
|
|
||||||
[.small]#The latest bugfix release is {version-minor}. (xref:changelog.adoc[All Versions])#
|
|
||||||
|
|
||||||
This release brings Windows support, improvements to controlling how Pkl talks over HTTP, and also fixes a scoping bug around typealiases.
|
|
||||||
|
|
||||||
The next release (0.27) is scheduled for October 10th, 2024.
|
|
||||||
|
|
||||||
Please send feedback and questions to https://github.com/apple/pkl/discussions[GitHub Discussions], or submit an issue on https://github.com/apple/pkl/issues/new[Github]. +
|
|
||||||
|
|
||||||
[small]#Pkl is hosted on https://github.com/apple/pkl[GitHub].
|
|
||||||
To get started, follow xref:pkl-cli:index.adoc#installation[Installation].#
|
|
||||||
|
|
||||||
== Highlights [small]#💖#
|
|
||||||
|
|
||||||
News you don't want to miss.
|
|
||||||
|
|
||||||
[[windows-support]]
|
|
||||||
=== Windows Support
|
|
||||||
|
|
||||||
Pkl is now available on Windows! (https://github.com/apple/pkl/pull/492[#492])
|
|
||||||
|
|
||||||
|
|
||||||
In addition to macOS and Linux, Pkl is now available for download on Windows operating systems.
|
|
||||||
|
|
||||||
For installation instructions, consult xref:pkl-cli:index.adoc#windows-executable[Windows Executable] in the CLI reference.
|
|
||||||
|
|
||||||
==== Writing cross-platform Pkl programs
|
|
||||||
|
|
||||||
On Windows, the in-language filepath separator is still `/`.
|
|
||||||
This means that most existing Pkl code should still continue working as-is.
|
|
||||||
|
|
||||||
A small portion of programs will need to be updated to handle Windows support correctly.
|
|
||||||
One example is the various conversion scripts that read input files as CLI flags.
|
|
||||||
|
|
||||||
For example, here is a snippet from module https://github.com/apple/pkl-pantry/blob/d9571cdce407bb7f1687f81b945a4bfd24ce017d/packages/k8s.contrib/convert.pkl#L100C1-L103C74[k8s.contrib.convert]:
|
|
||||||
|
|
||||||
.convert.pkl#L100-L103
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
local inputUri =
|
|
||||||
if (input.startsWith(Regex(#"\w+:"#))) input // absolute URI
|
|
||||||
else if (input.startsWith("/")) "file://\(input)" // absolute file path
|
|
||||||
else "file://\(read("env:PWD"))/\(input)" // relative file path
|
|
||||||
----
|
|
||||||
|
|
||||||
On Windows, the env var `PWD` is a Windows-style path, like `C:\Foo\Bar\Baz`.
|
|
||||||
With the above logic, `inputUri` can expand to a value like `"\file://C:\Foo\Bar\Baz/input.yaml"`.
|
|
||||||
This would an invalid URI; the correct URI should be `"\file:///C:/Foo/Bar/Baz/input.yaml"`.
|
|
||||||
|
|
||||||
Here is a possible fix for this code:
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
import "pkl:platform"
|
|
||||||
|
|
||||||
local inputUri =
|
|
||||||
if (input.startsWith(Regex(#"\w+:/"#))) input
|
|
||||||
else if (input.startsWith("/")) "file://\(input)"
|
|
||||||
else
|
|
||||||
let (pwd = read("env:PWD"))
|
|
||||||
let (
|
|
||||||
path =
|
|
||||||
if (platform.current.operatingSystem.name == "Windows")
|
|
||||||
"/\(pwd)/\(input)".replaceAll("\\", "/")
|
|
||||||
else "\(pwd)/\(input)"
|
|
||||||
)
|
|
||||||
"file://\(path)"
|
|
||||||
----
|
|
||||||
|
|
||||||
To learn more about this design, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0006-import-paths-on-windows.adoc[SPICE-0006].
|
|
||||||
|
|
||||||
[[http-proxying]]
|
|
||||||
=== HTTP proxying
|
|
||||||
|
|
||||||
Pkl now supports proxying HTTP(S) requests (https://github.com/apple/pkl/pull/506[#506]).
|
|
||||||
|
|
||||||
For users of the CLI, Pkl will by default look for proxy settings configured within the OS when on macOS, Windows, and GNOME environments.
|
|
||||||
|
|
||||||
This can be changed by adding settings in the following locations:
|
|
||||||
|
|
||||||
1. xref:pkl-cli:index.adoc#settings-file[Settings file]
|
|
||||||
2. xref:language-reference:index.adoc#projects[PklProject file]
|
|
||||||
3. `--http-proxy` and `--http-no-proxy` CLI flags
|
|
||||||
|
|
||||||
As part of this, some changes have been made to the standard library. For details, see <<standard-library-changes,Standard Library changes>>.
|
|
||||||
|
|
||||||
Users of the Java/Kotlin bindings can specify proxy settings when building an <<http-java-client,HTTP client>>.
|
|
||||||
|
|
||||||
HTTP proxy settings are also added as new fields in the message-passing-api.
|
|
||||||
Authors of external Pkl clients are encouraged to support these new fields to provide proxy support in their libraries.
|
|
||||||
For details, see <<message-passing-api-changes,Message passing API changes>>.
|
|
||||||
|
|
||||||
To read more about the design of HTTP proxying, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0004-HTTP-Proxy-Support.adoc[SPICE-0004], and also the xref:pkl-cli:index.adoc#http-proxy[documentation].
|
|
||||||
|
|
||||||
[[scheme-agnostic-project-dependencies]]
|
|
||||||
=== Scheme-agnostic project dependencies
|
|
||||||
|
|
||||||
Improvements have been made to project dependencies (https://github.com/apple/pkl/pull/486[#486]).
|
|
||||||
|
|
||||||
A project dependency is a way to manage `package`-based modules.
|
|
||||||
It provides two uses:
|
|
||||||
|
|
||||||
1. A package can be imported through xref:language-reference:index.adoc#dependency-notation[dependency notation].
|
|
||||||
2. Conflicting versions in the transitive dependency graph are resolved.
|
|
||||||
|
|
||||||
Currently, dependencies can only be used with file-based modules.
|
|
||||||
This can be limiting in some circumstances:
|
|
||||||
|
|
||||||
1. JVM library users typically interact with Pkl by bundling Pkl files a classpath resources, and load them using `modulepath:` URIs.
|
|
||||||
2. Go library users often embed Pkl code using the https://pkg.go.dev/embed#hdr-Directives[`go:embed` directive], and load them using https://pkg.go.dev/github.com/apple/pkl-go/pkl#WithFs[`WithFs`].
|
|
||||||
|
|
||||||
This means that these users miss out on the benefits of project dependencies.
|
|
||||||
|
|
||||||
Pkl 0.26 adds support for using dependencies in any hierarchical module scheme.
|
|
||||||
This means that `modulepath:` users in Java can now declare projects and dependencies.
|
|
||||||
This also means that other custom methods of embedding modules can also use dependency notation.
|
|
||||||
|
|
||||||
[NOTE]
|
|
||||||
====
|
|
||||||
A _hierarchical_ URI is a URI whose path part starts with `/`, and in which `/` delimits path segments.
|
|
||||||
|
|
||||||
The URI `myscheme:/foo.pkl` is hierarchical, whereas the URI `myscheme:foo.pkl` is not.
|
|
||||||
====
|
|
||||||
|
|
||||||
To read more about this design, consult https://github.com/apple/pkl-evolution/tree/main/spices/SPICE-0005-scheme-agnostic-projects.adoc[SPICE-0005].
|
|
||||||
|
|
||||||
[[typealias-scoping-fix-and-change]]
|
|
||||||
=== Typealias scoping fix and change
|
|
||||||
|
|
||||||
Improvements have been made to `typealias`es (https://github.com/apple/pkl/pull/144[#144], https://github.com/apple/pkl/pull/373[#373], https://github.com/apple/pkl/pull/516[#516]).
|
|
||||||
|
|
||||||
Currently, a typealias that references a value on its enclosing module will break if used in another module.
|
|
||||||
|
|
||||||
.myModule.pkl
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
typealias StartsWithFoo = String(startsWith(foo))
|
|
||||||
|
|
||||||
foo = "foo"
|
|
||||||
----
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
import "myModule.pkl"
|
|
||||||
|
|
||||||
myStr: StartsWithFoo = "fooey"
|
|
||||||
----
|
|
||||||
|
|
||||||
This results in error:
|
|
||||||
|
|
||||||
[source]
|
|
||||||
----
|
|
||||||
–– Pkl Error ––
|
|
||||||
Cannot find property `foo`.
|
|
||||||
|
|
||||||
1 | typealias StartsWithFoo = String(startsWith(foo))
|
|
||||||
----
|
|
||||||
|
|
||||||
This is a language bug that has been fixed.
|
|
||||||
|
|
||||||
In the process of fixing this bug, we realized that the rules around variable resolution within typealiases were problematic.
|
|
||||||
Typealiases are meant to be statically defined, and shouldn't be able to see properties that can be late-bound.
|
|
||||||
Thus, a new rule is introduced: a typealias can only reference properties/methods that are `const`.
|
|
||||||
|
|
||||||
This is a breaking change. To read more about this breakage and remediation steps, reference <<typealiases-are-treated-as-const>>.
|
|
||||||
|
|
||||||
== Noteworthy [small]#🎶#
|
|
||||||
|
|
||||||
Ready when you need them.
|
|
||||||
|
|
||||||
[[pkldoc-improvements]]
|
|
||||||
=== Pkldoc improvements
|
|
||||||
|
|
||||||
The following improvements have been made to xref:pkl-doc:index.adoc[Pkldoc]:
|
|
||||||
|
|
||||||
1. The documentation for the standard library no longer shows dependent packages, because every package implicitly depends on the standard library (https://github.com/apple/pkl/pull/503[#503]).
|
|
||||||
2. If the standard library exists in the package list, it is shown first (https://github.com/apple/pkl/pull/165[#165]).
|
|
||||||
3. Fewer characters are percent-encoded. For example, the `(` and `)` characters are no longer percent-encoded (https://github.com/apple/pkl/pull/489[#489]).
|
|
||||||
|
|
||||||
[[standard-library-changes]]
|
|
||||||
=== Standard library changes
|
|
||||||
|
|
||||||
To support <<http-proxying,http proxying>>, several changes have been made to the standard library (https://github.com/apple/pkl/pull/506[#506]).
|
|
||||||
|
|
||||||
* Module `pkl.settings` has new property `http`.
|
|
||||||
* class `EvaluatorSettings` originally in `pkl.Project` has been moved to its own module.
|
|
||||||
For backwards compatibility, `pkl.Project` now has a `typealias EvaluatorSettings` pointing to the new module, but it is marked `@Deprecated`.
|
|
||||||
|
|
||||||
=== Java API Changes
|
|
||||||
|
|
||||||
[[http-java-client]]
|
|
||||||
==== HTTP Java Client
|
|
||||||
|
|
||||||
A new Java API is introduced, named `org.pkl.core.http.HttpClient` (https://github.com/apple/pkl/pull/217[#217], https://github.com/apple/pkl/pull/295[#295], https://github.com/apple/pkl/pull/506[#506], https://github.com/apple/pkl/pull/518[#518]).
|
|
||||||
This interface provides the ability to manage how Pkl makes HTTP(S) calls, including how it deals with CA certificates, as well as proxies.
|
|
||||||
|
|
||||||
This client can be passed to Pkl's evaluator using `EvaluatorBuilder` for users of pkl-core, and `ConfigEvaluatorBuilder` for users of pkl-config-java or pkl-config-kotlin.
|
|
||||||
|
|
||||||
[[http-module-key-factory]]
|
|
||||||
==== New HTTP ModuleKeyFactory
|
|
||||||
|
|
||||||
A new module key factory for HTTP(S) modules has been added (https://github.com/apple/pkl/pull/495[#495]), and can be built with `org.pkl.core.ModuleKeyFactories#http`.
|
|
||||||
|
|
||||||
The preconfigured evaluator (`org.pkl.core.EvaluatorBuilder#preconfigured`) includes this module key.
|
|
||||||
Users that build their own evaluator from scratch should add this module key factory if HTTP(S) modules are needed.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
[source,diff]
|
|
||||||
----
|
|
||||||
import org.pkl.core.EvaluatorBuilder;
|
|
||||||
import org.pkl.core.module.ModuleKeyFactories;
|
|
||||||
|
|
||||||
var evaluator = EvaluatorBuilder.unconfigured()
|
|
||||||
+ .addModuleKeyFactory(ModuleKeyFactories.http) // <1>
|
|
||||||
.build();
|
|
||||||
----
|
|
||||||
<1> Add `ModuleKeyFactories.http` to the set of module key factories used by this evaluator.
|
|
||||||
|
|
||||||
If this module key factory is not added, Pkl may still make HTTP(S) requests if `ModuleKeyFactories.genericUrl` is included.
|
|
||||||
However, this bypasses proxy and CA certificate settings.
|
|
||||||
|
|
||||||
[[pkl-executor-changes]]
|
|
||||||
==== `pkl-executor` changes
|
|
||||||
|
|
||||||
A new set of parameters are now available to `org.pkl.executor.Executor` (https://github.com/apple/pkl/pull/217[#217], https://github.com/apple/pkl/pull/518[#518]).
|
|
||||||
These new parameters are exposed by `org.pkl.executor.spi.v1.ExecutorSpiOptions2`.
|
|
||||||
|
|
||||||
The new parameters are:
|
|
||||||
|
|
||||||
* `certificateFiles`: A set of CA certificate files to trust when making HTTPS requests.
|
|
||||||
* `certificateBytes`: A set of PEM-encoded CA certificate bytes to trust when making HTTPS requests.
|
|
||||||
* `testPort`: An option that is used for internal testing only.
|
|
||||||
|
|
||||||
These options are ignored when using a Pkl distribution whose version is lower than 0.26.0.
|
|
||||||
|
|
||||||
[[message-passing-api-changes]]
|
|
||||||
=== Message passing API changes
|
|
||||||
|
|
||||||
A new property, `http`, is added to xref:bindings-specification:message-passing-api.adoc#create-evaluator-request[Create Evaluator Request] (https://github.com/apple/pkl/pull/506[#506], https://github.com/apple/pkl/pull/518[#518]).
|
|
||||||
|
|
||||||
This allows for the configuration of Pkl's HTTP proxy, as well as CA certificates.
|
|
||||||
|
|
||||||
[[rename-codegen-classes]]
|
|
||||||
=== Ability to rename classes produced by Java/Kotlin code generators
|
|
||||||
|
|
||||||
The Java and Kotlin code generators have a new option that allows users to change the name of Java/Kotlin classes that get produced during code generation (https://github.com/apple/pkl/pull/499[#499]).
|
|
||||||
|
|
||||||
The CLIs have a new flag, `--rename`, and the Gradle plugin receives a similarly named property called `renames`.
|
|
||||||
|
|
||||||
This option accepts a map from an old prefix to a new prefix, where longer prefixes have higher precedence than shorter prefixes.
|
|
||||||
|
|
||||||
For example, when generating `module foo.Bar`, specifying `--rename foo.=com.foo.` will cause the Java/Kotlin code generators to emit package `com.foo`, and class `Bar`.
|
|
||||||
|
|
||||||
== Breaking Changes [small]#💔#
|
|
||||||
|
|
||||||
Things to watch out for when upgrading.
|
|
||||||
|
|
||||||
[[typealiases-are-treated-as-const]]
|
|
||||||
=== Typealiases are treated as `const`
|
|
||||||
|
|
||||||
A breaking change has been made to typealiases (https://github.com/apple/pkl/pull/516[#516]).
|
|
||||||
|
|
||||||
Typealiases are types that can stand in for another type declaration.
|
|
||||||
|
|
||||||
The aliased type can have constraints, where these constraints can reference values defined on the enclosing module.
|
|
||||||
|
|
||||||
.baseModule.pkl
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
typealias MyValue = Any(isValid) // <1>
|
|
||||||
|
|
||||||
isValid = true
|
|
||||||
----
|
|
||||||
<1> `isValid` is defined on the enclosing module.
|
|
||||||
|
|
||||||
One problem with this is that typealiases are meant to be statically defined.
|
|
||||||
Like classes, typealiases should not be changed by amending its enclosing module.
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
amends "baseModule.pkl"
|
|
||||||
|
|
||||||
isValid = false // <1>
|
|
||||||
----
|
|
||||||
<1> Despite this amended value, `typealias MyValue` should still stand for `Any(true)`.
|
|
||||||
|
|
||||||
To have clearer semantics, a new rule is introduced: referenced members on the enclosing module must be `const`.
|
|
||||||
Effectively, a typealias is treated as if it is also a `const` member.
|
|
||||||
|
|
||||||
To fix the above typealias, the `const` modifier should be added to `isValid`.
|
|
||||||
|
|
||||||
[source,diff]
|
|
||||||
----
|
|
||||||
typealias MyValue = Any(isValid)
|
|
||||||
|
|
||||||
-isValid = true
|
|
||||||
+const isValid = true
|
|
||||||
----
|
|
||||||
|
|
||||||
It might not always be valid to add the `const` modifier.
|
|
||||||
For example, this property may be overwritten in a downstream module, so adding the `const` modifier this would break that module.
|
|
||||||
In these cases, another fix is to self-import the enclosing module.
|
|
||||||
This works because import declarations introduce values that are implicitly marked `const`.
|
|
||||||
|
|
||||||
.baseModule.pkl
|
|
||||||
[source,diff]
|
|
||||||
----
|
|
||||||
+import "baseModule.pkl" // <1>
|
|
||||||
+
|
|
||||||
-typealias MyValue = Any(isValid)
|
|
||||||
+typealias MyValue = Any(baseModule.isValid)
|
|
||||||
|
|
||||||
isValid = true
|
|
||||||
----
|
|
||||||
<1> Self import
|
|
||||||
|
|
||||||
This change aligns with the behavior of class and annotation bodies.
|
|
||||||
|
|
||||||
To read more about the rationale behind this change, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0007-const-checks-in-typealiases.adoc[SPICE-0007].
|
|
||||||
|
|
||||||
[[expanded-dependency-notation-uris]]
|
|
||||||
=== Expanded dependency notation URIs
|
|
||||||
|
|
||||||
The parsing of relative path imports has changed (https://github.com/apple/pkl/pull/486[#486]).
|
|
||||||
|
|
||||||
Currently, the declaration `import "@foo/bar.pkl"` is treated as the import of a dependency named `foo`, but _only_ when declared within file-based and package-based modules.
|
|
||||||
In an HTTP-based module, for example, the above import is treated as "bar.pkl inside directory @foo".
|
|
||||||
|
|
||||||
To <<scheme-agnostic-project-dependencies,improve project dependencies>>, such declarations are treated as dependency notation in all modules, and will fail with error "Cannot find dependency".
|
|
||||||
|
|
||||||
Any import/reads that are intentionally relative-path imports will need to be updated to be prefixed with `./`.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
[source,diff]
|
|
||||||
----
|
|
||||||
-import "@bar/foo.pkl"
|
|
||||||
+import "./@bar/foo.pkl"
|
|
||||||
----
|
|
||||||
|
|
||||||
[[minimum-java-version-bump]]
|
|
||||||
=== Minimum Java version bumped to Java 17
|
|
||||||
|
|
||||||
The minimum Java version for Pkl has been bumped to Java 17 (https://github.com/apple/pkl/pull/439[#439]).
|
|
||||||
|
|
||||||
This means that when running the xref:pkl-cli:index.adoc#java-executable[jpkl] CLI, the installed `java` is expected to be Java 17 or higher.
|
|
||||||
This also means that users of the JVM libraries need to be on at least Java 17 or higher.
|
|
||||||
|
|
||||||
[[minimum-gradle-version-bump]]
|
|
||||||
=== Gradle plugin minimum version bump
|
|
||||||
|
|
||||||
The minimum Gradle version for the xref:main:pkl-gradle:index.adoc[Gradle plugin] is now 8.1 (https://github.com/apple/pkl/pull/454[#454]).
|
|
||||||
|
|
||||||
[[path-encoding-changes]]
|
|
||||||
=== Path encoding changes
|
|
||||||
|
|
||||||
In order to support Windows, the output of some Pkl tools have unsafe characters encoded in a special format (https://github.com/apple/pkl/pull/489[#489]).
|
|
||||||
|
|
||||||
On Windows, the characters `<`, `>`, `:`, `"`, `\`, `|`, `?`, and `*` are reserved and cannot exist in a filename.
|
|
||||||
Additionally, the ASCII control character code points `0x0` through `0x1f` are also illegal.
|
|
||||||
|
|
||||||
These characters are encoded by wrapping their hexadecimal code point value in parentheses.
|
|
||||||
For example, the character `:` is encoded as `(3a)`.
|
|
||||||
|
|
||||||
In some scenarios, files that get written to disk will be encoded.
|
|
||||||
These are:
|
|
||||||
|
|
||||||
* Files generated by Pkldoc.
|
|
||||||
* `*.kt` files produced by the Kotlin code generator.
|
|
||||||
* Packages written to the cache directory.
|
|
||||||
|
|
||||||
To learn more about this design, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0003-windows-safe-paths.adoc[SPICE-0003].
|
|
||||||
|
|
||||||
==== Pkldoc links changes
|
|
||||||
|
|
||||||
The links generated by Pkldoc have changed.
|
|
||||||
|
|
||||||
For example, a module called `module `foo<bar`` creates file `foo(3c)bar.html`, instead of `foo<bar.html`.
|
|
||||||
|
|
||||||
As part of this change, some Pkldoc links have also changed.
|
|
||||||
|
|
||||||
==== Cache directory prefix changes
|
|
||||||
|
|
||||||
The cache directory has been changed from `<moduleCacheDir>/package-1` to `<moduleCacheDir>/package-2`.
|
|
||||||
|
|
||||||
If Pkl's dependencies are vendored within a repository, these dependencies will need to be re-vendored.
|
|
||||||
|
|
||||||
=== Java API Breaking Changes
|
|
||||||
|
|
||||||
The following Java APIs have breaking changes:
|
|
||||||
|
|
||||||
|===
|
|
||||||
|Class/method | Breaking change
|
|
||||||
|
|
||||||
|`org.pkl.cli.commands.CliDownloadPackageCommand`
|
|
||||||
|Renamed to `org.pkl.cli.commands.CliPackageDownloader`
|
|
||||||
|
|
||||||
|`org.pkl.cli.commands.CliAbstractProjectCommand`
|
|
||||||
|Renamed to `org.pkl.cli.commands.CliProjectCommand`
|
|
||||||
|
|
||||||
|`org.pkl.config.java.InvalidMappingException`
|
|
||||||
|Fields `pklName` and `javaName` are now `private`.
|
|
||||||
|
|
||||||
|`org.pkl.core.packages.PackageResolver#getInstance`
|
|
||||||
|New parameter `httpClient` added
|
|
||||||
|
|
||||||
|`org.pkl.core.repl.ReplServer.ReplServer`
|
|
||||||
|New parameter `httpClient` added
|
|
||||||
|
|
||||||
|`org.pkl.commons.cli.CliBaseOptions`
|
|
||||||
|New parameters `testPort`, `httpProxy`, `httpNoProxy` added
|
|
||||||
|===
|
|
||||||
|
|
||||||
[[standard-library-breaking-changes]]
|
|
||||||
=== Standard library breaking changes
|
|
||||||
|
|
||||||
Class `pkl.Project.EvaluatorSettings` has been removed.
|
|
||||||
A new (deprecated) typealias is added that points to new module `pkl.EvaluatorSettings`.
|
|
||||||
For both of these, see https://github.com/apple/pkl/pull/506[#506].
|
|
||||||
|
|
||||||
[[type-checked-settings-file]]
|
|
||||||
=== Type-checked settings file
|
|
||||||
|
|
||||||
The loading of the xref:pkl-cli:index.adoc#settings-file[settings file] has changed (https://github.com/apple/pkl/pull/477[#477]).
|
|
||||||
|
|
||||||
The settings file is a way to control the behavior of the Pkl CLI.
|
|
||||||
This module is expected to `amends "pkl:settings"`, but this behavior was not checked.
|
|
||||||
|
|
||||||
In 0.26, it is an error if the settings module neither amends `"pkl:settings"`, nor set its `output.value` to an instance of the settings module.
|
|
||||||
|
|
||||||
[[empty-directories-excluded-from-packaging]]
|
|
||||||
=== Empty directories excluded from packaging
|
|
||||||
|
|
||||||
Currently, the `pkl project package` command will bundle empty directories into the resulting ZIP file.
|
|
||||||
|
|
||||||
In version 0.26, this has been changed to exclude these directories (https://github.com/apple/pkl/pull/330[#330]).
|
|
||||||
This means that the packages can produce a _different_ checksum if there are any empty directories.
|
|
||||||
|
|
||||||
This does not break the usage of existing packages, and does not affect compatibility of new packages used with older Pkl 0.25.
|
|
||||||
|
|
||||||
However, this can break certain workflows.
|
|
||||||
The `pkl project package` command runs a publish check, to determine if a package has already been published but with a different checksum.
|
|
||||||
When upgrading, users might encounter an error message like the following:
|
|
||||||
|
|
||||||
[source]
|
|
||||||
----
|
|
||||||
-- Pkl Error --
|
|
||||||
Package `package://example.com/foo@1.0.0` was already published with different contents.
|
|
||||||
----
|
|
||||||
|
|
||||||
To mitigate, the package's version needs to be bumped, even if package contents have not changed.
|
|
||||||
|
|
||||||
== Miscellaneous [small]#🐸#
|
|
||||||
|
|
||||||
The following changes have been made that are not new features, nor breaking changes.
|
|
||||||
|
|
||||||
* Pkl's user-agent header for HTTP requests has been tweaked to add a semicolon (https://github.com/apple/pkl/pull/221[#221]). Here is an example difference:
|
|
||||||
+
|
|
||||||
Before: `Pkl/0.26 (macOS native)` +
|
|
||||||
After: `Pkl/0.26 (macOS; native)`
|
|
||||||
* Documentation improvements (https://github.com/apple/pkl/pull/120[#120], https://github.com/apple/pkl/pull/121[#121], https://github.com/apple/pkl/pull/142[#142], https://github.com/apple/pkl/pull/121[#121], https://github.com/apple/pkl/pull/337[#337], https://github.com/apple/pkl/pull/341[#341], https://github.com/apple/pkl/pull/372[#372], https://github.com/apple/pkl/pull/386[#386], https://github.com/apple/pkl/pull/391[#391], https://github.com/apple/pkl/pull/397[#397], https://github.com/apple/pkl/pull/422[#422], https://github.com/apple/pkl/pull/436[#436], https://github.com/apple/pkl/pull/469[#469], https://github.com/apple/pkl/pull/484[#484], https://github.com/apple/pkl/pull/485[#485], https://github.com/apple/pkl/pull/[#491]).
|
|
||||||
* Optimization: `const` access is checked when variables are resolved, instead of every time the variable is accessed (https://github.com/apple/pkl/pull/438[#438]).
|
|
||||||
* Optimization: use logical AND instead of bitwise AND when comparing numbers (https://github.com/apple/pkl/pull/102[#102]).
|
|
||||||
* Mark Java classes `final` (https://github.com/apple/pkl/pull/458[#458]).
|
|
||||||
* Migrate code to newer JDK17 features, and clean up existing Java code (https://github.com/apple/pkl/pull/451[#451], https://github.com/apple/pkl/pull/458[#458], https://github.com/apple/pkl/pull/512[#512]).
|
|
||||||
* Improve rendering of string values within generated `<file>.pkl-expected.pcf` files when running `pkl test` (https://github.com/apple/pkl/pull/416[#416]).
|
|
||||||
* Improve performance of loading Pkl's built-in CA certificates (https://github.com/apple/pkl/pull/518[#518]).
|
|
||||||
|
|
||||||
== Bug Fixes [small]#🐜#
|
|
||||||
|
|
||||||
The following bugs have been fixed.
|
|
||||||
|
|
||||||
* `Collection#sortWith` produces un-sorted output (https://github.com/apple/pkl/pull/394[#394]).
|
|
||||||
* Property `typedType` in module `pkl.reflect` reflects upon `Type`, instead of `Typed` (https://github.com/apple/pkl/pull/426[#426]).
|
|
||||||
* `const` members can be assigned to when via an object spread (https://github.com/apple/pkl/pull/428[#428]).
|
|
||||||
* Relative globbed reads resolve to the same value in different modules (https://github.com/apple/pkl/pull/449[#449]).
|
|
||||||
* Performance bug: globbed imports and globbed reads expand to an unbounded number of root nodes (https://github.com/apple/pkl/pull/449[#449]).
|
|
||||||
* Relative globbed imports within a package match no modules (https://github.com/apple/pkl/pull/496[#496]).
|
|
||||||
* Constraints within typealiases resolve to the wrong values (https://github.com/apple/pkl/pull/144[#144]).
|
|
||||||
* Members of `pkl.reflect` cannot be rendered (https://github.com/apple/pkl/pull/170[#170], https://github.com/apple/pkl/pull/470[#470]).
|
|
||||||
* Throws `NullPointerException` if "List Resources Response" or "List Modules Response" messages contain both null `pathElements` and `error` (https://github.com/apple/pkl/pull/480[#480]).
|
|
||||||
* Classes of `com.oracle.truffle` are not shaded in pkl-config-java-all and pkl-tools (https://github.com/apple/pkl/pull/238[#238]).
|
|
||||||
* Throws `PklBugException` when running publish check on an invalid URL (https://github.com/apple/pkl/pull/441[#441]).
|
|
||||||
|
|
||||||
== Contributors [small]#🙏#
|
|
||||||
|
|
||||||
We would like to thank the contributors to this release (in alphabetical order):
|
|
||||||
|
|
||||||
* https://github.com/flyinprogrammer[@flyinprogrammer]
|
|
||||||
* https://github.com/fumiya-kume[@fumiya-kume]
|
|
||||||
* https://github.com/garysassano[@garysassano]
|
|
||||||
* https://github.com/HT154[@HT154]
|
|
||||||
* https://github.com/hoxell[@hoxell]
|
|
||||||
* https://github.com/jw-y[@jw-y]
|
|
||||||
* https://github.com/KushalP[@KushalP]
|
|
||||||
* https://github.com/lilyball[@lilyball]
|
|
||||||
* https://github.com/luuvish[@luuvish]
|
|
||||||
* https://github.com/Malix-off[@Malix-off]
|
|
||||||
* https://github.com/manuelsblanco[@manuelsblanco]
|
|
||||||
* https://github.com/MarkSRobinson[@MarkSRobinson]
|
|
||||||
* https://github.com/mitchcapper[@mitchcapper]
|
|
||||||
* https://github.com/mrs1669[@mrs1669]
|
|
||||||
* https://github.com/netvl[@netvl]
|
|
||||||
* https://github.com/nirinchev[@nirinchev]
|
|
||||||
* https://github.com/raj-j-shah[@raj-j-shah]
|
|
||||||
* https://github.com/sgammon[@sgammon]
|
|
||||||
* https://github.com/StefMa[@StefMa]
|
|
||||||
* https://github.com/stefanobaghino[@stefanobaghino]
|
|
||||||
* https://github.com/TimeTravelPenguin[@TimeTravelPenguin]
|
|
||||||
* https://github.com/TheFruxz[@TheFruxz]
|
|
||||||
* https://github.com/translatenix[@translatenix]
|
|
||||||
* https://github.com/zihluwang[@zihluwang]
|
|
||||||
|
|
||||||
A special thank-you goes out to https://github.com/translatenix[@translatenix]!
|
|
||||||
They submitted multiple bug fixes, improved the quality of the codebase, and provided HTTP improvements.
|
|
||||||
@@ -1,542 +0,0 @@
|
|||||||
= Pkl 0.27 Release Notes
|
|
||||||
:version: 0.27
|
|
||||||
:version-minor: 0.27.2
|
|
||||||
:release-date: November 5th, 2024
|
|
||||||
|
|
||||||
include::ROOT:partial$component-attributes.adoc[]
|
|
||||||
|
|
||||||
Pkl {version} was released on {release-date}. +
|
|
||||||
[.small]#The latest bugfix release is {version-minor}. (xref:changelog.adoc[All Versions])#
|
|
||||||
|
|
||||||
This release brings improvements in typechecking of `Listing` and `Mapping`, the ability to use readers from external processes, as well as a new import graph analyzer API.
|
|
||||||
|
|
||||||
The next release (0.28) is scheduled for February 2025.
|
|
||||||
|
|
||||||
Please send feedback and questions to https://github.com/apple/pkl/discussions[GitHub Discussions], or submit an issue on https://github.com/apple/pkl/issues/new[Github]. +
|
|
||||||
|
|
||||||
[small]#Pkl is hosted on https://github.com/apple/pkl[GitHub].
|
|
||||||
To get started, follow xref:pkl-cli:index.adoc#installation[Installation].#
|
|
||||||
|
|
||||||
== Highlights [small]#💖#
|
|
||||||
|
|
||||||
News you don't want to miss.
|
|
||||||
|
|
||||||
[#typecheck-improvements]
|
|
||||||
=== Improved typechecking of `Listing` and `Mapping` types
|
|
||||||
|
|
||||||
Typechecking of `Listing` and `Mapping` types has been improved (https://github.com/apple/pkl/pull/628[#628], https://github.com/apple/pkl/pull/725[#725], https://github.com/apple/pkl/pull/740[#740], https://github.com/apple/pkl/pull/752[#752], https://github.com/apple/pkl/pull/778[#778], https://github.com/apple/pkl/pull/781[#781]).
|
|
||||||
|
|
||||||
Today, the typecheck `listing: Listing<E>` immediately evaluates all listing elements to check that they have type `E`.
|
|
||||||
Likewise, the typecheck `mapping: Mapping<K, V>` immediately evaluates all mapping values to check that they have type `V`.
|
|
||||||
|
|
||||||
For example, the typecheck `listing: Listing<Bird>` proceeds as follows:
|
|
||||||
|
|
||||||
1. Check that `listing` has type `Listing`
|
|
||||||
2. Evaluate each listing element and check that it has type `Bird`
|
|
||||||
|
|
||||||
This behavior is different from how the rest of Pkl works.
|
|
||||||
Generally, Pkl only evaluates code that affects program output.
|
|
||||||
|
|
||||||
For example, consider the following program:
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
class Bird {
|
|
||||||
name: String
|
|
||||||
canFly: Boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
local bird: Bird = new {
|
|
||||||
name = "Pidgy"
|
|
||||||
canFly = throw("uh oh")
|
|
||||||
}
|
|
||||||
|
|
||||||
birdName = bird.name
|
|
||||||
----
|
|
||||||
|
|
||||||
Even though `bird.canFly` throws an error, the above program succeeds because `bird.canFly` is not part of the program's output and hence is never accessed (Note that `bird` is a _local_ property).
|
|
||||||
|
|
||||||
Typechecks of `Mapping` and `Listing` types have been changed to match this behavior.
|
|
||||||
Mapping and listing values are now only typechecked if and when they are accessed.
|
|
||||||
|
|
||||||
NOTE: Mapping _keys_ are still eagerly checked.
|
|
||||||
|
|
||||||
This change causes some previously failing programs to evaluate successfully:
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
local myNumbers: Listing<Int> = new { 1; 2; "uh oh" }
|
|
||||||
result = myNumbers[0]
|
|
||||||
----
|
|
||||||
In Pkl 0.26 and below, the above program fails with a type mismatch error because element `"uh oh"` is typechecked when `myNumbers` is accessed.
|
|
||||||
In Pkl 0.27, the same program succeeds, because only element `myNumbers[0]` is part of the program's output and its typecheck succeeds.
|
|
||||||
|
|
||||||
As another consequence of this change, some Pkl programs now complete more quickly:
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
local allBirds: Mapping<String, Bird> = import*("**/bird.pkl")
|
|
||||||
|
|
||||||
environment: "prod"|"qa"
|
|
||||||
|
|
||||||
cluster: String
|
|
||||||
|
|
||||||
myBird = allBirds["\(environment)/\(cluster)/bird.pkl"] // <1>
|
|
||||||
----
|
|
||||||
In Pkl 0.26 and below, all modules matching `**/bird.pkl` are imported when `allBirds` is accessed and typechecked.
|
|
||||||
This can take a long time.
|
|
||||||
In Pkl 0.27, only module `"\(environment)/\(cluster)/bird.pkl"` is imported because only this module is part of the program's output.
|
|
||||||
|
|
||||||
To learn more about this change, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0010-overhauled-mapping-listing-typechecks.adoc[SPICE-0010].
|
|
||||||
|
|
||||||
=== External readers
|
|
||||||
|
|
||||||
A new feature has been added to allow Pkl to spawn external processes to read resources and modules (https://github.com/apple/pkl/pull/660[#660], https://github.com/apple/pkl/pull/762[#762], https://github.com/apple/pkl/pull/766[#766], https://github.com/apple/pkl/pull/770[#770]).
|
|
||||||
|
|
||||||
Today, users who use Pkl as a library can define custom module and resource readers.
|
|
||||||
This allows authors to extend how Pkl performs I/O.
|
|
||||||
|
|
||||||
For example, users can implement a reader that reads the `secret:` scheme, where they define exactly how the bytes are fetched in the host runtime.
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
result = read("secret:mypassword") // <1>
|
|
||||||
----
|
|
||||||
<1> `secret:` is a custom scheme defined by the host runtime.
|
|
||||||
|
|
||||||
However, CLI users have been left out.
|
|
||||||
|
|
||||||
In Pkl 0.27, a new extension point is added to allow users to implement module and resource readers as external processes.
|
|
||||||
When run, Pkl will spawn the external process, and talk to the process via xref:bindings-specification:message-passing-api.adoc[message passing].
|
|
||||||
|
|
||||||
To learn more about this feature, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0009-external-readers.adoc[SPICE-0009].
|
|
||||||
|
|
||||||
Thanks to https://github.com/HT154[@HT154] for contributing the feature!
|
|
||||||
|
|
||||||
[[import-analysis]]
|
|
||||||
=== Import analysis API
|
|
||||||
|
|
||||||
A new API has been added to analyze the import graph of Pkl modules (https://github.com/apple/pkl/pull/695[#695]).
|
|
||||||
|
|
||||||
This API comes in four forms:
|
|
||||||
|
|
||||||
1. A standard library module: `pkl:analyze`
|
|
||||||
2. A CLI command: `pkl anaylze imports`
|
|
||||||
3. A Java API: `org.pkl.core.Analyzer`
|
|
||||||
4. A Gradle API: `org.pkl.gradle.task.AnalyzeImportsTask`
|
|
||||||
|
|
||||||
Some use-cases for this API are:
|
|
||||||
|
|
||||||
* For build tools to perform out-of-date checks. Build tools can invalidate a cached result if any of the transitive modules have changed.
|
|
||||||
* Static code analysis, to determine how Pkl modules depend on each other.
|
|
||||||
|
|
||||||
With this API, xref:pkl-gradle:index.adoc[] now by default <<transitive-modules-computed-by-default,computes the transitive modules>> for many of its tasks.
|
|
||||||
|
|
||||||
Here is an example of the CLI in use:
|
|
||||||
|
|
||||||
[source,shell]
|
|
||||||
----
|
|
||||||
pkl analyze imports -f json myModule.pkl # <1>
|
|
||||||
----
|
|
||||||
<1> `-f` means: produce output in JSON.
|
|
||||||
|
|
||||||
Produces:
|
|
||||||
|
|
||||||
[source,json]
|
|
||||||
----
|
|
||||||
{
|
|
||||||
"imports": {
|
|
||||||
"file:///my/proj/myModule.pkl": [
|
|
||||||
{
|
|
||||||
"uri": "projectpackage://example.com/birds@1.0.0#/Bird.pkl"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"projectpackage://example.com/birds@1.0.0#/Bird.pkl": []
|
|
||||||
},
|
|
||||||
"resolvedImports": {
|
|
||||||
"file:///my/proj/myModule.pkl": "file:///my/proj/myModule.pkl",
|
|
||||||
"projectpackage://example.com/birds@1.0.0#/Bird.pkl": "file:///my/birds/Bird.pkl"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
From this output, we can see that `myModule.pkl` imports `Bird.pkl` from the `birds` package.
|
|
||||||
We can also see that the module `projectpackage://example.com/birds@1.0.0#/Bird.pkl` resolves to disk location `\file:///my/birds/Bird.pkl` (we can deduce that `birds` is a xref:language-reference:index.adoc#local-dependencies[local dependency]).
|
|
||||||
|
|
||||||
To learn more about this feature, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0001-import-graph-analyzer-api.adoc[SPICE-0001].
|
|
||||||
|
|
||||||
== Noteworthy [small]#🎶#
|
|
||||||
|
|
||||||
Ready when you need them.
|
|
||||||
|
|
||||||
=== Colored output
|
|
||||||
|
|
||||||
The Pkl CLI will now emit some messages in color (https://github.com/apple/pkl/pull/552[#552], https://github.com/apple/pkl/pull/746[#746], https://github.com/apple/pkl/pull/771[#771], https://github.com/apple/pkl/pull/779[#779]).
|
|
||||||
|
|
||||||
Here is a sneak peek of colored error messages in action.
|
|
||||||
|
|
||||||
image::error_sample.png[syntax highlighted output]
|
|
||||||
|
|
||||||
Thanks to https://github.com/thomaspurchas[@thomaspurchas] for contributing to this feature!
|
|
||||||
|
|
||||||
=== `const local` object members
|
|
||||||
|
|
||||||
The `const` modifier can be applied to object members, provided that they are also `local` (https://github.com/apple/pkl/pull/678[#678]).
|
|
||||||
|
|
||||||
Currently, regular object members are not allowed to have the `const` modifier.
|
|
||||||
This introduces an artificial pain point.
|
|
||||||
|
|
||||||
For example, given the following module:
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
amends "Bird.pkl"
|
|
||||||
|
|
||||||
import "Bird.pkl"
|
|
||||||
|
|
||||||
local northAmerica = "North America"
|
|
||||||
|
|
||||||
local typealias NorthAmericanBird = Bird(this.origin == northAmerica) // <1>
|
|
||||||
----
|
|
||||||
<1> Error: cannot reference `northAmerica` from here because it is not `const`.
|
|
||||||
|
|
||||||
This is invalid code, because this typealias is referencing a non-const value on the enclosing module.
|
|
||||||
However, is not possible fix this by adding the `const` modifier to `northAmerica`.
|
|
||||||
This is because this module `amends "Bird.pkl"`, which means that this module is considered a regular object and not a class.
|
|
||||||
This means that any members declared here are _object members_, and not _class members_.
|
|
||||||
|
|
||||||
In Pkl 0.27, a new rule is introduced to allow the `const` modifier to be applied to object members, provided that they are also `local`.
|
|
||||||
|
|
||||||
This change affects object properties, as well as object methods.
|
|
||||||
|
|
||||||
To read more about this design, consult https://github.com/apple/pkl-evolution/blob/main/spices/SPICE-0011-const-object-members.adoc[SPICE-0011].
|
|
||||||
|
|
||||||
=== Pkl CLI changes
|
|
||||||
|
|
||||||
==== New CLI Flags
|
|
||||||
|
|
||||||
Some new common flags have been added to the CLI (https://github.com/apple/pkl/pull/660[#660], https://github.com/apple/pkl/pull/746[#746]).
|
|
||||||
|
|
||||||
|===
|
|
||||||
|Flag |Description
|
|
||||||
|
|
||||||
|`--color`
|
|
||||||
|Format messages with ANSI color codes
|
|
||||||
|
|
||||||
|`--external-module-reader`
|
|
||||||
|Shell out to a process to read certain modules.
|
|
||||||
|
|
||||||
|`--external-resource-reader`
|
|
||||||
|Shell out to a process to read certain resources.
|
|
||||||
|===
|
|
||||||
|
|
||||||
==== New command: `pkl analyze imports`
|
|
||||||
|
|
||||||
As part of the set of APIs added for <<import-analysis,import analysis>>, a new subcommand has been added called `analyze imports` (https://github.com/apple/pkl/pull/695[#695]).
|
|
||||||
|
|
||||||
For details, consult the xref:pkl-cli:index.adoc#command-analyze-imports[CLI documentation].
|
|
||||||
|
|
||||||
=== Kotlin/Java code generator improvements
|
|
||||||
|
|
||||||
Various improvements have been made to the Kotlin and Java code generators (https://github.com/apple/pkl/pull/705[#705], https://github.com/apple/pkl/pull/710[#710], https://github.com/apple/pkl/pull/714[#714], https://github.com/apple/pkl/pull/721[#721], https://github.com/apple/pkl/pull/729[#729]).
|
|
||||||
|
|
||||||
==== Java codegen improvements
|
|
||||||
|
|
||||||
* Only generate `hashCode()`, `equals()`, and `toString()` methods for Java classes that are instantiable.
|
|
||||||
* Add support for Spring Boot 3.
|
|
||||||
* Make module classes also implement serializable.
|
|
||||||
* Make empty Java classes instantiable.
|
|
||||||
|
|
||||||
==== Kotlin codegen improvements
|
|
||||||
|
|
||||||
* Skip generation of `copy()`, `equals()`, `hashCode()`, `toString()` methods for abstract Kotlin classes.
|
|
||||||
* Don't implement `Serializable` for abstract classes
|
|
||||||
* Add support for Spring Boot 3.
|
|
||||||
|
|
||||||
Thanks to https://github.com/translatenix[@translatenix] for contributing these improvements!
|
|
||||||
|
|
||||||
=== Gradle Plugin changes
|
|
||||||
|
|
||||||
==== New `AnalyzeImportsTask`
|
|
||||||
|
|
||||||
A new task called `org.pkl.gradle.task.AnalyzeImportsTask` is introduced (https://github.com/apple/pkl/pull/695[#695]).
|
|
||||||
|
|
||||||
This task is the Gradle analogy to `pkl analyze imports`.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
[tabs]
|
|
||||||
====
|
|
||||||
build.gradle::
|
|
||||||
+
|
|
||||||
[source,groovy]
|
|
||||||
----
|
|
||||||
pkl {
|
|
||||||
analyzers {
|
|
||||||
imports {
|
|
||||||
appConfig {
|
|
||||||
sourceModules.add(file("src/main/resources/appConfig.pkl"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
build.gradle.kts::
|
|
||||||
+
|
|
||||||
[source,kotlin]
|
|
||||||
----
|
|
||||||
pkl {
|
|
||||||
analyzers {
|
|
||||||
imports {
|
|
||||||
register("appConfig") {
|
|
||||||
sourceModules.add(file("src/main/resources/appConfig.pkl"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
====
|
|
||||||
|
|
||||||
For more details, consult the xref:pkl-gradle:index.adoc#analyze-imports[documentation].
|
|
||||||
|
|
||||||
==== Tracked file outputs
|
|
||||||
|
|
||||||
Tasks created by the Pkl plugin now declare tracked output files (https://github.com/apple/pkl/pull/403[#403]).
|
|
||||||
|
|
||||||
This means that downstream tasks do not need to declare an explicit dependency on the Pkl task.
|
|
||||||
|
|
||||||
For example, assuming that `evalPkl` is an `EvalTask`:
|
|
||||||
|
|
||||||
.build.gradle.kts
|
|
||||||
[source,diff]
|
|
||||||
----
|
|
||||||
val myGradleTask by tasks.registering {
|
|
||||||
inputs.files(evalPkl)
|
|
||||||
- dependsOn(evalPkl) // <1>
|
|
||||||
}
|
|
||||||
----
|
|
||||||
<1> No longer necessary to declare this dependency.
|
|
||||||
|
|
||||||
[[transitive-modules-computed-by-default]]
|
|
||||||
==== `transitiveModules` computed by default
|
|
||||||
|
|
||||||
The `transitiveModules` property of a task is now computed by building the import graph of the source modules (https://github.com/apple/pkl/pull/695[#695]).
|
|
||||||
|
|
||||||
This means that Pkl-related tasks no longer need to declare their set of transitive modules, because the pkl-gradle plugin will compute this automatically.
|
|
||||||
|
|
||||||
NOTE: This adds latency to each task. To opt out of this behavior, set `transitiveModules` explicitly.
|
|
||||||
|
|
||||||
=== Standard library changes
|
|
||||||
|
|
||||||
==== Additions to `pkl:base`
|
|
||||||
|
|
||||||
New properties and methods have been added to the classes of `pkl:base` (https://github.com/apple/pkl/pull/666[#666], https://github.com/apple/pkl/pull/683[#683]).
|
|
||||||
|
|
||||||
New properties and methods have been added to {uri-stdlib-Listing}[`Listing`] and {uri-stdlib-Mapping}[`Mapping`].
|
|
||||||
|
|
||||||
One of the goals of this change is to improve the experience of authoring constraints.
|
|
||||||
This eliminates the need to convert to collection types as often.
|
|
||||||
|
|
||||||
The added properties and methods are:
|
|
||||||
|
|
||||||
* {uri-stdlib-Listing}#first[`Listing.first`]
|
|
||||||
* {uri-stdlib-Listing}#firstOrNull[`Listing.firstOrNull`]
|
|
||||||
* {uri-stdlib-Listing}#last[`Listing.last`]
|
|
||||||
* {uri-stdlib-Listing}#lastOrNull[`Listing.lastOrNull`]
|
|
||||||
* {uri-stdlib-Listing}#single[`Listing.single`]
|
|
||||||
* {uri-stdlib-Listing}#singleOrNull[`Listing.singleOrNull`]
|
|
||||||
* {uri-stdlib-Listing}#every()[`Listing.every()`]
|
|
||||||
* {uri-stdlib-Listing}#any()[`Listing.any()`]
|
|
||||||
* {uri-stdlib-Listing}#contains()[`Listing.contains()`]
|
|
||||||
* {uri-stdlib-Mapping}#containsValue()[`Mapping.containsValue()`]
|
|
||||||
* {uri-stdlib-Mapping}#every()[`Mapping.every()`]
|
|
||||||
* {uri-stdlib-Mapping}#any()[`Mapping.any()`]
|
|
||||||
|
|
||||||
With this, the following change can be made to existing constraints:
|
|
||||||
|
|
||||||
[source,diff]
|
|
||||||
----
|
|
||||||
-ipAddresses: Listing<String>(toList().contains("127.0.0.1"))
|
|
||||||
+ipAddresses: Listing<String>(contains("127.0.0.1"))
|
|
||||||
----
|
|
||||||
|
|
||||||
Additionally, a new method is added to `String`, called {uri-stdlib-String}#splitLimit()[`String.splitLimit()`].
|
|
||||||
|
|
||||||
==== Additions to `pkl:EvaluatorSettings`
|
|
||||||
|
|
||||||
New properties have been added to `pkl:EvaluatorSettings` (https://github.com/apple/pkl/pull/660[#660], https://github.com/apple/pkl/pull/746[#746]).
|
|
||||||
|
|
||||||
These are:
|
|
||||||
|
|
||||||
* {uri-stdlib-evaluatorSettingsModule}/#color[`color`]
|
|
||||||
* {uri-stdlib-evaluatorSettingsModule}/#externalModuleReaders[`externalModuleReaders`]
|
|
||||||
* {uri-stdlib-evaluatorSettingsModule}/#externalResourceReaders[`externalResourceReaders`]
|
|
||||||
|
|
||||||
==== `String` to `Number` conversion improvements.
|
|
||||||
|
|
||||||
The `String` to `Number` converter methods, for example, {uri-stdlib-StringToInt}[`String.toInt()`], can now handle underscore separators (https://github.com/apple/pkl/pull/578[#578], https://github.com/apple/pkl/pull/580[#580]).
|
|
||||||
|
|
||||||
This better aligns with the source code representation of xref:language-reference:index.adoc#integers[number literals].
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
myNum = "1_000".toInt() // <1>
|
|
||||||
----
|
|
||||||
<1> Result: `1000`
|
|
||||||
|
|
||||||
==== New module: `pkl:analyze`
|
|
||||||
|
|
||||||
As part of <<import-analysis>>, a new standard library module is added called `pkl:analyze` (https://github.com/apple/pkl/pull/695[#695]).
|
|
||||||
|
|
||||||
This module provides an API for computing the total import graph given a set of input modules.
|
|
||||||
This API treats the inputs as entrypoints, and produces a graph representing the entire dependency tree, including transitive imports.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
import "pkl:analyze"
|
|
||||||
|
|
||||||
importGraph: analyze.ImportGraph = analyze.importGraph(Set("file:///path/to/my/module.pkl"))
|
|
||||||
----
|
|
||||||
|
|
||||||
For details, see the {uri-stdlib-analyzeModule}[documentation].
|
|
||||||
|
|
||||||
=== Annotations on `PklProject` added to packages
|
|
||||||
|
|
||||||
When creating packages, some annotations on a `PklProject` will affect how pkldoc generates documentation.
|
|
||||||
|
|
||||||
* `@Unlisted`: Omit the package from publishing documentation.
|
|
||||||
* `@Deprecated`: Add information on the package to show that it is deprecated.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
.PklProject
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
@Deprecated
|
|
||||||
amends "pkl:Project"
|
|
||||||
----
|
|
||||||
|
|
||||||
=== Test report improvements
|
|
||||||
|
|
||||||
The report generated from `pkl test` has been overhauled and improved (https://github.com/apple/pkl/pull/498[#498], https://github.com/apple/pkl/pull/628[#682], https://github.com/apple/pkl/pull/738[#738], https://github.com/apple/pkl/pull/771[#771]).
|
|
||||||
|
|
||||||
* Tests are grouped into either the `facts` or `examples` section.
|
|
||||||
* A summary line is added, describing how many tests have passed and failed, and how many assertions have passed and failed.
|
|
||||||
* Test results are colored.
|
|
||||||
* The ✅ and ❌ emojis are replaced with ✔ and ✘.
|
|
||||||
* Thrown errors are reported within the test.
|
|
||||||
|
|
||||||
Here is a sneak peek of the new test result output.
|
|
||||||
|
|
||||||
image::test_sample.png[]
|
|
||||||
|
|
||||||
Thanks to https://github.com/jjmaestro[@jjmaestro] for contributing to this improvement!
|
|
||||||
|
|
||||||
=== Java API additions
|
|
||||||
|
|
||||||
==== New API: `org.pkl.core.Analyzer`
|
|
||||||
|
|
||||||
As part of <<import-analysis>>, a new Java API called `org.pkl.core.Analyzer` is introduced (https://github.com/apple/pkl/pull/695[#695]).
|
|
||||||
|
|
||||||
==== New methods
|
|
||||||
|
|
||||||
The following methods are added:
|
|
||||||
|
|
||||||
**pkl-executor**
|
|
||||||
|
|
||||||
* `org.pkl.executor.ExecutorException.getPklVersion`
|
|
||||||
* `org.pkl.executor.ExecutorException.ExecutorException(java.lang.String, java.lang.Throwable, java.lang.String)`
|
|
||||||
|
|
||||||
**pkl-core**
|
|
||||||
|
|
||||||
* `org.pkl.core.module.ModuleKeyFactories.externalProcess(java.lang.String, org.pkl.core.externalreader.ExternalReaderProcess)`
|
|
||||||
* `org.pkl.core.module.ModuleKeyFactories.externalProcess(java.lang.String, org.pkl.core.externalreader.ExternalReaderProcess, long)`
|
|
||||||
|
|
||||||
== Breaking Changes [small]#💔#
|
|
||||||
|
|
||||||
Things to watch out for when upgrading.
|
|
||||||
|
|
||||||
=== Java API breaking changes
|
|
||||||
|
|
||||||
The following Java APIs have breaking changes:
|
|
||||||
|
|
||||||
|===
|
|
||||||
|Class/method | Breaking change
|
|
||||||
|
|
||||||
|`org.pkl.core.runtime.TestResults`
|
|
||||||
|Moved to `org.pkl.core.TestResults`, turned into a record, and largely restructured.
|
|
||||||
|
|
||||||
|`org.pkl.core.module.ModuleKeyFactories.closeQuietly`
|
|
||||||
|Deprecated for removal in favor of `org.pkl.core.Closeables.closeQuietly`.
|
|
||||||
|===
|
|
||||||
|
|
||||||
=== Spring Boot 2 support dropped
|
|
||||||
|
|
||||||
The Java code generator no longer supports Spring Boot 2.x (https://github.com/apple/pkl/pull/729[#729]).
|
|
||||||
|
|
||||||
Spring Boot 2 users can continue to use the Pkl 0.26 code generator.
|
|
||||||
|
|
||||||
=== `pkl test` considered failing when writing examples
|
|
||||||
|
|
||||||
If running `pkl test` results in `pkl-expected.pcf` files being written, the test now exits with exit code `10` (https://github.com/apple/pkl/pull/738[#738]).
|
|
||||||
|
|
||||||
Additionally, the junit reports will consider the test as failing.
|
|
||||||
|
|
||||||
=== `Listing` and `Mapping` typecheck changes
|
|
||||||
|
|
||||||
Due to changes to <<typecheck-improvements,Listing and Mapping typechecking>>, some previously failing programs now succeed.
|
|
||||||
This can happen when erroneous code is never evaluated because it does not affect program output:
|
|
||||||
|
|
||||||
[source,pkl]
|
|
||||||
----
|
|
||||||
local myNumbers: Listing<Int> = new { 1; 2; "uh oh" }
|
|
||||||
result = myNumbers[0] // <1>
|
|
||||||
----
|
|
||||||
<1> In Pkl 0.26 and below, throws a type mismatch error.
|
|
||||||
+
|
|
||||||
In Pkl 0.27, yields `1`.
|
|
||||||
|
|
||||||
== Miscellaneous [small]#🐸#
|
|
||||||
|
|
||||||
* Make pkl-doc top box include a preview of the rest of module-level documentation (https://github.com/apple/pkl/pull/570[#570]).
|
|
||||||
* Module `pkl-core` now has a dependency on `org.msgpack:msgpack-core` (https://github.com/apple/pkl/pull/660[#660]). Users concerned about potential version conflicts can use one of Pkl's shaded fat JARs (`pkl-config-java-all`, `pkl-tools`).
|
|
||||||
* Make PklProject.deps.json files end in a newline (https://github.com/apple/pkl/pull/664[#644]).
|
|
||||||
* Fix invalid syntax of code examples in stdlib doc comments (https://github.com/apple/pkl/pull/703[#703]).
|
|
||||||
* Update Java dependencies (https://github.com/apple/pkl/pull/689[#689], https://github.com/apple/pkl/pull/767[#767]).
|
|
||||||
* Add jbang catalog support (https://github.com/apple/pkl/pull/655[#655]).
|
|
||||||
* Documentation improvements (https://github.com/apple/pkl/pull/623[#623], https://github.com/apple/pkl/pull/680[#680], https://github.com/apple/pkl/pull/682[#682], https://github.com/apple/pkl/pull/685[#685], https://github.com/apple/pkl/pull/687[#687], https://github.com/apple/pkl/pull/703[#703], https://github.com/apple/pkl/pull/704[#704], https://github.com/apple/pkl/pull/715[#715], https://github.com/apple/pkl/pull/730[#730], https://github.com/apple/pkl/pull/753[#753]).
|
|
||||||
|
|
||||||
== Bug Fixes [small]#🐜#
|
|
||||||
|
|
||||||
The following bugs have been fixed.
|
|
||||||
|
|
||||||
* CLI `--property` flags containing `=` in property values are not parsed correctly (https://github.com/apple/pkl/issues/630[#630]).
|
|
||||||
* Thrown `PklBugException` when reading assets from a local project dependency (https://github.com/apple/pkl/issues/641[#641]).
|
|
||||||
* Thrown `PklBugException` when PklProjects have a cyclical local dependency (https://github.com/apple/pkl/pull/731[#731]).
|
|
||||||
* Thrown exception when sending `ReadResourceResponse` or `ReadModuleResponse` where both `contents` and `error` are `null` (https://github.com/apple/pkl/pull/657[#657]).
|
|
||||||
* Double unary minus is evaluated as single unary minus (https://github.com/apple/pkl/pull/697[#697]).
|
|
||||||
* Kotlin compiler fails to compiler generated classes with "copy overrides nothing" for subclasses of abstract classes (https://github.com/apple/pkl/issues/569[#569]).
|
|
||||||
* "Unexpected error" thrown when `Module.output` has its type overridden (https://github.com/apple/pkl/issues/709[#709]).
|
|
||||||
* "Unexpected error" thrown when loading files with non-ASCII characters (https://github.com/apple/pkl/issues/653[#653]).
|
|
||||||
* Type parameters in `new Mapping<TypeA, TypeB>`/`new Listing <Type>` are not checked (https://github.com/apple/pkl/issues/405[#405]).
|
|
||||||
* Comparison methods of `pkl:semver` are incorrect (https://github.com/apple/pkl/issues/772[#772]).
|
|
||||||
|
|
||||||
== Contributors [small]#🙏#
|
|
||||||
|
|
||||||
We would like to thank the contributors to this release (in alphabetical order):
|
|
||||||
|
|
||||||
* https://github.com/djarnis73[@djarnis73]
|
|
||||||
* https://github.com/kasugamirai[@kasugamirai]
|
|
||||||
* https://github.com/KushalP[@KushalP]
|
|
||||||
* https://github.com/jjmaestro[@jjmaestro]
|
|
||||||
* https://github.com/HT154[@HT154]
|
|
||||||
* https://github.com/lamtrinhdev[@lamtrinhdev]
|
|
||||||
* https://github.com/ManuW[@ManuW]
|
|
||||||
* https://github.com/maxandersen[@maxandersen]
|
|
||||||
* https://github.com/netvl[@netvl]
|
|
||||||
* https://github.com/StefMa[@StefMa]
|
|
||||||
* https://github.com/taichi-ishitani[@taichi-ishitani]
|
|
||||||
* https://github.com/thomaspurchas[@thomaspurchas]
|
|
||||||
* https://github.com/translatenix[@translatenix]
|
|
||||||
@@ -1,91 +1,6 @@
|
|||||||
= Changelog
|
= Changelog
|
||||||
include::ROOT:partial$component-attributes.adoc[]
|
include::ROOT:partial$component-attributes.adoc[]
|
||||||
|
|
||||||
[[release-0.27.2]]
|
|
||||||
== 0.27.2 (2025-01-22)
|
|
||||||
|
|
||||||
=== Fixes
|
|
||||||
|
|
||||||
* Fixes issues where server mode message decoding might result in null pointer exceptions (https://github.com/apple/pkl/pull/853[#853], https://github.com/apple/pkl/pull/882[#882]).
|
|
||||||
* Fixes an issue where the test report outputs decimal numbers using local-specific decimals (https://github.com/apple/pkl/pull/868[#868]).
|
|
||||||
* Fixes an issue where the native executables might not run on some environments, resulting in an error like "Fatal error: Failed to create the main Isolate" (https://github.com/apple/pkl/pull/875[#875]).
|
|
||||||
|
|
||||||
=== Contributors ❤️
|
|
||||||
|
|
||||||
Thank you to all the contributors for this release!
|
|
||||||
|
|
||||||
* link:https://github.com/HT154[@HT154]
|
|
||||||
* link:https://github.com/StefMa[@StefMa]
|
|
||||||
|
|
||||||
[[release-0.27.1]]
|
|
||||||
== 0.27.1 (2024-12-06)
|
|
||||||
|
|
||||||
=== Fixes
|
|
||||||
|
|
||||||
- Fixes a broken "number literals" link in the 0.27 release notes (https://github.com/apple/pkl/pull/784[#784]).
|
|
||||||
- Fixes a possible deadlock during external reader process close (https://github.com/apple/pkl/pull/786[#786]).
|
|
||||||
- Fixes counting elements with computed indices multiple times in length computation of listings (https://github.com/apple/pkl/pull/797[#797]).
|
|
||||||
- Fixes non Pkl modules being reported in GatherImports task, leading to plugin failures (https://github.com/apple/pkl/pull/821[#821]).
|
|
||||||
- Fixes a problem where the delegate chain of type casts for Listing/Mapping get unreasonably big, even though the type nodes are the same, which may lead to a stack overflow or performance degradation (https://github.com/apple/pkl/pull/826[#826]).
|
|
||||||
- Fixes incorrect scoping of type variables in lazy Listing/Mapping type checking in cross-module typealiases (https://github.com/apple/pkl/pull/789[#789]).
|
|
||||||
- Fixes regression in type checking logic for Listing/Mapping (https://github.com/apple/pkl/pull/789[#789]).
|
|
||||||
|
|
||||||
=== Contributors ❤️
|
|
||||||
|
|
||||||
Thank you to all the contributors for this release!
|
|
||||||
|
|
||||||
* link:https://github.com/GUI[@GUI]
|
|
||||||
* link:https://github.com/HT154[@HT154]
|
|
||||||
* link:https://github.com/odenix[@odenix] (formerly @translatenix)
|
|
||||||
|
|
||||||
|
|
||||||
[[release-0.27.0]]
|
|
||||||
== 0.27.0 (2024-11-05)
|
|
||||||
|
|
||||||
xref:0.27.adoc[Release notes]
|
|
||||||
|
|
||||||
[[release-0.26.3]]
|
|
||||||
== 0.26.3 (2024-08-06)
|
|
||||||
|
|
||||||
=== Fixes
|
|
||||||
|
|
||||||
* Fixes an issue where CLI argument `--property foo=""` is effectively parsed as `--property foo="true"`. This is now parsed as an empty string (https://github.com/apple/pkl/pull/596[#596]).
|
|
||||||
* Fixes a regression where amending a globbed import or globbed read results in a PklBugException (https://github.com/apple/pkl/pull/607[#607]).
|
|
||||||
* Fixes an issue around using `file()` notation when using the pkl-gradle plugin on Windows (https://github.com/apple/pkl/pull/611[#611]).
|
|
||||||
|
|
||||||
[[release-0.26.2]]
|
|
||||||
== 0.26.2 (2024-07-18)
|
|
||||||
|
|
||||||
=== Fixes
|
|
||||||
|
|
||||||
* Fixes a possible race condition where multiple concurrent Pkl evaluations results in a thrown exception when downloading packages (https://github.com/apple/pkl/pull/584[#584]).
|
|
||||||
|
|
||||||
[[release-0.26.1]]
|
|
||||||
== 0.26.1 (2024-06-28)
|
|
||||||
|
|
||||||
=== Fixes
|
|
||||||
|
|
||||||
* Fixes a regression where native executables fail to run on some environments that don't support newer CPU features (https://github.com/apple/pkl/pull/551[#551]).
|
|
||||||
* Fixes a `PklBugException` when passing `.` as a project directory to `pkl project resolve` and `pkl project package` (https://github.com/apple/pkl/pull/544[#544]).
|
|
||||||
|
|
||||||
=== Changes
|
|
||||||
|
|
||||||
* Disable revocation checking of TLS certificates (https://github.com/apple/pkl/pull/553[#553]).
|
|
||||||
+
|
|
||||||
As part of HTTP improvements in 0.26, we unwittingly fixed a bug where Pkl does not actually perform cert revocation checks when making HTTPS requests.
|
|
||||||
This fix, unfortunately, caused a regression in some cases.
|
|
||||||
For example, this happens when connecting to a server that bears a public trust certificate, while in an environment with no internet access.
|
|
||||||
This is because the HTTP client needs to check the revocation status of all certificates in the chain.
|
|
||||||
+
|
|
||||||
Revocation checks are a nuanced topic with some benefits, and also with its own problem areas.
|
|
||||||
For this reason, revocation checking is disabled for Pkl's native CLIs.
|
|
||||||
Users of Pkl's Java APIs will respect the revocation settings set in the JVM.
|
|
||||||
|
|
||||||
[[release-0.26.0]]
|
|
||||||
== 0.26.0 (2024-06-17)
|
|
||||||
|
|
||||||
xref:0.26.adoc[Release notes]
|
|
||||||
|
|
||||||
[[release-0.25.3]]
|
[[release-0.25.3]]
|
||||||
== 0.25.3 (2024-03-26)
|
== 0.25.3 (2024-03-26)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
= Release Notes
|
= Release Notes
|
||||||
|
|
||||||
The Pkl team aims to release a new version of Pkl in February, June, and October of each year.
|
|
||||||
|
|
||||||
* xref:0.27.adoc[0.27 Release Notes]
|
|
||||||
* xref:0.26.adoc[0.26 Release Notes]
|
|
||||||
* xref:0.25.adoc[0.25 Release Notes]
|
* xref:0.25.adoc[0.25 Release Notes]
|
||||||
* xref:changelog.adoc[Changelog]
|
* xref:changelog.adoc[Changelog]
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ myFoo1: Foo = new Foo { foo = "bar" } // <1>
|
|||||||
myFoo2 = new Foo { foo = "bar" } // <2>
|
myFoo2 = new Foo { foo = "bar" } // <2>
|
||||||
----
|
----
|
||||||
<1> Unnecessary `new Foo { ... }`
|
<1> Unnecessary `new Foo { ... }`
|
||||||
<2> Unless amending/extending a module where `myFoo2` is already defined, `myFoo2` is effectively the `unknown` type, i.e. `myFoo2: unknown`.
|
<2> Unless amending/extendinge a module where `myFoo2` is already defined, `myFoo2` is effectively the `unknown` type, i.e. `myFoo2: unknown`.
|
||||||
|
|
||||||
== Comments
|
== Comments
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ Add a single space after `///`.
|
|||||||
|
|
||||||
[source%parsed,{pkl}]
|
[source%parsed,{pkl}]
|
||||||
----
|
----
|
||||||
/// The time allotted for eating lunch.
|
/// The time alotted for eating lunch.
|
||||||
///
|
///
|
||||||
/// Note:
|
/// Note:
|
||||||
/// * Hamburgers typically take longer to eat than salad.
|
/// * Hamburgers typically take longer to eat than salad.
|
||||||
@@ -300,7 +300,7 @@ A line comment may also be placed at the end of a line, as long as the line does
|
|||||||
[source%tested,{pkl}]
|
[source%tested,{pkl}]
|
||||||
----
|
----
|
||||||
/// Designates whether it is zebra party time.
|
/// Designates whether it is zebra party time.
|
||||||
partyTime: Boolean // TODO: Add constraints here?
|
partyTime: Booleean // TODO: Add constraints here?
|
||||||
----
|
----
|
||||||
|
|
||||||
=== Block comments
|
=== Block comments
|
||||||
|
|||||||
@@ -38,11 +38,7 @@
|
|||||||
|
|
||||||
* xref:ROOT:examples.adoc[Examples]
|
* xref:ROOT:examples.adoc[Examples]
|
||||||
|
|
||||||
* xref:ROOT:evolution-and-roadmap.adoc[Evolution and Roadmap]
|
|
||||||
|
|
||||||
* xref:release-notes:index.adoc[Release Notes]
|
* xref:release-notes:index.adoc[Release Notes]
|
||||||
** xref:release-notes:0.27.adoc[0.27 Release Notes]
|
|
||||||
** xref:release-notes:0.26.adoc[0.26 Release Notes]
|
|
||||||
** xref:release-notes:0.25.adoc[0.25 Release Notes]
|
** xref:release-notes:0.25.adoc[0.25 Release Notes]
|
||||||
** xref:release-notes:changelog.adoc[Changelog]
|
** xref:release-notes:changelog.adoc[Changelog]
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ import org.pkl.core.parser.antlr.PklParser
|
|||||||
import org.pkl.core.repl.ReplRequest
|
import org.pkl.core.repl.ReplRequest
|
||||||
import org.pkl.core.repl.ReplResponse
|
import org.pkl.core.repl.ReplResponse
|
||||||
import org.pkl.core.repl.ReplServer
|
import org.pkl.core.repl.ReplServer
|
||||||
|
import org.pkl.core.resource.ResourceReaders
|
||||||
import org.pkl.core.util.IoUtils
|
import org.pkl.core.util.IoUtils
|
||||||
import org.antlr.v4.runtime.ParserRuleContext
|
import org.antlr.v4.runtime.ParserRuleContext
|
||||||
import org.pkl.core.http.HttpClient
|
|
||||||
import org.pkl.core.resource.ResourceReaders
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import kotlin.io.path.isDirectory
|
import kotlin.io.path.isDirectory
|
||||||
import kotlin.io.path.isRegularFile
|
import kotlin.io.path.isRegularFile
|
||||||
@@ -41,7 +40,7 @@ class DocSnippetTestsEngine : HierarchicalTestEngine<DocSnippetTestsEngine.Execu
|
|||||||
companion object {
|
companion object {
|
||||||
val headingRegex = Regex("""(?u)^\s*(=++)\s*(.+)""")
|
val headingRegex = Regex("""(?u)^\s*(=++)\s*(.+)""")
|
||||||
val collapsibleBlockRegex = Regex("""(?u)^\s*\[%collapsible""")
|
val collapsibleBlockRegex = Regex("""(?u)^\s*\[%collapsible""")
|
||||||
val codeBlockRegex = Regex("""(?u)^\s*\[source(?:%(tested|parsed)(%error)?)?(?:,\{?([a-zA-Z-_]+)}?)?""")
|
val codeBlockRegex = Regex("""(?u)^\s*\[source(?:%(tested|parsed)(%error)?)?(?:,(?:\{)?([a-zA-Z-_]+)}?)?""")
|
||||||
val codeBlockNameRegex = Regex("""(?u)^\s*\.(.+)""")
|
val codeBlockNameRegex = Regex("""(?u)^\s*\.(.+)""")
|
||||||
val codeBlockDelimiterRegex = Regex("""(?u)^\s*----""")
|
val codeBlockDelimiterRegex = Regex("""(?u)^\s*----""")
|
||||||
val graphicsRegex = Regex("\\[small]#.+#")
|
val graphicsRegex = Regex("\\[small]#.+#")
|
||||||
@@ -79,7 +78,6 @@ class DocSnippetTestsEngine : HierarchicalTestEngine<DocSnippetTestsEngine.Execu
|
|||||||
override fun createExecutionContext(request: ExecutionRequest): ExecutionContext {
|
override fun createExecutionContext(request: ExecutionRequest): ExecutionContext {
|
||||||
val replServer = ReplServer(
|
val replServer = ReplServer(
|
||||||
SecurityManagers.defaultManager,
|
SecurityManagers.defaultManager,
|
||||||
HttpClient.dummyClient(),
|
|
||||||
Loggers.stdErr(),
|
Loggers.stdErr(),
|
||||||
listOf(
|
listOf(
|
||||||
ModuleKeyFactories.standardLibrary,
|
ModuleKeyFactories.standardLibrary,
|
||||||
@@ -96,8 +94,7 @@ class DocSnippetTestsEngine : HierarchicalTestEngine<DocSnippetTestsEngine.Execu
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
IoUtils.getCurrentWorkingDir(),
|
IoUtils.getCurrentWorkingDir(),
|
||||||
StackFrameTransformers.defaultTransformer,
|
StackFrameTransformers.defaultTransformer
|
||||||
false,
|
|
||||||
)
|
)
|
||||||
return ExecutionContext(replServer)
|
return ExecutionContext(replServer)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,7 @@
|
|||||||
# suppress inspection "UnusedProperty" for whole file
|
# suppress inspection "UnusedProperty" for whole file
|
||||||
|
|
||||||
group=org.pkl-lang
|
group=org.pkl-lang
|
||||||
version=0.27.2
|
version=0.25.3
|
||||||
|
|
||||||
# google-java-format requires jdk.compiler exports
|
# google-java-format requires jdk.compiler exports
|
||||||
org.gradle.jvmargs= \
|
org.gradle.jvmargs= \
|
||||||
@@ -13,6 +13,5 @@ org.gradle.jvmargs= \
|
|||||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
|
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
|
||||||
|
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.caching=true
|
|
||||||
kotlin.stdlib.default.dependency=false
|
kotlin.stdlib.default.dependency=false
|
||||||
#org.gradle.workers.max=1
|
#org.gradle.workers.max=1
|
||||||
|
|||||||
+27
-38
@@ -1,56 +1,47 @@
|
|||||||
|
# NOTE: keep in sync with buildSrc/src/main/kotlin/Versions.kt until the latter can be removed
|
||||||
[versions] # ordered alphabetically
|
[versions] # ordered alphabetically
|
||||||
antlr = "4.+"
|
antlr = "4.+"
|
||||||
assertj = "3.+"
|
assertj = "3.+"
|
||||||
checksumPlugin = "1.4.0"
|
checksumPlugin = "1.2.0"
|
||||||
clikt = "3.+"
|
clikt = "3.5.1"
|
||||||
commonMark = "0.+"
|
commonMark = "0.+"
|
||||||
downloadTaskPlugin = "5.6.0"
|
downloadTaskPlugin = "4.1.2"
|
||||||
geantyref = "1.+"
|
geantyref = "1.+"
|
||||||
googleJavaFormat = "1.21.0"
|
|
||||||
# must not use `+` because used in download URL
|
# must not use `+` because used in download URL
|
||||||
# 23.1.x requires JDK 20+
|
graalVm = "22.3.1"
|
||||||
graalVm = "23.0.6"
|
# intentionally empty; replaced by patch file when building pkl-cli macos/aarch64
|
||||||
graalVmJdkVersion = "17.0.12"
|
graalVM23JdkVersion = "replace-me"
|
||||||
# slightly hacky but convenient place so we remember to update the checksum
|
# slightly hacky but convenient place so we remember to update the checksum
|
||||||
graalVmSha256-macos-x64 = "3ecac1471f3fa95a56c5b75c65db9e60ac4551f56eda09eb9da95e6049ea77d7"
|
graalVmSha256-darwin-amd64 = "325afad5f1c4a07a458c95e7c444cff63514a6afa6f2655c12b4f494dccf2228"
|
||||||
graalVmSha256-macos-aarch64 = "4cdfdc6c9395f6773efcd191b6605f1b7c8e1b78ab900ab5cff34720a3feffc5"
|
graalVmSha256-linux-amd64 = "55547725a8be3ceb0a1da29a84cd3e958ba398ce4470ac89a8ba1bdb6d9bddb8"
|
||||||
graalVmSha256-linux-x64 = "b6f3dace24cf1960ec790216f4c86f00d4f43df64e4e8b548f6382f04894713f"
|
graalVmSha256-linux-aarch64 = "b46a3f9c82ac70990a62282b1fbe4474e784d9ba453839a428f88e94d21f8abc"
|
||||||
graalVmSha256-linux-aarch64 = "bd991d486b92deb74337b881e0f13a764c9c1e90fc358819080f7321fa5175e8"
|
ideaExtPlugin = "1.1"
|
||||||
graalVmSha256-windows-x64 = "8b978e56dddc0edc60db99794b56975740d9c52293b31549cfc3f7516fc18b43"
|
|
||||||
ideaExtPlugin = "1.1.9"
|
|
||||||
javaPoet = "1.+"
|
javaPoet = "1.+"
|
||||||
javaxInject = "1"
|
javaxInject = "1"
|
||||||
jansi = "2.+"
|
|
||||||
jimfs = "1.+"
|
jimfs = "1.+"
|
||||||
# later versions don't work with native image
|
jansi = "2.+"
|
||||||
# (at least not without additional configuration; tested with 3.25.1 and 3.27.1)
|
jline = "3.+"
|
||||||
jline = "3.23.0"
|
|
||||||
jmh = "1.+"
|
jmh = "1.+"
|
||||||
jmhPlugin = "0.7.2"
|
jmhPlugin = "0.6.6"
|
||||||
jsr305 = "3.+"
|
jsr305 = "3.+"
|
||||||
junit = "5.+"
|
junit = "5.+"
|
||||||
kotlin = "1.7.10"
|
kotlin = "1.7.10"
|
||||||
# 1.7+ generates much more verbose code
|
# 1.7+ generates much more verbose code
|
||||||
kotlinPoet = "1.6.+"
|
kotlinPoet = "1.6.+"
|
||||||
# freeze until updating Kotlin version
|
kotlinxHtml = "0.+"
|
||||||
kotlinxHtml = "0.8.1"
|
kotlinxSerialization = "1.+"
|
||||||
# freeze until updating Kotlin version
|
|
||||||
kotlinxSerialization = "1.5.1"
|
|
||||||
ktfmt = "0.44"
|
|
||||||
# replaces nuValidator's log4j dependency
|
# replaces nuValidator's log4j dependency
|
||||||
# something related to log4j-1.2-api is apparently broken in 2.17.2
|
# something related to log4j-1.2-api is apparently broken in 2.17.2
|
||||||
log4j = "2.17.1"
|
log4j = "2.17.1"
|
||||||
msgpack = "0.9.8"
|
|
||||||
nexusPublishPlugin = "2.0.0"
|
|
||||||
nuValidator = "20.+"
|
nuValidator = "20.+"
|
||||||
paguro = "3.+"
|
paguro = "3.+"
|
||||||
shadowPlugin = "8.1.1"
|
shadowPlugin = "7.1.0"
|
||||||
slf4j = "1.+"
|
slf4j = "1.+"
|
||||||
# snakeYaml 2.6 removed DumpSettingsBuilder::setScalarResolver,
|
# Breaking change in snakeYaml 2.6 (removing DumpSettingsBuilder::setScalarResolver), so pin to 2.5
|
||||||
# which is used by the external YAML renderer (org.pkl.core.YamlRenderer)
|
|
||||||
snakeYaml = "2.5"
|
snakeYaml = "2.5"
|
||||||
spotlessPlugin = "6.25.0"
|
spotlessPlugin = "6.11.0"
|
||||||
wiremock = "3.+"
|
msgpack = "0.9.0"
|
||||||
|
nexusPublishPlugin = "1.3.0"
|
||||||
|
|
||||||
[libraries] # ordered alphabetically
|
[libraries] # ordered alphabetically
|
||||||
antlr = { group = "com.tunnelvisionlabs", name = "antlr4", version.ref = "antlr" }
|
antlr = { group = "com.tunnelvisionlabs", name = "antlr4", version.ref = "antlr" }
|
||||||
@@ -66,8 +57,8 @@ graalSdk = { group = "org.graalvm.sdk", name = "graal-sdk", version.ref = "graal
|
|||||||
graalJs = { group = "org.graalvm.js", name = "js", version.ref = "graalVm" }
|
graalJs = { group = "org.graalvm.js", name = "js", version.ref = "graalVm" }
|
||||||
javaPoet = { group = "com.squareup", name = "javapoet", version.ref = "javaPoet" }
|
javaPoet = { group = "com.squareup", name = "javapoet", version.ref = "javaPoet" }
|
||||||
javaxInject = { group = "javax.inject", name = "javax.inject", version.ref = "javaxInject" }
|
javaxInject = { group = "javax.inject", name = "javax.inject", version.ref = "javaxInject" }
|
||||||
jansi = { group = "org.fusesource.jansi", name = "jansi", version.ref = "jansi" }
|
|
||||||
jimfs = { group = "com.google.jimfs", name = "jimfs", version.ref = "jimfs" }
|
jimfs = { group = "com.google.jimfs", name = "jimfs", version.ref = "jimfs" }
|
||||||
|
jansi = { group = "org.fusesource.jansi", name = "jansi", version.ref = "jansi" }
|
||||||
jlineReader = { group = "org.jline", name = "jline-reader", version.ref = "jline" }
|
jlineReader = { group = "org.jline", name = "jline-reader", version.ref = "jline" }
|
||||||
jlineTerminal = { group = "org.jline", name = "jline-terminal", version.ref = "jline" }
|
jlineTerminal = { group = "org.jline", name = "jline-terminal", version.ref = "jline" }
|
||||||
jlineTerminalJansi = { group = "org.jline", name = "jline-terminal-jansi", version.ref = "jline" }
|
jlineTerminalJansi = { group = "org.jline", name = "jline-terminal-jansi", version.ref = "jline" }
|
||||||
@@ -76,21 +67,19 @@ junitApi = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.re
|
|||||||
junitEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" }
|
junitEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" }
|
||||||
junitParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" }
|
junitParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" }
|
||||||
kotlinCompilerEmbeddable = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" }
|
kotlinCompilerEmbeddable = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" }
|
||||||
|
kotlinScriptingCompilerEmbeddable = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-compiler-embeddable", version.ref = "kotlin" }
|
||||||
|
kotlinScriptUtil = { group = "org.jetbrains.kotlin", name = "kotlin-script-util", version.ref = "kotlin" }
|
||||||
kotlinPlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
|
kotlinPlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||||
kotlinPoet = { group = "com.squareup", name = "kotlinpoet", version.ref = "kotlinPoet" }
|
kotlinPoet = { group = "com.squareup", name = "kotlinpoet", version.ref = "kotlinPoet" }
|
||||||
kotlinReflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
|
kotlinReflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
|
||||||
kotlinScriptingCompilerEmbeddable = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-compiler-embeddable", version.ref = "kotlin" }
|
|
||||||
kotlinScriptUtil = { group = "org.jetbrains.kotlin", name = "kotlin-script-util", version.ref = "kotlin" }
|
|
||||||
kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }
|
kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }
|
||||||
kotlinxHtml = { group = "org.jetbrains.kotlinx", name = "kotlinx-html-jvm", version.ref = "kotlinxHtml" }
|
kotlinxHtml = { group = "org.jetbrains.kotlinx", name = "kotlinx-html-jvm", version.ref = "kotlinxHtml" }
|
||||||
kotlinxSerializationJson = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
|
kotlinxSerializationJson = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
|
||||||
log4j12Api = { group = "org.apache.logging.log4j", name = "log4j-1.2-api", version.ref = "log4j" }
|
log4j12Api = { group = "org.apache.logging.log4j", name = "log4j-1.2-api", version.ref = "log4j" }
|
||||||
msgpack = { group = "org.msgpack", name = "msgpack-core", version.ref = "msgpack" }
|
|
||||||
nuValidator = { group = "nu.validator", name = "validator", version.ref = "nuValidator" }
|
nuValidator = { group = "nu.validator", name = "validator", version.ref = "nuValidator" }
|
||||||
# to be replaced with https://github.com/usethesource/capsule or https://github.com/lacuna/bifurcan
|
# to be replaced with https://github.com/usethesource/capsule or https://github.com/lacuna/bifurcan
|
||||||
paguro = { group = "org.organicdesign", name = "Paguro", version.ref = "paguro" }
|
paguro = { group = "org.organicdesign", name = "Paguro", version.ref = "paguro" }
|
||||||
pklConfigJavaAll025 = { group = "org.pkl-lang", name = "pkl-config-java-all", version = "0.25.0" }
|
shadowPlugin = { group = "gradle.plugin.com.github.johnrengelman", name = "shadow", version.ref = "shadowPlugin" }
|
||||||
shadowPlugin = { group = "com.github.johnrengelman", name = "shadow", version.ref = "shadowPlugin" }
|
|
||||||
slf4jApi = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
|
slf4jApi = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
|
||||||
slf4jSimple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
|
slf4jSimple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
|
||||||
snakeYaml = { group = "org.snakeyaml", name = "snakeyaml-engine", version.ref = "snakeYaml" }
|
snakeYaml = { group = "org.snakeyaml", name = "snakeyaml-engine", version.ref = "snakeYaml" }
|
||||||
@@ -98,12 +87,12 @@ spotlessPlugin = { group = "com.diffplug.spotless", name = "spotless-plugin-grad
|
|||||||
svm = { group = "org.graalvm.nativeimage", name = "svm", version.ref = "graalVm" }
|
svm = { group = "org.graalvm.nativeimage", name = "svm", version.ref = "graalVm" }
|
||||||
truffleApi = { group = "org.graalvm.truffle", name = "truffle-api", version.ref = "graalVm" }
|
truffleApi = { group = "org.graalvm.truffle", name = "truffle-api", version.ref = "graalVm" }
|
||||||
truffleDslProcessor = { group = "org.graalvm.truffle", name = "truffle-dsl-processor", version.ref = "graalVm" }
|
truffleDslProcessor = { group = "org.graalvm.truffle", name = "truffle-dsl-processor", version.ref = "graalVm" }
|
||||||
wiremock = { group = "org.wiremock", name = "wiremock", version.ref = "wiremock" }
|
msgpack = { group = "org.msgpack", name = "msgpack-core", version.ref = "msgpack" }
|
||||||
|
|
||||||
[plugins] # ordered alphabetically
|
[plugins] # ordered alphabetically
|
||||||
checksum = { id = "org.gradle.crypto.checksum", version.ref = "checksumPlugin" }
|
checksum = { id = "org.gradle.crypto.checksum", version.ref = "checksumPlugin" }
|
||||||
ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "ideaExtPlugin" }
|
ideaExt = { id = "org.jetbrains.gradle.plugin.idea-ext", version.ref = "ideaExtPlugin" }
|
||||||
jmh = { id = "me.champeau.jmh", version.ref = "jmhPlugin" }
|
jmh = { id = "me.champeau.jmh", version.ref = "jmhPlugin" }
|
||||||
kotlinxSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
kotlinxSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||||
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexusPublishPlugin" }
|
|
||||||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadowPlugin" }
|
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadowPlugin" }
|
||||||
|
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexusPublishPlugin" }
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-4
@@ -1,8 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
|
||||||
networkTimeout=10000
|
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@@ -57,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -82,12 +80,13 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# This is normally unused
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
# shellcheck disable=SC2034
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
' "$PWD" ) || exit
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -134,29 +133,22 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
if ! command -v java >/dev/null 2>&1
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
then
|
|
||||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@@ -201,15 +193,11 @@ if "$cygwin" || "$msys" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command;
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
# double quotes to make sure that they get re-expanded; and
|
||||||
# Collect all arguments for the java command:
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
||||||
# and any embedded shellness will be escaped.
|
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
||||||
# treated as '${Hostname}' itself on the command line.
|
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
@@ -217,12 +205,6 @@ set -- \
|
|||||||
org.gradle.wrapper.GradleWrapperMain \
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
|
||||||
if ! command -v xargs >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "xargs is not available"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
# Use "xargs" to parse quoted args.
|
||||||
#
|
#
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
|||||||
Vendored
+16
-21
@@ -13,10 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
@rem SPDX-License-Identifier: Apache-2.0
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -27,8 +25,7 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
@rem This is normally unused
|
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@@ -43,13 +40,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -59,11 +56,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -78,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
set EXIT_CODE=%ERRORLEVEL%
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
exit /b 1
|
||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
|
||||||
exit /b %EXIT_CODE%
|
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"catalogs": {},
|
|
||||||
"aliases": {
|
|
||||||
"pkl": {
|
|
||||||
"script-ref": "org.pkl-lang:pkl-cli-java:0.27.2",
|
|
||||||
"java-agents": []
|
|
||||||
},
|
|
||||||
"pkl-codegen-java": {
|
|
||||||
"script-ref": "org.pkl-lang:pkl-codegen-java:0.27.2",
|
|
||||||
"java-agents": []
|
|
||||||
},
|
|
||||||
"pkl-codegen-kotlin": {
|
|
||||||
"script-ref": "org.pkl-lang:pkl-codegen-kotlin:0.27.2",
|
|
||||||
"java-agents": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"templates": {}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,529 @@
|
|||||||
|
diff --git a/bench/gradle.lockfile b/bench/gradle.lockfile
|
||||||
|
index 0673df5..3a9d913 100644
|
||||||
|
--- a/bench/gradle.lockfile
|
||||||
|
+++ b/bench/gradle.lockfile
|
||||||
|
@@ -8,9 +8,9 @@ net.sf.jopt-simple:jopt-simple:5.0.4=jmh,jmhCompileClasspath,jmhImplementationDe
|
||||||
|
org.apache.commons:commons-math3:3.2=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.compiler:compiler:22.3.1=graal
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=graal,jmh,jmhRuntimeClasspath,truffle
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=graal,jmh,jmhRuntimeClasspath,truffle
|
||||||
|
+org.graalvm.compiler:compiler:23.0.2=graal
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=graal,jmh,jmhRuntimeClasspath,truffle
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=graal,jmh,jmhRuntimeClasspath,truffle
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
|
||||||
|
index 73eb367..6e526b6 100644
|
||||||
|
--- a/buildSrc/build.gradle.kts
|
||||||
|
+++ b/buildSrc/build.gradle.kts
|
||||||
|
@@ -12,6 +12,6 @@ dependencies {
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
- sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
- targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
+ sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
+ targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
diff --git a/buildSrc/src/main/kotlin/pklAllProjects.gradle.kts b/buildSrc/src/main/kotlin/pklAllProjects.gradle.kts
|
||||||
|
index 4daf287..6ef0256 100644
|
||||||
|
--- a/buildSrc/src/main/kotlin/pklAllProjects.gradle.kts
|
||||||
|
+++ b/buildSrc/src/main/kotlin/pklAllProjects.gradle.kts
|
||||||
|
@@ -24,13 +24,13 @@ configurations {
|
||||||
|
|
||||||
|
plugins.withType(JavaPlugin::class).configureEach {
|
||||||
|
val java = project.extensions.getByType<JavaPluginExtension>()
|
||||||
|
- java.sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
- java.targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
+ java.sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
+ java.targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
- jvmTarget = "11"
|
||||||
|
+ jvmTarget = "17"
|
||||||
|
freeCompilerArgs = freeCompilerArgs + listOf("-Xjsr305=strict", "-Xjvm-default=all")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/docs/gradle.lockfile b/docs/gradle.lockfile
|
||||||
|
index 196e592..e33eb75 100644
|
||||||
|
--- a/docs/gradle.lockfile
|
||||||
|
+++ b/docs/gradle.lockfile
|
||||||
|
@@ -7,8 +7,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
|
||||||
|
index 5171a9a..6761c58 100644
|
||||||
|
--- a/gradle/libs.versions.toml
|
||||||
|
+++ b/gradle/libs.versions.toml
|
||||||
|
@@ -8,11 +8,11 @@ commonMark = "0.+"
|
||||||
|
downloadTaskPlugin = "4.1.2"
|
||||||
|
geantyref = "1.+"
|
||||||
|
# must not use `+` because used in download URL
|
||||||
|
-graalVm = "22.3.1"
|
||||||
|
-# intentionally empty; replaced by patch file when building pkl-cli macos/aarch64
|
||||||
|
-graalVM23JdkVersion = "replace-me"
|
||||||
|
+graalVm = "23.0.2"
|
||||||
|
+graalVM23JdkVersion = "17.0.9"
|
||||||
|
# slightly hacky but convenient place so we remember to update the checksum
|
||||||
|
graalVmSha256-darwin-amd64 = "325afad5f1c4a07a458c95e7c444cff63514a6afa6f2655c12b4f494dccf2228"
|
||||||
|
+graalVmSha256-macos-aarch64 = "2214b6ecb32faacc84dffcbfae930450abe77c31730c4b6310e22d8f743959a5"
|
||||||
|
graalVmSha256-linux-amd64 = "55547725a8be3ceb0a1da29a84cd3e958ba398ce4470ac89a8ba1bdb6d9bddb8"
|
||||||
|
graalVmSha256-linux-aarch64 = "b46a3f9c82ac70990a62282b1fbe4474e784d9ba453839a428f88e94d21f8abc"
|
||||||
|
ideaExtPlugin = "1.1"
|
||||||
|
diff --git a/pkl-cli/gradle.lockfile b/pkl-cli/gradle.lockfile
|
||||||
|
index 1360caa..0892665 100644
|
||||||
|
--- a/pkl-cli/gradle.lockfile
|
||||||
|
+++ b/pkl-cli/gradle.lockfile
|
||||||
|
@@ -9,13 +9,13 @@ net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.fusesource.jansi:jansi:2.4.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.compiler:compiler:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
-org.graalvm.nativeimage:native-image-base:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
-org.graalvm.nativeimage:objectfile:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
-org.graalvm.nativeimage:pointsto:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
-org.graalvm.nativeimage:svm:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=compileClasspath,compileOnlyDependenciesMetadata,default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=compileClasspath,compileOnlyDependenciesMetadata,default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.compiler:compiler:23.0.2=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
+org.graalvm.nativeimage:native-image-base:23.0.2=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
+org.graalvm.nativeimage:objectfile:23.0.2=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
+org.graalvm.nativeimage:pointsto:23.0.2=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
+org.graalvm.nativeimage:svm:23.0.2=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=compileClasspath,compileOnlyDependenciesMetadata,default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=compileClasspath,compileOnlyDependenciesMetadata,default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -26,10 +26,14 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains:annotations:13.0=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.jline:jline-native:3.23.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.jline:jline-reader:3.23.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
@@ -45,4 +49,4 @@ org.msgpack:msgpack-core:0.9.0=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.organicdesign:Paguro:3.10.3=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,archives,compile,intransitiveDependenciesMetadata,javaExecutable,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,shadow,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,archives,compile,intransitiveDependenciesMetadata,javaExecutable,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,shadow,signatures,sourcesJar,stagedAlpineLinuxAmd64Executable,stagedLinuxAarch64Executable,stagedLinuxAmd64Executable,stagedMacAarch64Executable,stagedMacAmd64Executable,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-codegen-java/gradle.lockfile b/pkl-codegen-java/gradle.lockfile
|
||||||
|
index 9bf6cba..901c8d8 100644
|
||||||
|
--- a/pkl-codegen-java/gradle.lockfile
|
||||||
|
+++ b/pkl-codegen-java/gradle.lockfile
|
||||||
|
@@ -10,8 +10,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -22,10 +22,14 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains:annotations:13.0=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
@@ -36,4 +40,4 @@ org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMet
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.organicdesign:Paguro:3.10.3=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-codegen-kotlin/gradle.lockfile b/pkl-codegen-kotlin/gradle.lockfile
|
||||||
|
index 42331c2..7974715 100644
|
||||||
|
--- a/pkl-codegen-kotlin/gradle.lockfile
|
||||||
|
+++ b/pkl-codegen-kotlin/gradle.lockfile
|
||||||
|
@@ -10,8 +10,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testRuntimeClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-client:1.7.10=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
@@ -24,10 +24,14 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.jetbrains:annotations:13.0=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
@@ -39,4 +43,4 @@ org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMet
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.organicdesign:Paguro:3.10.3=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-commons-cli/gradle.lockfile b/pkl-commons-cli/gradle.lockfile
|
||||||
|
index 6cac9f4..f603276 100644
|
||||||
|
--- a/pkl-commons-cli/gradle.lockfile
|
||||||
|
+++ b/pkl-commons-cli/gradle.lockfile
|
||||||
|
@@ -8,8 +8,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -20,10 +20,14 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains:annotations:13.0=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
@@ -34,4 +38,4 @@ org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMet
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.organicdesign:Paguro:3.10.3=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-commons/gradle.lockfile b/pkl-commons/gradle.lockfile
|
||||||
|
index 4170e1a..0a23c04 100644
|
||||||
|
--- a/pkl-commons/gradle.lockfile
|
||||||
|
+++ b/pkl-commons/gradle.lockfile
|
||||||
|
@@ -27,4 +27,4 @@ org.junit.platform:junit-platform-commons:1.9.3=testCompileClasspath,testImpleme
|
||||||
|
org.junit.platform:junit-platform-engine:1.9.3=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
-empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-config-java/gradle.lockfile b/pkl-config-java/gradle.lockfile
|
||||||
|
index 271ca49..3648401 100644
|
||||||
|
--- a/pkl-config-java/gradle.lockfile
|
||||||
|
+++ b/pkl-config-java/gradle.lockfile
|
||||||
|
@@ -11,8 +11,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=default,pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=default,pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=default,pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=default,pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -23,10 +23,14 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=pklCodegenJava
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=pklCodegenJava
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=pklCodegenJava
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=pklCodegenJava
|
||||||
|
org.jetbrains:annotations:13.0=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenJava,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
@@ -37,4 +41,4 @@ org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMet
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.organicdesign:Paguro:3.10.3=default,pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=default,pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,apiDependenciesMetadata,archives,compile,compileOnly,compileOnlyDependenciesMetadata,fatJar,firstPartySourcesJars,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,pklCoreSourcesJar,runtime,runtimeOnlyDependenciesMetadata,shadow,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,apiDependenciesMetadata,archives,compile,compileOnly,compileOnlyDependenciesMetadata,fatJar,firstPartySourcesJars,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,pklCoreSourcesJar,runtime,runtimeOnlyDependenciesMetadata,shadow,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-config-kotlin/gradle.lockfile b/pkl-config-kotlin/gradle.lockfile
|
||||||
|
index 681ecdb..5c8f48b 100644
|
||||||
|
--- a/pkl-config-kotlin/gradle.lockfile
|
||||||
|
+++ b/pkl-config-kotlin/gradle.lockfile
|
||||||
|
@@ -10,8 +10,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=default,pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=default,pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=default,pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=default,pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -22,10 +22,14 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=pklCodegenKotlin
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=pklCodegenKotlin
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=pklCodegenKotlin
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=pklCodegenKotlin
|
||||||
|
org.jetbrains:annotations:13.0=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
@@ -36,4 +40,4 @@ org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMet
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.organicdesign:Paguro:3.10.3=default,pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=default,pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,pklConfigJavaAll,runtime,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,pklConfigJavaAll,runtime,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-core/gradle.lockfile b/pkl-core/gradle.lockfile
|
||||||
|
index a4ad3ca..cf5be68 100644
|
||||||
|
--- a/pkl-core/gradle.lockfile
|
||||||
|
+++ b/pkl-core/gradle.lockfile
|
||||||
|
@@ -13,9 +13,9 @@ org.antlr:ST4:4.3=antlr
|
||||||
|
org.antlr:antlr-runtime:3.5.2=antlr
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=compileClasspath,default,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=compileClasspath,default,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-dsl-processor:22.3.1=annotationProcessor
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=compileClasspath,default,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=compileClasspath,default,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-dsl-processor:23.0.2=annotationProcessor
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -41,4 +41,4 @@ org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenc
|
||||||
|
org.organicdesign:Paguro:3.10.3=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.slf4j:slf4j-api:1.7.32=compileOnly
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-empty=apiDependenciesMetadata,archives,compile,generatorAnnotationProcessor,generatorApiDependenciesMetadata,generatorCompileOnly,generatorCompileOnlyDependenciesMetadata,generatorIntransitiveDependenciesMetadata,generatorKotlinScriptDef,generatorKotlinScriptDefExtensions,generatorRuntimeOnlyDependenciesMetadata,intransitiveDependenciesMetadata,javaExecutable,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=apiDependenciesMetadata,archives,compile,generatorAnnotationProcessor,generatorApiDependenciesMetadata,generatorCompileOnly,generatorCompileOnlyDependenciesMetadata,generatorIntransitiveDependenciesMetadata,generatorKotlinScriptDef,generatorKotlinScriptDefExtensions,generatorRuntimeOnlyDependenciesMetadata,intransitiveDependenciesMetadata,javaExecutable,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-doc/gradle.lockfile b/pkl-doc/gradle.lockfile
|
||||||
|
index 9a78e5a..629fd77 100644
|
||||||
|
--- a/pkl-doc/gradle.lockfile
|
||||||
|
+++ b/pkl-doc/gradle.lockfile
|
||||||
|
@@ -11,7 +11,7 @@ com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=test
|
||||||
|
com.google.j2objc:j2objc-annotations:1.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.google.jimfs:jimfs:1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.ibm.icu:icu4j:58.2=validator
|
||||||
|
-com.ibm.icu:icu4j:71.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+com.ibm.icu:icu4j:72.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
com.shapesecurity:salvation:2.7.2=validator
|
||||||
|
com.tunnelvisionlabs:antlr4-runtime:4.9.0=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
commons-codec:commons-codec:1.10=validator
|
||||||
|
@@ -38,10 +38,10 @@ org.commonmark:commonmark-ext-gfm-tables:0.21.0=compileClasspath,default,impleme
|
||||||
|
org.commonmark:commonmark:0.21.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.eclipse.jetty:jetty-util-ajax:9.4.18.v20190429=validator
|
||||||
|
org.eclipse.jetty:jetty-util:9.4.18.v20190429=validator
|
||||||
|
-org.graalvm.js:js:22.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.regex:regex:22.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=default,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=default,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.js:js:23.0.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.regex:regex:23.0.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=default,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=default,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -56,10 +56,14 @@ org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerP
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-serialization:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testImplementationDependenciesMetadata
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.8.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-tooling-core:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-util-io:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlinx:kotlinx-html-jvm:0.8.1=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
@@ -78,4 +82,4 @@ org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMet
|
||||||
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.organicdesign:Paguro:3.10.3=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,archives,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions
|
||||||
|
+empty=annotationProcessor,archives,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions
|
||||||
|
diff --git a/pkl-executor/gradle.lockfile b/pkl-executor/gradle.lockfile
|
||||||
|
index c5fa512..0d31a41 100644
|
||||||
|
--- a/pkl-executor/gradle.lockfile
|
||||||
|
+++ b/pkl-executor/gradle.lockfile
|
||||||
|
@@ -6,8 +6,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
@@ -34,4 +34,4 @@ org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
|
||||||
|
org.slf4j:slf4j-api:1.7.36=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.slf4j:slf4j-simple:1.7.36=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.snakeyaml:snakeyaml-engine:2.5=testRuntimeClasspath
|
||||||
|
-empty=annotationProcessor,apiDependenciesMetadata,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,pklDistribution,runtime,runtimeOnlyDependenciesMetadata,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
+empty=annotationProcessor,apiDependenciesMetadata,archives,compile,compileOnly,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,pklDistribution,runtime,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
|
diff --git a/pkl-gradle/gradle.lockfile b/pkl-gradle/gradle.lockfile
|
||||||
|
index 4db8f8d..d8eaca1 100644
|
||||||
|
--- a/pkl-gradle/gradle.lockfile
|
||||||
|
+++ b/pkl-gradle/gradle.lockfile
|
||||||
|
@@ -17,10 +17,14 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=compileClasspath,compileOnlyDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=compileClasspath,compileOnlyDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=compileOnlyDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=compileClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=compileOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=compileClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=compileOnlyDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=compileClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.10=compileOnlyDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=compileClasspath
|
||||||
|
org.jetbrains:annotations:13.0=compileClasspath,compileOnlyDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
|
diff --git a/pkl-server/gradle.lockfile b/pkl-server/gradle.lockfile
|
||||||
|
index 22b6965..813fd46 100644
|
||||||
|
--- a/pkl-server/gradle.lockfile
|
||||||
|
+++ b/pkl-server/gradle.lockfile
|
||||||
|
@@ -6,8 +6,8 @@ net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependen
|
||||||
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
|
diff --git a/pkl-tools/gradle.lockfile b/pkl-tools/gradle.lockfile
|
||||||
|
index a04dc3b..c1a960c 100644
|
||||||
|
--- a/pkl-tools/gradle.lockfile
|
||||||
|
+++ b/pkl-tools/gradle.lockfile
|
||||||
|
@@ -10,13 +10,15 @@ io.leangen.geantyref:geantyref:1.3.14=default,runtimeClasspath,testRuntimeClassp
|
||||||
|
org.commonmark:commonmark-ext-gfm-tables:0.21.0=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.commonmark:commonmark:0.21.0=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.fusesource.jansi:jansi:2.4.0=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlin:kotlin-reflect:1.7.10=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21=compileClasspath,testCompileClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.7.21=compileClasspath,testCompileClasspath
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.8.21=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-html-jvm:0.8.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.5.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.5.1=default,runtimeClasspath,testRuntimeClasspath
|
||||||
|
diff --git a/stdlib/gradle.lockfile b/stdlib/gradle.lockfile
|
||||||
|
index 00a8691..7e06c36 100644
|
||||||
|
--- a/stdlib/gradle.lockfile
|
||||||
|
+++ b/stdlib/gradle.lockfile
|
||||||
|
@@ -6,12 +6,12 @@ com.github.ajalt.clikt:clikt:3.5.1=pkldoc
|
||||||
|
com.tunnelvisionlabs:antlr4-runtime:4.9.0=pkldoc
|
||||||
|
org.commonmark:commonmark-ext-gfm-tables:0.21.0=pkldoc
|
||||||
|
org.commonmark:commonmark:0.21.0=pkldoc
|
||||||
|
-org.graalvm.sdk:graal-sdk:22.3.1=pkldoc
|
||||||
|
-org.graalvm.truffle:truffle-api:22.3.1=pkldoc
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=pkldoc
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=pkldoc
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=pkldoc
|
||||||
|
-org.jetbrains.kotlin:kotlin-stdlib:1.7.10=pkldoc
|
||||||
|
+org.graalvm.sdk:graal-sdk:23.0.2=pkldoc
|
||||||
|
+org.graalvm.truffle:truffle-api:23.0.2=pkldoc
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21=pkldoc
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21=pkldoc
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21=pkldoc
|
||||||
|
+org.jetbrains.kotlin:kotlin-stdlib:1.8.21=pkldoc
|
||||||
|
org.jetbrains.kotlinx:kotlinx-html-jvm:0.8.1=pkldoc
|
||||||
|
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.5.1=pkldoc
|
||||||
|
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.5.1=pkldoc
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
net.bytebuddy:byte-buddy:1.14.16=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.assertj:assertj-core:3.26.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.7.10=kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-script-runtime:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains:annotations:13.0=kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.junit.jupiter:junit-jupiter-api:5.10.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.10.2=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.junit.jupiter:junit-jupiter-params:5.10.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.junit.platform:junit-platform-commons:1.10.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.junit.platform:junit-platform-engine:1.10.2=testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.junit:junit-bom:5.10.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
|
||||||
empty=annotationProcessor,apiDependenciesMetadata,compileClasspath,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtimeClasspath,runtimeOnlyDependenciesMetadata,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions
|
|
||||||
+33
-87
@@ -1,69 +1,21 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
# This is a Gradle generated file for dependency locking.
|
||||||
# Manual edits can break the build and are not advised.
|
# Manual edits can break the build and are not advised.
|
||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
com.ethlo.time:itu:1.10.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.github.ajalt.clikt:clikt-jvm:3.5.1=compileClasspath,default,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.fasterxml.jackson.core:jackson-annotations:2.17.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.github.ajalt.clikt:clikt:3.5.1=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.fasterxml.jackson.core:jackson-core:2.17.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
com.tunnelvisionlabs:antlr4-runtime:4.9.0=default,runtimeClasspath,testRuntimeClasspath
|
||||||
com.fasterxml.jackson.core:jackson-databind:2.17.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.12.21=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.fasterxml.jackson:jackson-bom:2.17.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.github.ajalt.clikt:clikt-jvm:3.5.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
|
||||||
com.github.ajalt.clikt:clikt:3.5.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.github.jknack:handlebars-helpers:4.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.github.jknack:handlebars:4.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.google.errorprone:error_prone_annotations:2.28.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.google.guava:failureaccess:1.0.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.google.guava:guava:33.3.1-jre=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.google.j2objc:j2objc-annotations:3.0.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.jayway.jsonpath:json-path:2.9.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.networknt:json-schema-validator:1.5.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
com.tunnelvisionlabs:antlr4-runtime:4.9.0=runtimeClasspath,testRuntimeClasspath
|
|
||||||
commons-fileupload:commons-fileupload:1.5=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
commons-io:commons-io:2.11.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
net.bytebuddy:byte-buddy:1.14.18=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
net.java.dev.jna:jna:5.6.0=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
net.javacrumbs.json-unit:json-unit-core:2.40.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
net.minidev:accessors-smart:2.5.1=testRuntimeClasspath
|
|
||||||
net.minidev:json-smart:2.5.1=testRuntimeClasspath
|
|
||||||
net.sf.jopt-simple:jopt-simple:5.0.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.apache.httpcomponents.client5:httpclient5:5.3.1=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.apache.httpcomponents.core5:httpcore5-h2:5.2.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.apache.httpcomponents.core5:httpcore5:5.2.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeOnlyDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.26.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.24.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.checkerframework:checker-qual:3.43.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.fusesource.jansi:jansi:2.4.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.eclipse.jetty.http2:http2-common:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.compiler:compiler:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
org.eclipse.jetty.http2:http2-hpack:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.nativeimage:native-image-base:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
org.eclipse.jetty.http2:http2-server:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.nativeimage:objectfile:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:5.0.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.nativeimage:pointsto:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
org.eclipse.jetty:jetty-alpn-client:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.nativeimage:svm:22.3.1=compileClasspath,compileOnlyDependenciesMetadata
|
||||||
org.eclipse.jetty:jetty-alpn-java-client:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:22.3.1=compileClasspath,compileOnlyDependenciesMetadata,default,runtimeClasspath,testRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-alpn-java-server:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.truffle:truffle-api:22.3.1=compileClasspath,compileOnlyDependenciesMetadata,default,runtimeClasspath,testRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-alpn-server:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-bom:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-client:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-http:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-io:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-proxy:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-security:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-server:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-servlet:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-servlets:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-util:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-webapp:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.eclipse.jetty:jetty-xml:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.fusesource.jansi:jansi:2.4.1=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.graalvm.compiler:compiler:23.0.6=compileClasspath,compileOnlyDependenciesMetadata
|
|
||||||
org.graalvm.nativeimage:native-image-base:23.0.6=compileClasspath,compileOnlyDependenciesMetadata
|
|
||||||
org.graalvm.nativeimage:objectfile:23.0.6=compileClasspath,compileOnlyDependenciesMetadata
|
|
||||||
org.graalvm.nativeimage:pointsto:23.0.6=compileClasspath,compileOnlyDependenciesMetadata
|
|
||||||
org.graalvm.nativeimage:svm:23.0.6=compileClasspath,compileOnlyDependenciesMetadata
|
|
||||||
org.graalvm.sdk:graal-sdk:23.0.6=compileClasspath,compileOnlyDependenciesMetadata,runtimeClasspath,testRuntimeClasspath
|
|
||||||
org.graalvm.truffle:truffle-api:23.0.6=compileClasspath,compileOnlyDependenciesMetadata,runtimeClasspath,testRuntimeClasspath
|
|
||||||
org.hamcrest:hamcrest-core:2.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.hamcrest:hamcrest:2.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10=kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
@@ -74,29 +26,23 @@ org.jetbrains.kotlin:kotlin-scripting-common:1.7.10=kotlinCompilerPluginClasspat
|
|||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:1.7.10=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains:annotations:13.0=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=apiDependenciesMetadata,compileClasspath,default,implementationDependenciesMetadata,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jline:jline-native:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jline:jline-native:3.23.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jline:jline-reader:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jline:jline-reader:3.23.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jline:jline-terminal-jansi:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jline:jline-terminal-jansi:3.23.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jline:jline-terminal:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jline:jline-terminal:3.23.0=compileClasspath,default,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-api:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.jupiter:junit-jupiter-engine:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.jupiter:junit-jupiter-params:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-commons:1.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit.platform:junit-platform-engine:1.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit.platform:junit-platform-engine:1.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.junit:junit-bom:5.11.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.junit:junit-bom:5.9.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.0=default,runtimeClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath,testRuntimeOnlyDependenciesMetadata
|
||||||
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=default,runtimeClasspath,testRuntimeClasspath
|
||||||
org.slf4j:slf4j-api:2.0.13=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.snakeyaml:snakeyaml-engine:2.5=default,runtimeClasspath,testRuntimeClasspath
|
||||||
org.snakeyaml:snakeyaml-engine:2.5=runtimeClasspath,testRuntimeClasspath
|
empty=annotationProcessor,archives,compile,intransitiveDependenciesMetadata,javaExecutable,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,shadow,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
||||||
org.wiremock:wiremock:3.9.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.xmlunit:xmlunit-core:2.10.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.xmlunit:xmlunit-legacy:2.10.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.xmlunit:xmlunit-placeholders:2.10.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.yaml:snakeyaml:2.2=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
empty=annotationProcessor,archives,compile,intransitiveDependenciesMetadata,javaExecutable,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDef,kotlinScriptDefExtensions,runtime,runtimeOnlyDependenciesMetadata,shadow,signatures,sourcesJar,stagedAlpineLinuxAmd64Executable,stagedLinuxAarch64Executable,stagedLinuxAmd64Executable,stagedMacAarch64Executable,stagedMacAmd64Executable,stagedWindowsAmd64Executable,testAnnotationProcessor,testApiDependenciesMetadata,testCompile,testCompileOnly,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDef,testKotlinScriptDefExtensions,testRuntime
|
|
||||||
|
|||||||
+172
-255
@@ -1,18 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
plugins {
|
plugins {
|
||||||
pklAllProjects
|
pklAllProjects
|
||||||
pklKotlinLibrary
|
pklKotlinLibrary
|
||||||
@@ -22,9 +7,11 @@ plugins {
|
|||||||
|
|
||||||
// already on build script class path (see buildSrc/build.gradle.kts),
|
// already on build script class path (see buildSrc/build.gradle.kts),
|
||||||
// hence must only specify plugin ID here
|
// hence must only specify plugin ID here
|
||||||
@Suppress("DSL_SCOPE_VIOLATION") id(libs.plugins.shadow.get().pluginId)
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
|
id(libs.plugins.shadow.get().pluginId)
|
||||||
|
|
||||||
@Suppress("DSL_SCOPE_VIOLATION") alias(libs.plugins.checksum)
|
@Suppress("DSL_SCOPE_VIOLATION")
|
||||||
|
alias(libs.plugins.checksum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// make Java executable available to other subprojects
|
// make Java executable available to other subprojects
|
||||||
@@ -46,49 +33,48 @@ val stagedMacAarch64Executable: Configuration by configurations.creating
|
|||||||
val stagedLinuxAmd64Executable: Configuration by configurations.creating
|
val stagedLinuxAmd64Executable: Configuration by configurations.creating
|
||||||
val stagedLinuxAarch64Executable: Configuration by configurations.creating
|
val stagedLinuxAarch64Executable: Configuration by configurations.creating
|
||||||
val stagedAlpineLinuxAmd64Executable: Configuration by configurations.creating
|
val stagedAlpineLinuxAmd64Executable: Configuration by configurations.creating
|
||||||
val stagedWindowsAmd64Executable: Configuration by configurations.creating
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(libs.svm)
|
compileOnly(libs.svm)
|
||||||
|
|
||||||
// CliEvaluator exposes PClass
|
// CliEvaluator exposes PClass
|
||||||
api(projects.pklCore)
|
api(project(":pkl-core"))
|
||||||
// CliEvaluatorOptions exposes CliBaseOptions
|
// CliEvaluatorOptions exposes CliBaseOptions
|
||||||
api(projects.pklCommonsCli)
|
api(project(":pkl-commons-cli"))
|
||||||
|
|
||||||
implementation(projects.pklCommons)
|
implementation(project(":pkl-commons"))
|
||||||
implementation(libs.jansi)
|
implementation(libs.jansi)
|
||||||
implementation(libs.jlineReader)
|
implementation(libs.jlineReader)
|
||||||
implementation(libs.jlineTerminal)
|
implementation(libs.jlineTerminal)
|
||||||
implementation(libs.jlineTerminalJansi)
|
implementation(libs.jlineTerminalJansi)
|
||||||
implementation(projects.pklServer)
|
implementation(project(":pkl-server"))
|
||||||
implementation(libs.clikt) {
|
implementation(libs.clikt) {
|
||||||
// force clikt to use our version of the kotlin stdlib
|
// force clikt to use our version of the kotlin stdlib
|
||||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
|
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
|
||||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common")
|
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common")
|
||||||
}
|
}
|
||||||
|
|
||||||
testImplementation(projects.pklCommonsTest)
|
testImplementation(project(":pkl-commons-test"))
|
||||||
testImplementation(libs.wiremock)
|
|
||||||
|
|
||||||
fun executableDir(name: String) = files(layout.buildDirectory.dir("executable/$name"))
|
stagedMacAmd64Executable(files("$buildDir/executable/pkl-macos-amd64"))
|
||||||
stagedMacAmd64Executable(executableDir("pkl-macos-amd64"))
|
stagedMacAarch64Executable(files("$buildDir/executable/pkl-macos-aarch64"))
|
||||||
stagedMacAmd64Executable(executableDir("pkl-macos-amd64"))
|
stagedLinuxAmd64Executable(files("$buildDir/executable/pkl-linux-amd64"))
|
||||||
stagedMacAarch64Executable(executableDir("pkl-macos-aarch64"))
|
stagedLinuxAarch64Executable(files("$buildDir/executable/pkl-linux-aarch64"))
|
||||||
stagedLinuxAmd64Executable(executableDir("pkl-linux-amd64"))
|
stagedAlpineLinuxAmd64Executable(files("$buildDir/executable/pkl-alpine-linux-amd64"))
|
||||||
stagedLinuxAarch64Executable(executableDir("pkl-linux-aarch64"))
|
|
||||||
stagedAlpineLinuxAmd64Executable(executableDir("pkl-alpine-linux-amd64"))
|
|
||||||
stagedWindowsAmd64Executable(executableDir("pkl-windows-amd64.exe"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
manifest { attributes += mapOf("Main-Class" to "org.pkl.cli.Main") }
|
manifest {
|
||||||
|
attributes += mapOf("Main-Class" to "org.pkl.cli.Main")
|
||||||
|
}
|
||||||
|
|
||||||
// not required at runtime
|
// not required at runtime
|
||||||
exclude("org/pkl/cli/svm/**")
|
exclude("org/pkl/cli/svm/**")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.javadoc { enabled = false }
|
tasks.javadoc {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
tasks.shadowJar {
|
tasks.shadowJar {
|
||||||
archiveFileName.set("jpkl")
|
archiveFileName.set("jpkl")
|
||||||
@@ -102,188 +88,163 @@ tasks.shadowJar {
|
|||||||
exclude("module-info.*")
|
exclude("module-info.*")
|
||||||
}
|
}
|
||||||
|
|
||||||
val javaExecutable by
|
val javaExecutable by tasks.registering(ExecutableJar::class) {
|
||||||
tasks.registering(ExecutableJar::class) {
|
inJar.set(tasks.shadowJar.flatMap { it.archiveFile })
|
||||||
inJar.set(tasks.shadowJar.flatMap { it.archiveFile })
|
outJar.set(file("$buildDir/executable/jpkl"))
|
||||||
outJar.set(layout.buildDirectory.file("executable/jpkl"))
|
|
||||||
|
|
||||||
// uncomment for debugging
|
// uncomment for debugging
|
||||||
// jvmArgs.addAll("-ea", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005")
|
//jvmArgs.addAll("-ea", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005")
|
||||||
}
|
}
|
||||||
|
|
||||||
val testJavaExecutable by
|
val testJavaExecutable by tasks.registering(Test::class) {
|
||||||
tasks.registering(Test::class) {
|
testClassesDirs = tasks.test.get().testClassesDirs
|
||||||
testClassesDirs = tasks.test.get().testClassesDirs
|
classpath =
|
||||||
classpath =
|
|
||||||
// compiled test classes
|
// compiled test classes
|
||||||
sourceSets.test.get().output +
|
sourceSets.test.get().output +
|
||||||
// java executable
|
// java executable
|
||||||
javaExecutable.get().outputs.files +
|
javaExecutable.get().outputs.files +
|
||||||
// test-only dependencies
|
// test-only dependencies
|
||||||
// (test dependencies that are also main dependencies must already be contained in java
|
// (test dependencies that are also main dependencies must already be contained in java executable;
|
||||||
// executable;
|
// to verify that, we don't want to include them here)
|
||||||
// to verify that, we don't want to include them here)
|
(configurations.testRuntimeClasspath.get() - configurations.runtimeClasspath.get())
|
||||||
(configurations.testRuntimeClasspath.get() - configurations.runtimeClasspath.get())
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tasks.check { dependsOn(testJavaExecutable) }
|
tasks.check {
|
||||||
|
dependsOn(testJavaExecutable)
|
||||||
|
}
|
||||||
|
|
||||||
// 0.14 Java executable was broken because javaExecutable.jvmArgs wasn't commented out.
|
// 0.14 Java executable was broken because javaExecutable.jvmArgs wasn't commented out.
|
||||||
// To catch this and similar problems, test that Java executable starts successfully.
|
// To catch this and similar problems, test that Java executable starts successfully.
|
||||||
val testStartJavaExecutable by
|
val testStartJavaExecutable by tasks.registering(Exec::class) {
|
||||||
tasks.registering(Exec::class) {
|
dependsOn(javaExecutable)
|
||||||
dependsOn(javaExecutable)
|
val outputFile = file("$buildDir/testStartJavaExecutable") // dummy output to satisfy up-to-date check
|
||||||
val outputFile =
|
|
||||||
layout.buildDirectory.file(
|
|
||||||
"testStartJavaExecutable"
|
|
||||||
) // dummy output to satisfy up-to-date check
|
|
||||||
outputs.file(outputFile)
|
|
||||||
|
|
||||||
if (buildInfo.os.isWindows) {
|
|
||||||
executable = "java"
|
|
||||||
args("-jar", javaExecutable.get().outputs.files.singleFile.toString(), "--version")
|
|
||||||
} else {
|
|
||||||
executable = javaExecutable.get().outputs.files.singleFile.toString()
|
|
||||||
args("--version")
|
|
||||||
}
|
|
||||||
|
|
||||||
doFirst { outputFile.get().asFile.delete() }
|
|
||||||
|
|
||||||
doLast { outputFile.get().asFile.writeText("OK") }
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.check { dependsOn(testStartJavaExecutable) }
|
|
||||||
|
|
||||||
fun Exec.configureExecutable(
|
|
||||||
graalVm: BuildInfo.GraalVm,
|
|
||||||
outputFile: Provider<RegularFile>,
|
|
||||||
extraArgs: List<String> = listOf()
|
|
||||||
) {
|
|
||||||
inputs
|
|
||||||
.files(sourceSets.main.map { it.output })
|
|
||||||
.withPropertyName("mainSourceSets")
|
|
||||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
|
||||||
inputs
|
|
||||||
.files(configurations.runtimeClasspath)
|
|
||||||
.withPropertyName("runtimeClasspath")
|
|
||||||
.withNormalizer(ClasspathNormalizer::class)
|
|
||||||
val nativeImageCommandName = if (buildInfo.os.isWindows) "native-image.cmd" else "native-image"
|
|
||||||
inputs
|
|
||||||
.files(file(graalVm.baseDir).resolve("bin/$nativeImageCommandName"))
|
|
||||||
.withPropertyName("graalVmNativeImage")
|
|
||||||
.withPathSensitivity(PathSensitivity.ABSOLUTE)
|
|
||||||
outputs.file(outputFile)
|
outputs.file(outputFile)
|
||||||
outputs.cacheIf { true }
|
|
||||||
|
|
||||||
workingDir(outputFile.map { it.asFile.parentFile })
|
executable = javaExecutable.get().outputs.files.singleFile.toString()
|
||||||
executable = "${graalVm.baseDir}/bin/$nativeImageCommandName"
|
args("--version")
|
||||||
|
|
||||||
|
doFirst { outputFile.delete() }
|
||||||
|
|
||||||
|
doLast { outputFile.writeText("OK") }
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.check {
|
||||||
|
dependsOn(testStartJavaExecutable)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Exec.configureExecutable(isEnabled: Boolean, outputFile: File, extraArgs: List<String> = listOf()) {
|
||||||
|
enabled = isEnabled
|
||||||
|
dependsOn(":installGraalVm")
|
||||||
|
|
||||||
|
inputs.files(sourceSets.main.map { it.output })
|
||||||
|
inputs.files(configurations.runtimeClasspath)
|
||||||
|
outputs.file(outputFile)
|
||||||
|
|
||||||
|
workingDir = outputFile.parentFile
|
||||||
|
executable = "${buildInfo.graalVm.baseDir}/bin/native-image"
|
||||||
|
|
||||||
// JARs to exclude from the class path for the native-image build.
|
// JARs to exclude from the class path for the native-image build.
|
||||||
val exclusions = listOf(libs.truffleApi, libs.graalSdk).map { it.get().module.name }
|
val exclusions =
|
||||||
|
if (buildInfo.graalVm.isGraal22) emptyList()
|
||||||
|
else listOf(libs.truffleApi, libs.graalSdk).map { it.get().module.name }
|
||||||
// https://www.graalvm.org/22.0/reference-manual/native-image/Options/
|
// https://www.graalvm.org/22.0/reference-manual/native-image/Options/
|
||||||
argumentProviders.add(
|
argumentProviders.add(CommandLineArgumentProvider {
|
||||||
CommandLineArgumentProvider {
|
listOf(
|
||||||
buildList {
|
|
||||||
// currently gives a deprecation warning, but we've been told
|
// currently gives a deprecation warning, but we've been told
|
||||||
// that the "initialize everything at build time" *CLI* option is likely here to stay
|
// that the "initialize everything at build time" *CLI* option is likely here to stay
|
||||||
add("--initialize-at-build-time=")
|
"--initialize-at-build-time="
|
||||||
// needed for messagepack-java (see https://github.com/msgpack/msgpack-java/issues/600)
|
,"--no-fallback"
|
||||||
add("--initialize-at-run-time=org.msgpack.core.buffer.DirectBufferAccess")
|
,"-H:IncludeResources=org/pkl/core/stdlib/.*\\.pkl"
|
||||||
add("--no-fallback")
|
,"-H:IncludeResources=org/jline/utils/.*"
|
||||||
add("-H:IncludeResources=org/pkl/core/stdlib/.*\\.pkl")
|
,"-H:IncludeResources=org/pkl/commons/cli/commands/IncludedCARoots.pem"
|
||||||
add("-H:IncludeResources=org/jline/utils/.*")
|
//,"-H:IncludeResources=org/pkl/core/Release.properties"
|
||||||
add("-H:IncludeResourceBundles=org.pkl.core.errorMessages")
|
,"-H:IncludeResourceBundles=org.pkl.core.errorMessages"
|
||||||
add("-H:IncludeResources=org/pkl/commons/cli/PklCARoots.pem")
|
,"--macro:truffle"
|
||||||
add("--macro:truffle")
|
,"-H:Class=org.pkl.cli.Main"
|
||||||
add("-H:Class=org.pkl.cli.Main")
|
,"-H:Name=${outputFile.name}"
|
||||||
add("-H:Name=${outputFile.get().asFile.name}")
|
//,"--native-image-info"
|
||||||
// the actual limit (currently) used by native-image is this number + 1400 (idea is to
|
//,"-Dpolyglot.image-build-time.PreinitializeContexts=pkl"
|
||||||
// compensate for Truffle's own nodes)
|
// the actual limit (currently) used by native-image is this number + 1400 (idea is to compensate for Truffle's own nodes)
|
||||||
add("-H:MaxRuntimeCompileMethods=1800")
|
,"-H:MaxRuntimeCompileMethods=1800"
|
||||||
add("-H:+EnforceMaxRuntimeCompileMethods")
|
,"-H:+EnforceMaxRuntimeCompileMethods"
|
||||||
add("--enable-url-protocols=http,https")
|
,"--enable-url-protocols=http,https"
|
||||||
add("-H:+ReportExceptionStackTraces")
|
//,"--install-exit-handlers"
|
||||||
// disable automatic support for JVM CLI options (puts our main class in full control of
|
,"-H:+ReportExceptionStackTraces"
|
||||||
// argument parsing)
|
,"-H:-ParseRuntimeOptions" // disable automatic support for JVM CLI options (puts our main class in full control of argument parsing)
|
||||||
add("-H:-ParseRuntimeOptions")
|
//,"-H:+PrintAnalysisCallTree"
|
||||||
// quick build mode: 40% faster compilation, 20% smaller (but presumably also slower)
|
//,"-H:PrintAnalysisCallTreeType=CSV"
|
||||||
// executable
|
//,"-H:+PrintImageObjectTree"
|
||||||
if (!buildInfo.isReleaseBuild) {
|
//,"--features=org.pkl.cli.svm.InitFeature"
|
||||||
add("-Ob")
|
//,"-H:Dump=:2"
|
||||||
}
|
//,"-H:MethodFilter=ModuleCache.getOrLoad*,VmLanguage.loadModule"
|
||||||
add("-march=compatibility")
|
//,"-g"
|
||||||
|
//,"-verbose"
|
||||||
|
//,"--debug-attach"
|
||||||
|
//,"-H:+AllowVMInspection"
|
||||||
|
//,"-H:+PrintHeapHistogram"
|
||||||
|
//,"-H:+ReportDeletedElementsAtRuntime"
|
||||||
|
//,"-H:+PrintMethodHistogram"
|
||||||
|
//,"-H:+PrintRuntimeCompileMethods"
|
||||||
|
//,"-H:NumberOfThreads=1"
|
||||||
|
//,"-J-Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime"
|
||||||
|
//,"-J-Dcom.oracle.truffle.aot=true"
|
||||||
|
//,"-J:-ea"
|
||||||
|
//,"-J:-esa"
|
||||||
|
// for use with https://www.graalvm.org/docs/tools/dashboard/
|
||||||
|
//,"-H:DashboardDump=dashboard.dump", "-H:+DashboardAll"
|
||||||
// native-image rejects non-existing class path entries -> filter
|
// native-image rejects non-existing class path entries -> filter
|
||||||
add("--class-path")
|
,"--class-path"
|
||||||
val pathInput =
|
,((sourceSets.main.get().output + configurations.runtimeClasspath.get())
|
||||||
sourceSets.main.get().output +
|
.filter { it.exists() && !exclusions.any { exclude -> it.name.contains(exclude) }})
|
||||||
configurations.runtimeClasspath.get().filter {
|
.asPath
|
||||||
it.exists() && !exclusions.any { exclude -> it.name.contains(exclude) }
|
|
||||||
}
|
|
||||||
add(pathInput.asPath)
|
|
||||||
// make sure dev machine stays responsive (15% slowdown on my laptop)
|
// make sure dev machine stays responsive (15% slowdown on my laptop)
|
||||||
val processors =
|
,"-J-XX:ActiveProcessorCount=${
|
||||||
Runtime.getRuntime().availableProcessors() /
|
Runtime.getRuntime().availableProcessors() / (if (buildInfo.os.isMacOsX && !buildInfo.isCiBuild) 4 else 1)
|
||||||
if (buildInfo.os.isMacOsX && !buildInfo.isCiBuild) 4 else 1
|
}"
|
||||||
add("-J-XX:ActiveProcessorCount=${processors}")
|
) + extraArgs
|
||||||
// Pass through all `HOMEBREW_` prefixed environment variables to allow build with shimmed
|
})
|
||||||
// tools.
|
}
|
||||||
addAll(environment.keys.filter { it.startsWith("HOMEBREW_") }.map { "-E$it" })
|
|
||||||
addAll(extraArgs)
|
/**
|
||||||
}
|
* Builds the pkl CLI for macOS/amd64.
|
||||||
}
|
*/
|
||||||
|
val macExecutableAmd64: TaskProvider<Exec> by tasks.registering(Exec::class) {
|
||||||
|
configureExecutable(buildInfo.os.isMacOsX && buildInfo.graalVm.isGraal22, file("$buildDir/executable/pkl-macos-amd64"))
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the pkl CLI for macOS/aarch64.
|
||||||
|
*
|
||||||
|
* This requires that GraalVM be set to version 23.0 or greater, because 22.x does not support this
|
||||||
|
* os/arch pair.
|
||||||
|
*/
|
||||||
|
val macExecutableAarch64: TaskProvider<Exec> by tasks.registering(Exec::class) {
|
||||||
|
configureExecutable(
|
||||||
|
buildInfo.os.isMacOsX && !buildInfo.graalVm.isGraal22,
|
||||||
|
file("$buildDir/executable/pkl-macos-aarch64"),
|
||||||
|
listOf(
|
||||||
|
"--initialize-at-run-time=org.msgpack.core.buffer.DirectBufferAccess",
|
||||||
|
"-H:+AllowDeprecatedBuilderClassesOnImageClasspath"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Builds the pkl CLI for macOS/amd64. */
|
/**
|
||||||
val macExecutableAmd64: TaskProvider<Exec> by
|
* Builds the pkl CLI for linux/amd64.
|
||||||
tasks.registering(Exec::class) {
|
*/
|
||||||
dependsOn(":installGraalVmAmd64")
|
val linuxExecutableAmd64: TaskProvider<Exec> by tasks.registering(Exec::class) {
|
||||||
configureExecutable(
|
configureExecutable(buildInfo.os.isLinux && buildInfo.arch == "amd64", file("$buildDir/executable/pkl-linux-amd64"))
|
||||||
buildInfo.graalVmAmd64,
|
}
|
||||||
layout.buildDirectory.file("executable/pkl-macos-amd64")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Builds the pkl CLI for macOS/aarch64. */
|
|
||||||
val macExecutableAarch64: TaskProvider<Exec> by
|
|
||||||
tasks.registering(Exec::class) {
|
|
||||||
dependsOn(":installGraalVmAarch64")
|
|
||||||
configureExecutable(
|
|
||||||
buildInfo.graalVmAarch64,
|
|
||||||
layout.buildDirectory.file("executable/pkl-macos-aarch64"),
|
|
||||||
listOf("-H:+AllowDeprecatedBuilderClassesOnImageClasspath")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Builds the pkl CLI for linux/amd64. */
|
|
||||||
val linuxExecutableAmd64: TaskProvider<Exec> by
|
|
||||||
tasks.registering(Exec::class) {
|
|
||||||
dependsOn(":installGraalVmAmd64")
|
|
||||||
configureExecutable(
|
|
||||||
buildInfo.graalVmAmd64,
|
|
||||||
layout.buildDirectory.file("executable/pkl-linux-amd64")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds the pkl CLI for linux/aarch64.
|
* Builds the pkl CLI for linux/aarch64.
|
||||||
*
|
*
|
||||||
* Right now, this is built within a container on Mac using emulation because CI does not have ARM
|
* Right now, this is built within a container on Mac using emulation because CI does not have
|
||||||
* instances.
|
* ARM instances.
|
||||||
*/
|
*/
|
||||||
val linuxExecutableAarch64: TaskProvider<Exec> by
|
val linuxExecutableAarch64: TaskProvider<Exec> by tasks.registering(Exec::class) {
|
||||||
tasks.registering(Exec::class) {
|
configureExecutable(buildInfo.os.isLinux && buildInfo.arch == "aarch64", file("$buildDir/executable/pkl-linux-aarch64"))
|
||||||
dependsOn(":installGraalVmAarch64")
|
}
|
||||||
configureExecutable(
|
|
||||||
buildInfo.graalVmAarch64,
|
|
||||||
layout.buildDirectory.file("executable/pkl-linux-aarch64"),
|
|
||||||
listOf(
|
|
||||||
// Ensure compatibility for kernels with page size set to 4k, 16k and 64k
|
|
||||||
// (e.g. Raspberry Pi 5, Asahi Linux)
|
|
||||||
"-H:PageSize=65536"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a statically linked CLI for linux/amd64.
|
* Builds a statically linked CLI for linux/amd64.
|
||||||
@@ -291,52 +252,25 @@ val linuxExecutableAarch64: TaskProvider<Exec> by
|
|||||||
* Note: we don't publish the same for linux/aarch64 because native-image doesn't support this.
|
* Note: we don't publish the same for linux/aarch64 because native-image doesn't support this.
|
||||||
* Details: https://www.graalvm.org/22.0/reference-manual/native-image/ARM64/
|
* Details: https://www.graalvm.org/22.0/reference-manual/native-image/ARM64/
|
||||||
*/
|
*/
|
||||||
val alpineExecutableAmd64: TaskProvider<Exec> by
|
val alpineExecutableAmd64: TaskProvider<Exec> by tasks.registering(Exec::class) {
|
||||||
tasks.registering(Exec::class) {
|
configureExecutable(
|
||||||
dependsOn(":installGraalVmAmd64")
|
buildInfo.os.isLinux && buildInfo.arch == "amd64" && buildInfo.hasMuslToolchain,
|
||||||
configureExecutable(
|
file("$buildDir/executable/pkl-alpine-linux-amd64"),
|
||||||
buildInfo.graalVmAmd64,
|
listOf(
|
||||||
layout.buildDirectory.file("executable/pkl-alpine-linux-amd64"),
|
"--static",
|
||||||
listOf("--static", "--libc=musl")
|
"--libc=musl",
|
||||||
)
|
"-H:CCompilerOption=-Wl,-z,stack-size=10485760",
|
||||||
}
|
"-Dorg.pkl.compat=alpine"
|
||||||
|
)
|
||||||
val windowsExecutableAmd64: TaskProvider<Exec> by
|
)
|
||||||
tasks.registering(Exec::class) {
|
}
|
||||||
dependsOn(":installGraalVmAmd64")
|
|
||||||
configureExecutable(
|
|
||||||
buildInfo.graalVmAmd64,
|
|
||||||
layout.buildDirectory.file("executable/pkl-windows-amd64"),
|
|
||||||
listOf("-Dfile.encoding=UTF-8")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.assembleNative {
|
tasks.assembleNative {
|
||||||
when {
|
dependsOn(macExecutableAmd64, macExecutableAarch64, linuxExecutableAmd64, linuxExecutableAarch64, alpineExecutableAmd64)
|
||||||
buildInfo.os.isMacOsX -> {
|
|
||||||
dependsOn(macExecutableAmd64)
|
|
||||||
if (buildInfo.arch == "aarch64") {
|
|
||||||
dependsOn(macExecutableAarch64)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
buildInfo.os.isWindows -> {
|
|
||||||
dependsOn(windowsExecutableAmd64)
|
|
||||||
}
|
|
||||||
buildInfo.os.isLinux && buildInfo.arch == "aarch64" -> {
|
|
||||||
dependsOn(linuxExecutableAarch64)
|
|
||||||
}
|
|
||||||
buildInfo.os.isLinux && buildInfo.arch == "amd64" -> {
|
|
||||||
dependsOn(linuxExecutableAmd64)
|
|
||||||
if (buildInfo.hasMuslToolchain) {
|
|
||||||
dependsOn(alpineExecutableAmd64)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// make Java executable available to other subprojects
|
// make Java executable available to other subprojects
|
||||||
// (we don't do the same for native executables because we don't want tasks assemble/build to build
|
// (we don't do the same for native executables because we don't want tasks assemble/build to build them)
|
||||||
// them)
|
|
||||||
artifacts {
|
artifacts {
|
||||||
add("javaExecutable", javaExecutable.map { it.outputs.files.singleFile }) {
|
add("javaExecutable", javaExecutable.map { it.outputs.files.singleFile }) {
|
||||||
name = "pkl-cli-java"
|
name = "pkl-cli-java"
|
||||||
@@ -346,7 +280,7 @@ artifacts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// region Maven Publishing
|
//region Maven Publishing
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
register<MavenPublication>("javaExecutable") {
|
register<MavenPublication>("javaExecutable") {
|
||||||
@@ -360,14 +294,11 @@ publishing {
|
|||||||
|
|
||||||
pom {
|
pom {
|
||||||
url.set("https://github.com/apple/pkl/tree/main/pkl-cli")
|
url.set("https://github.com/apple/pkl/tree/main/pkl-cli")
|
||||||
description.set(
|
description.set("""
|
||||||
"""
|
|
||||||
Pkl CLI executable for Java.
|
Pkl CLI executable for Java.
|
||||||
Can be executed directly on *nix (if the `java` command is found on the PATH) and with `java -jar` otherwise.
|
Can be executed directly on *nix (if the `java` command is found on the PATH) and with `java -jar` otherwise.
|
||||||
Requires Java 17 or higher.
|
Requires Java 11 or higher.
|
||||||
"""
|
""".trimIndent())
|
||||||
.trimIndent()
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
create<MavenPublication>("macExecutableAmd64") {
|
create<MavenPublication>("macExecutableAmd64") {
|
||||||
@@ -435,20 +366,6 @@ publishing {
|
|||||||
description.set("Native Pkl CLI executable for linux/amd64 and statically linked to musl.")
|
description.set("Native Pkl CLI executable for linux/amd64 and statically linked to musl.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
create<MavenPublication>("windowsExecutableAmd64") {
|
|
||||||
artifactId = "pkl-cli-windows-amd64"
|
|
||||||
artifact(stagedWindowsAmd64Executable.singleFile) {
|
|
||||||
classifier = null
|
|
||||||
extension = "exe"
|
|
||||||
builtBy(stagedWindowsAmd64Executable)
|
|
||||||
}
|
|
||||||
pom {
|
|
||||||
name.set("pkl-cli-windows-amd64")
|
|
||||||
url.set("https://github.com/apple/pkl/tree/main/pkl-cli")
|
|
||||||
description.set("Native Pkl CLI executable for windows/amd64.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,5 +376,5 @@ signing {
|
|||||||
sign(publishing.publications["macExecutableAarch64"])
|
sign(publishing.publications["macExecutableAarch64"])
|
||||||
sign(publishing.publications["macExecutableAmd64"])
|
sign(publishing.publications["macExecutableAmd64"])
|
||||||
sign(publishing.publications["alpineLinuxExecutableAmd64"])
|
sign(publishing.publications["alpineLinuxExecutableAmd64"])
|
||||||
sign(publishing.publications["windowsExecutableAmd64"])
|
}
|
||||||
} // endregion
|
//endregion
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
|||||||
+6
-4
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -23,8 +23,10 @@ import org.pkl.commons.cli.CliCommand
|
|||||||
import org.pkl.commons.cli.CliException
|
import org.pkl.commons.cli.CliException
|
||||||
import org.pkl.core.module.ProjectDependenciesManager.PKL_PROJECT_FILENAME
|
import org.pkl.core.module.ProjectDependenciesManager.PKL_PROJECT_FILENAME
|
||||||
|
|
||||||
abstract class CliProjectCommand(cliOptions: CliBaseOptions, private val projectDirs: List<Path>) :
|
abstract class CliAbstractProjectCommand(
|
||||||
CliCommand(cliOptions) {
|
cliOptions: CliBaseOptions,
|
||||||
|
private val projectDirs: List<Path>
|
||||||
|
) : CliCommand(cliOptions) {
|
||||||
|
|
||||||
protected val normalizedProjectFiles: List<Path> by lazy {
|
protected val normalizedProjectFiles: List<Path> by lazy {
|
||||||
if (projectDirs.isEmpty()) {
|
if (projectDirs.isEmpty()) {
|
||||||
@@ -35,7 +37,7 @@ abstract class CliProjectCommand(cliOptions: CliBaseOptions, private val project
|
|||||||
)
|
)
|
||||||
return@lazy listOf(projectFile.normalize())
|
return@lazy listOf(projectFile.normalize())
|
||||||
}
|
}
|
||||||
projectDirs.map(cliOptions.normalizedWorkingDir::resolve).map { dir ->
|
projectDirs.map { dir ->
|
||||||
val projectFile = dir.resolve(PKL_PROJECT_FILENAME)
|
val projectFile = dir.resolve(PKL_PROJECT_FILENAME)
|
||||||
if (!Files.exists(projectFile)) {
|
if (!Files.exists(projectFile)) {
|
||||||
throw CliException("Directory $dir does not contain a PklProject file.")
|
throw CliException("Directory $dir does not contain a PklProject file.")
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user