Compare commits

..

1 Commits

Author SHA1 Message Date
Islon Scherer 750e983366 Move to truffle object model 2026-04-15 17:23:32 +02:00
216 changed files with 3715 additions and 3005 deletions
+2 -2
View File
@@ -2,9 +2,9 @@ amends "pkl:Project"
dependencies { dependencies {
["pkl.impl.ghactions"] { ["pkl.impl.ghactions"] {
uri = "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1.6.0" uri = "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1.5.0"
} }
["gha"] { ["gha"] {
uri = "package://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1.4.0" uri = "package://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1.2.0"
} }
} }
+8 -8
View File
@@ -3,16 +3,16 @@
"resolvedDependencies": { "resolvedDependencies": {
"package://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1": { "package://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1": {
"type": "remote", "type": "remote",
"uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1.4.0", "uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/com.github.actions@1.3.1",
"checksums": { "checksums": {
"sha256": "e0b9a9f71071d6101e9d764c069b2ec4a597d5315cb6e4c265b3f0d90c2b482c" "sha256": "fd515da685ea126678c3ec684e84a4f992d43481cc1d75cb866cd55775f675f9"
} }
}, },
"package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1": { "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1": {
"type": "remote", "type": "remote",
"uri": "projectpackage://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1.6.0", "uri": "projectpackage://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@1.5.0",
"checksums": { "checksums": {
"sha256": "fbc3c456ea468a0fe6baa9b3d30167259ac04e721a41a10fe82d2970026f0b1d" "sha256": "2c1e0d9efcd65b3c3207bf535c325ebc0ec2ab169187b324c4bb70821cac0e51"
} }
}, },
"package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.deepToTyped@1": { "package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.deepToTyped@1": {
@@ -24,16 +24,16 @@
}, },
"package://pkg.pkl-lang.org/pkl-pantry/pkl.github.dependabotManagedActions@1": { "package://pkg.pkl-lang.org/pkl-pantry/pkl.github.dependabotManagedActions@1": {
"type": "remote", "type": "remote",
"uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/pkl.github.dependabotManagedActions@1.1.0", "uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/pkl.github.dependabotManagedActions@1.0.3",
"checksums": { "checksums": {
"sha256": "025fac778f2c5f75c8229fa4ec0f49ebdb99a61affe9aae489fefd8fccd92faa" "sha256": "d368900942efb88ed51a98f9614748b06c74ba43423f045fcd6dedb5dbdc0bea"
} }
}, },
"package://pkg.pkl-lang.org/pkl-pantry/com.github.dependabot@1": { "package://pkg.pkl-lang.org/pkl-pantry/com.github.dependabot@1": {
"type": "remote", "type": "remote",
"uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/com.github.dependabot@1.0.1", "uri": "projectpackage://pkg.pkl-lang.org/pkl-pantry/com.github.dependabot@1.0.0",
"checksums": { "checksums": {
"sha256": "0a4fe9b0983716ec49fb060b9e5e83f8c365eb899d517123b43134416a9574b6" "sha256": "02ef6f25bfca5b1d095db73ea15de79d2d2c6832ebcab61e6aba90554382abcb"
} }
} }
} }
-67
View File
@@ -1,67 +0,0 @@
amends "@gha/Workflow.pkl"
import "@gha/catalog.pkl"
on {
push {
branches {
"main"
}
}
pull_request {}
schedule {
// Run at 01:38 on Saturday
new { cron = "38 1 * * 6" }
}
}
local class CodeQLScan {
language: String
`build-mode`: String
}
local scans: Listing<CodeQLScan> = new {
new {
language = "actions"
`build-mode` = "none"
}
new {
language = "java-kotlin"
`build-mode` = "autobuild"
}
new {
language = "javascript-typescript"
`build-mode` = "none"
}
}
jobs {
for (scan in scans) {
["analyze-\(scan.language)"] {
name = "Analyze (\(scan.language))"
`runs-on` = "ubuntu-latest"
permissions {
`security-events` = "write"
}
steps {
catalog.`actions/checkout@v6`
new {
name = "Initialize CodeQL"
uses = "github/codeql-action/init@v4"
with {
["languages"] = scan.language
["build-mode"] = scan.`build-mode`
}
}
new {
name = "Perform CodeQL Analysis"
uses = "github/codeql-action/analyze@v4"
with {
["category"] = "/language:\(scan.language)"
}
}
}
}
}
}
-8
View File
@@ -1,14 +1,6 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: gradle
cooldown:
default-days: 7
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions - package-ecosystem: github-actions
cooldown:
default-days: 7
directory: / directory: /
ignore: ignore:
- dependency-name: '*' - dependency-name: '*'
+1 -50
View File
@@ -9,7 +9,6 @@ import "jobs/GithubRelease.pkl"
import "jobs/GradleJob.pkl" import "jobs/GradleJob.pkl"
import "jobs/PklJob.pkl" import "jobs/PklJob.pkl"
import "jobs/SimpleGradleJob.pkl" import "jobs/SimpleGradleJob.pkl"
import "codeql.pkl"
triggerDocsBuild = "both" triggerDocsBuild = "both"
@@ -23,8 +22,6 @@ testReports {
excludeJobs { excludeJobs {
"bench" "bench"
"github-release" "github-release"
"dependency-submission"
"dependency-review"
Regex("deploy-.*") Regex("deploy-.*")
} }
} }
@@ -43,15 +40,11 @@ local gradleCheckWindows = (baseGradleCheck) {
os = "windows" os = "windows"
} }
local typealias PklJobs = Mapping<String, PklJob | *Workflow.Job> local typealias PklJobs = Mapping<String, PklJob>
local toWorkflowJobs: (PklJobs) -> Workflow.Jobs = (it) -> new Workflow.Jobs { local toWorkflowJobs: (PklJobs) -> Workflow.Jobs = (it) -> new Workflow.Jobs {
for (k, v in it) { for (k, v in it) {
when (v is PklJob) {
[k] = v.job [k] = v.job
} else {
[k] = v
}
} }
} }
@@ -180,28 +173,6 @@ main {
) { ) {
needs = buildAndTestJobs.keys.toListing() needs = buildAndTestJobs.keys.toListing()
} }
["dependency-submission"] {
`runs-on` = "ubuntu-latest"
permissions {
contents = "write"
}
steps {
module.catalog.`actions/checkout@v6`
(module.catalog.`actions/setup-java@v5`) {
with {
`java-version` = "25"
distribution = "temurin"
}
}
(module.catalog.`gradle/actions/dependency-submission@v6`) {
with {
// language=regexp
`dependency-graph-include-configurations` =
".*[rR]untimeClasspath|.*[cC]ompileClasspath"
}
}
}
}
} |> toWorkflowJobs } |> toWorkflowJobs
} }
@@ -225,23 +196,3 @@ release {
} }
} |> toWorkflowJobs } |> toWorkflowJobs
} }
dependabot {
updates {
new {
`package-ecosystem` = "gradle"
schedule {
interval = "weekly"
}
cooldown {
`default-days` = 7
}
directory = "/"
}
}
}
workflows {
// add codeql workflow to set of workflows
["workflows/codeql.yml"] = codeql
}
+1 -2
View File
@@ -23,8 +23,7 @@ preSteps {
when (os == "linux" && !musl) { when (os == "linux" && !musl) {
new { new {
name = "Install deps" name = "Install deps"
run = run = "dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en"
"dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en"
} }
} }
} }
-6
View File
@@ -30,11 +30,5 @@ jobs:
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
- name: dawidd6/action-download-artifact@v11 - name: dawidd6/action-download-artifact@v11
uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11 uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11
- name: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
- name: github/codeql-action/init@v4
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
- name: gradle/actions/dependency-submission@v6
uses: gradle/actions/dependency-submission@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6
- name: gradle/actions/setup-gradle@v5 - name: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5 uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5
-63
View File
@@ -1,63 +0,0 @@
# Generated from Workflow.pkl. DO NOT EDIT.
'on':
pull_request: {}
push:
branches:
- main
schedule:
- cron: 38 1 * * 6
jobs:
analyze-actions:
name: Analyze (actions)
permissions:
security-events: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
languages: actions
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
category: /language:actions
analyze-java-kotlin:
name: Analyze (java-kotlin)
permissions:
security-events: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
languages: java-kotlin
build-mode: autobuild
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
category: /language:java-kotlin
analyze-javascript-typescript:
name: Analyze (javascript-typescript)
permissions:
security-events: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
languages: javascript-typescript
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
with:
category: /language:javascript-typescript
-16
View File
@@ -831,21 +831,6 @@ jobs:
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }} ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }} ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true --no-parallel publishToSonatype run: ./gradlew --info --stacktrace --no-daemon -DpklMultiJdkTesting=true --no-parallel publishToSonatype
dependency-submission:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '25'
distribution: temurin
- uses: gradle/actions/dependency-submission@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6
with:
dependency-graph-include-configurations: .*[rR]untimeClasspath|.*[cC]ompileClasspath
publish-test-results: publish-test-results:
if: '!cancelled()' if: '!cancelled()'
needs: needs:
@@ -906,7 +891,6 @@ jobs:
- pkl-doc-alpine-linux-amd64-snapshot - pkl-doc-alpine-linux-amd64-snapshot
- pkl-doc-windows-amd64-snapshot - pkl-doc-windows-amd64-snapshot
- deploy-snapshot - deploy-snapshot
- dependency-submission
- publish-test-results - publish-test-results
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
+2
View File
@@ -74,7 +74,9 @@ gw wrapper --gradle-version [version] --gradle-distribution-sha256-sum [sha]
. (optional) Update _gradle/libs.version.toml_ . (optional) Update _gradle/libs.version.toml_
based on version information from https://search.maven.org, https://plugins.gradle.org, and GitHub repos based on version information from https://search.maven.org, https://plugins.gradle.org, and GitHub repos
. Run `gw updateDependencyLocks`
. Validate changes with `gw build buildNative` . Validate changes with `gw build buildNative`
. Review and commit the updated dependency lock files
== Code Generation == Code Generation
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklJavaLibrary") pklJavaLibrary
id("me.champeau.jmh") id("me.champeau.jmh")
} }
+80
View File
@@ -0,0 +1,80 @@
# 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.
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=jmh,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
net.sf.jopt-simple:jopt-simple:5.0.4=jmh,jmhCompileClasspath,jmhRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=jmh,jmhCompileClasspath,jmhRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jmhCompileClasspath,testCompileClasspath
org.assertj:assertj-core:3.27.7=jmh,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.graalvm.compiler:compiler:25.0.1=graal
org.graalvm.polyglot:polyglot:25.0.1=jmh,jmhRuntimeClasspath,truffle
org.graalvm.sdk:collections:25.0.1=graal,jmh,jmhRuntimeClasspath,truffle
org.graalvm.sdk:graal-sdk:25.0.1=jmh,jmhRuntimeClasspath
org.graalvm.sdk:nativeimage:25.0.1=jmh,jmhRuntimeClasspath,truffle
org.graalvm.sdk:word:25.0.1=graal,jmh,jmhRuntimeClasspath,truffle
org.graalvm.truffle:truffle-api:25.0.1=jmh,jmhRuntimeClasspath,truffle
org.graalvm.truffle:truffle-compiler:25.0.1=graal
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,jmh,jmhCompileClasspath,jmhRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=jmh,jmhCompileClasspath,jmhRuntimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=jmh,jmhCompileClasspath,jmhRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=jmh,jmhRuntimeClasspath
org.openjdk.jmh:jmh-core:1.37=jmh,jmhCompileClasspath,jmhRuntimeClasspath
org.openjdk.jmh:jmh-generator-asm:1.37=jmh,jmhCompileClasspath,jmhRuntimeClasspath
org.openjdk.jmh:jmh-generator-bytecode:1.37=jmh,jmhCompileClasspath,jmhRuntimeClasspath
org.openjdk.jmh:jmh-generator-reflection:1.37=jmh,jmhCompileClasspath,jmhRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=jmh,jmhCompileClasspath,jmhRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
org.organicdesign:Paguro:3.10.3=jmh,jmhRuntimeClasspath
org.ow2.asm:asm:9.0=jmh,jmhCompileClasspath,jmhRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.10=jmh,jmhRuntimeClasspath
empty=annotationProcessor,apiDependenciesMetadata,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,jmhAnnotationProcessor,jmhApiDependenciesMetadata,jmhCompileOnlyDependenciesMetadata,jmhImplementationDependenciesMetadata,jmhIntransitiveDependenciesMetadata,jmhKotlinScriptDefExtensions,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
@@ -1,115 +0,0 @@
/*
* Copyright © 2026 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
import org.gradle.api.GradleException
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.kotlin
import org.gradle.kotlin.dsl.the
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
java
kotlin("jvm")
id("com.diffplug.spotless")
}
val buildInfo = project.extensions.getByType<BuildInfo>()
val libs = the<LibrariesForLibs>()
kotlin {
jvmToolchain {
languageVersion.set(buildInfo.jdkToolchainVersion)
vendor.set(buildInfo.jdkVendor)
}
compilerOptions {
val kotlinTarget = KotlinVersion.fromVersion(libs.versions.kotlinTarget.get())
languageVersion.set(kotlinTarget)
apiVersion.set(kotlinTarget)
jvmTarget = JvmTarget.fromTarget(buildInfo.jvmTarget.toString())
freeCompilerArgs.addAll(
"-jvm-default=no-compatibility", // was: -Xjvm-default=all
"-Xjdk-release=${buildInfo.jvmTarget}",
"-Xjsr305=strict",
)
}
}
spotless {
val revertYearOnlyChanges = RevertYearOnlyChangesStep(rootProject.rootDir, ratchetFrom!!).create()
kotlin {
addStep(revertYearOnlyChanges)
ktfmt(libs.versions.ktfmt.get()).googleStyle()
target("src/*/kotlin/**/*.kt")
licenseHeaderFile(
rootProject.file("build-logic/src/main/resources/license-header.star-block.txt")
)
}
}
/**
* Kotlin modules to guard: fail the build if any dependency resolves to a version higher than
* `libs.versions.kotlinTarget`. This includes versions introduced via direct declarations, BOMs,
* version catalogs, or constraints.
*/
val guardedKotlinModules = setOf(libs.kotlinStdLib.get().module, libs.kotlinReflect.get().module)
/**
* Classpath configurations where the above rule applies. Kept narrow to avoid interfering with
* Gradle/Kotlin plugin internal configurations.
*/
val guardedConfigurations =
setOf(
configurations.compileClasspath,
configurations.runtimeClasspath,
configurations.testCompileClasspath,
configurations.testRuntimeClasspath,
)
guardedConfigurations.forEach { configuration ->
configuration.configure {
incoming.afterResolve {
resolutionResult.allComponents.forEach { component ->
val moduleVersion = component.moduleVersion ?: return@forEach
if (
moduleVersion.module in guardedKotlinModules &&
moduleVersion.version.exceedsKotlinTarget()
) {
throw GradleException(
"Resolved ${moduleVersion.module}:${moduleVersion.version} on configuration $name, " +
"which exceeds the allowed Kotlin version ($kotlinTargetVersion)"
)
}
}
}
}
}
// also works for version ranges like: [2.3.0,)
val kotlinVersionRegex = Regex("""(\d+)\.(\d+)(?:\.\d+)?""")
val kotlinTargetVersion = libs.versions.kotlinTarget.get()
val targetMajor = kotlinTargetVersion.substringBefore('.').toInt()
val targetMinor = kotlinTargetVersion.substringAfter('.').toInt()
fun String.exceedsKotlinTarget(): Boolean {
val version =
kotlinVersionRegex.find(this) ?: throw GradleException("Could not parse Kotlin version: $this")
val major = version.groupValues[1].toInt()
val minor = version.groupValues[2].toInt()
return major > targetMajor || (major == targetMajor && minor > targetMinor)
}
@@ -1,122 +0,0 @@
/*
* Copyright © 2024-2026 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 assembleNativeMacOsAarch64 by tasks.registering { group = "build" }
val assembleNativeMacOsAmd64 by tasks.registering { group = "build" }
val assembleNativeLinuxAarch64 by tasks.registering { group = "build" }
val assembleNativeLinuxAmd64 by tasks.registering { group = "build" }
val assembleNativeAlpineLinuxAmd64 by tasks.registering { group = "build" }
val assembleNativeWindowsAmd64 by tasks.registering { group = "build" }
val testNativeMacOsAarch64 by tasks.registering { group = "verification" }
val testNativeMacOsAmd64 by tasks.registering { group = "verification" }
val testNativeLinuxAarch64 by tasks.registering { group = "verification" }
val testNativeLinuxAmd64 by tasks.registering { group = "verification" }
val testNativeAlpineLinuxAmd64 by tasks.registering { group = "verification" }
val testNativeWindowsAmd64 by tasks.registering { group = "verification" }
val buildInfo = project.extensions.getByType<BuildInfo>()
private fun <T : Task> Task.wraps(other: TaskProvider<T>) {
dependsOn(other)
outputs.files(other)
}
val assembleNative by tasks.registering {
group = "build"
if (!buildInfo.isCrossArchSupported && buildInfo.isCrossArch) {
throw GradleException("Cross-arch builds are not supported on ${buildInfo.os.name}")
}
when {
buildInfo.os.isMacOsX && buildInfo.targetArch == "aarch64" -> {
wraps(assembleNativeMacOsAarch64)
}
buildInfo.os.isMacOsX && buildInfo.targetArch == "amd64" -> {
wraps(assembleNativeMacOsAmd64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "aarch64" -> {
wraps(assembleNativeLinuxAarch64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "amd64" -> {
if (buildInfo.musl) wraps(assembleNativeAlpineLinuxAmd64) else wraps(assembleNativeLinuxAmd64)
}
buildInfo.os.isWindows && buildInfo.targetArch == "amd64" -> {
wraps(assembleNativeWindowsAmd64)
}
else -> {
doLast {
throw GradleException(
"Cannot build targeting ${buildInfo.os.name}/${buildInfo.targetArch} with musl=${buildInfo.musl}"
)
}
}
}
}
val testNative by tasks.registering {
group = "verification"
dependsOn(assembleNative)
if (!buildInfo.isCrossArchSupported && buildInfo.isCrossArch) {
throw GradleException("Cross-arch builds are not supported on ${buildInfo.os.name}")
}
when {
buildInfo.os.isMacOsX && buildInfo.targetArch == "aarch64" -> {
dependsOn(testNativeMacOsAarch64)
}
buildInfo.os.isMacOsX && buildInfo.targetArch == "amd64" -> {
dependsOn(testNativeMacOsAmd64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "aarch64" -> {
dependsOn(testNativeLinuxAarch64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "amd64" -> {
if (buildInfo.musl) dependsOn(testNativeAlpineLinuxAmd64) else dependsOn(testNativeLinuxAmd64)
}
buildInfo.os.isWindows && buildInfo.targetArch == "amd64" -> {
dependsOn(testNativeWindowsAmd64)
}
else -> {
doLast {
throw GradleException(
"Cannot build targeting ${buildInfo.os.name}/${buildInfo.targetArch} with musl=${buildInfo.musl}"
)
}
}
}
}
val checkNative by tasks.registering {
group = "verification"
dependsOn(testNative)
}
val buildNative by tasks.registering {
group = "build"
dependsOn(checkNative)
}
+2 -2
View File
@@ -19,8 +19,8 @@ import org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM
import org.jetbrains.gradle.ext.ProjectSettings import org.jetbrains.gradle.ext.ProjectSettings
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklGraalVm") pklGraalVm
alias(libs.plugins.ideaExt) alias(libs.plugins.ideaExt)
alias(libs.plugins.jmh) apply false alias(libs.plugins.jmh) apply false
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -15,7 +15,7 @@
*/ */
@file:Suppress("UnstableApiUsage") @file:Suppress("UnstableApiUsage")
rootProject.name = "build-logic" rootProject.name = "buildSrc"
pluginManagement { pluginManagement {
repositories { repositories {
@@ -24,7 +24,7 @@ pluginManagement {
} }
} }
plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" } plugins { id("org.gradle.toolchains.foojay-resolver-convention") }
// makes ~/.gradle/init.gradle unnecessary and ~/.gradle/gradle.properties optional // makes ~/.gradle/init.gradle unnecessary and ~/.gradle/gradle.properties optional
dependencyResolutionManagement { dependencyResolutionManagement {
@@ -44,7 +44,7 @@ const val PKL_JVM_TARGET_DEFAULT_MAXIMUM = 17
* *
* This is a build-time requirement, not a runtime requirement. To avoid the provisioning of * This is a build-time requirement, not a runtime requirement. To avoid the provisioning of
* multiple JDKs and other build issues, keep this value in sync with the JVM toolchain versions in * multiple JDKs and other build issues, keep this value in sync with the JVM toolchain versions in
* `build-logic/build.gradle.kts` and `gradle-daemon-jvm.properties`. * `buildSrc/build.gradle.kts` and `gradle-daemon-jvm.properties`.
*/ */
const val PKL_JDK_VERSION_MIN = 25 const val PKL_JDK_VERSION_MIN = 25
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2025-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2025 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 © 2024-2026 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 © 2024-2026 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 © 2024-2026 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 © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -131,7 +131,7 @@ abstract class NativeImageBuild : DefaultTask() {
add(imageName.get()) add(imageName.get())
// the actual limit (currently) used by native-image is this number + 1400 (idea is to // the actual limit (currently) used by native-image is this number + 1400 (idea is to
// compensate for Truffle's own nodes) // compensate for Truffle's own nodes)
add("-H:MaxRuntimeCompileMethods=1800") add("-H:MaxRuntimeCompileMethods=2000")
add("-H:+EnforceMaxRuntimeCompileMethods") add("-H:+EnforceMaxRuntimeCompileMethods")
add("--enable-url-protocols=http,https") add("--enable-url-protocols=http,https")
add("-H:+ReportExceptionStackTraces") add("-H:+ReportExceptionStackTraces")
@@ -63,7 +63,8 @@ fun Project.configurePklPomMetadata() {
/** Configures POM validation task to check for unresolved versions and snapshots in releases. */ /** Configures POM validation task to check for unresolved versions and snapshots in releases. */
fun Project.configurePomValidation() { fun Project.configurePomValidation() {
val validatePom by tasks.registering { val validatePom by
tasks.registering {
if (tasks.findByName("generatePomFileForLibraryPublication") == null) { if (tasks.findByName("generatePomFileForLibraryPublication") == null) {
return@registering return@registering
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -20,14 +20,12 @@ plugins { id("com.diffplug.spotless") }
val buildInfo = extensions.create<BuildInfo>("buildInfo", project) val buildInfo = extensions.create<BuildInfo>("buildInfo", project)
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)
configureEach { configureEach {
resolutionStrategy { resolutionStrategy {
// forbid dependencies whose pom.xml's include version ranges, because this will lead to
// unreproducible builds.
failOnDynamicVersions()
componentSelection { componentSelection {
all { all {
if (rejectedVersionSuffix.containsMatchIn(candidate.version)) { if (rejectedVersionSuffix.containsMatchIn(candidate.version)) {
@@ -79,6 +77,12 @@ plugins.withType(MavenPublishPlugin::class).configureEach {
} }
} }
// settings.gradle.kts sets `--write-locks`
// if Gradle command line contains this task name
val updateDependencyLocks by tasks.registering {
doLast { 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 { tasks.withType(Test::class).configureEach {
@@ -108,7 +112,7 @@ tasks.withType(JavaExec::class).configureEach {
private val libs = the<LibrariesForLibs>() private val libs = the<LibrariesForLibs>()
private val licenseHeaderFile by lazy { private val licenseHeaderFile by lazy {
rootProject.file("build-logic/src/main/resources/license-header.star-block.txt") rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt")
} }
private fun KotlinGradleExtension.configureFormatter() { private fun KotlinGradleExtension.configureFormatter() {
@@ -132,18 +136,18 @@ spotless {
val revertYearOnlyChangesStep = val revertYearOnlyChangesStep =
RevertYearOnlyChangesStep(rootProject.rootDir, ratchetFrom!!).create() RevertYearOnlyChangesStep(rootProject.rootDir, ratchetFrom!!).create()
// When building root project, format build-logic files too. // When building root project, format buildSrc files too.
// We need this because build-logic is not a subproject of the root project, so a top-level // We need this because buildSrc is not a subproject of the root project, so a top-level
// `spotlessApply` will not trigger `build-logic:spotlessApply`. // `spotlessApply` will not trigger `buildSrc:spotlessApply`.
if (project.path == rootProject.path) { if (project === rootProject) {
kotlinGradle { kotlinGradle {
configureFormatter() configureFormatter()
addStep(revertYearOnlyChangesStep) addStep(revertYearOnlyChangesStep)
target("*.kts", "build-logic/*.kts", "build-logic/src/*/kotlin/**/*.kts") target("*.kts", "buildSrc/*.kts", "buildSrc/src/*/kotlin/**/*.kts")
} }
kotlin { kotlin {
ktfmt(libs.versions.ktfmt.get()).googleStyle() ktfmt(libs.versions.ktfmt.get()).googleStyle()
target("build-logic/src/*/kotlin/**/*.kt") target("buildSrc/src/*/kotlin/**/*.kt")
licenseHeaderFile(licenseHeaderFile) licenseHeaderFile(licenseHeaderFile)
addStep(revertYearOnlyChangesStep) addStep(revertYearOnlyChangesStep)
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -47,7 +47,8 @@ fun Task.setupTestStartJavaExecutable(launcher: Provider<JavaLauncher>? = null)
val outputFile = layout.buildDirectory.file("testStartJavaExecutable/$name") val outputFile = layout.buildDirectory.file("testStartJavaExecutable/$name")
outputs.file(outputFile) outputs.file(outputFile)
val execOutput = providers.exec { val execOutput =
providers.exec {
val executablePath = javaExecutable.get().outputs.files.singleFile val executablePath = javaExecutable.get().outputs.files.singleFile
if (launcher?.isPresent == true) { if (launcher?.isPresent == true) {
commandLine( commandLine(
@@ -56,9 +56,7 @@ spotless {
addStep(revertYearOnlyChanges) addStep(revertYearOnlyChanges)
googleJavaFormat(libs.versions.googleJavaFormat.get()) googleJavaFormat(libs.versions.googleJavaFormat.get())
target("src/*/java/**/*.java") target("src/*/java/**/*.java")
licenseHeaderFile( licenseHeaderFile(rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"))
rootProject.file("build-logic/src/main/resources/license-header.star-block.txt")
)
} }
} }
@@ -0,0 +1,67 @@
/*
* Copyright © 2026 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
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.kotlin
import org.gradle.kotlin.dsl.the
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
java
kotlin("jvm")
id("com.diffplug.spotless")
}
val buildInfo = project.extensions.getByType<BuildInfo>()
val libs = the<LibrariesForLibs>()
dependencies {
// Align versions of Kotlin modules during dependency resolution.
// Do NOT align "api", as this would affect consumers' builds.
implementation(platform(libs.kotlinBom))
testImplementation(platform(libs.kotlinBom))
}
kotlin {
compilerOptions {
val kotlinTarget = KotlinVersion.fromVersion(libs.versions.kotlinTarget.get())
languageVersion.set(kotlinTarget)
apiVersion.set(kotlinTarget)
jvmTarget = JvmTarget.fromTarget(buildInfo.jvmTarget.toString())
jvmToolchain {
languageVersion.set(buildInfo.jdkToolchainVersion)
vendor.set(buildInfo.jdkVendor)
}
freeCompilerArgs.addAll(
"-jvm-default=no-compatibility", // was: -Xjvm-default=all
"-Xjdk-release=${buildInfo.jvmTarget}",
"-Xjsr305=strict",
)
}
}
spotless {
val revertYearOnlyChanges = RevertYearOnlyChangesStep(rootProject.rootDir, ratchetFrom!!).create()
kotlin {
addStep(revertYearOnlyChanges)
ktfmt(libs.versions.ktfmt.get()).googleStyle()
target("src/*/kotlin/**/*.kt")
licenseHeaderFile(rootProject.file("buildSrc/src/main/resources/license-header.star-block.txt"))
}
}
@@ -37,7 +37,8 @@ val stagedLinuxAarch64Executable: Configuration by configurations.creating
val stagedAlpineLinuxAmd64Executable: Configuration by configurations.creating val stagedAlpineLinuxAmd64Executable: Configuration by configurations.creating
val stagedWindowsAmd64Executable: Configuration by configurations.creating val stagedWindowsAmd64Executable: Configuration by configurations.creating
val nativeImageClasspath by configurations.creating { val nativeImageClasspath by
configurations.creating {
extendsFrom(configurations.runtimeClasspath.get()) extendsFrom(configurations.runtimeClasspath.get())
// Ensure native-image version uses GraalVM C SDKs instead of Java FFI or JNA // Ensure native-image version uses GraalVM C SDKs instead of Java FFI or JNA
// (comes from artifact `mordant-jvm-graal-ffi`). // (comes from artifact `mordant-jvm-graal-ffi`).
@@ -139,16 +140,16 @@ val windowsExecutableAmd64 by
val assembleNative by tasks.existing val assembleNative by tasks.existing
val testStartNativeExecutable by tasks.registering { val testStartNativeExecutable by
tasks.registering {
dependsOn(assembleNative) dependsOn(assembleNative)
// dummy file for up-to-date checking // dummy file for up-to-date checking
val outputFile = project.layout.buildDirectory.file("testStartNativeExecutable/output.txt") val outputFile = project.layout.buildDirectory.file("testStartNativeExecutable/output.txt")
outputs.file(outputFile) outputs.file(outputFile)
val execOutput = providers.exec { val execOutput =
commandLine(assembleNative.get().outputs.files.singleFile, "--version") providers.exec { commandLine(assembleNative.get().outputs.files.singleFile, "--version") }
}
doLast { doLast {
val outputText = execOutput.standardOutput.asText.get() val outputText = execOutput.standardOutput.asText.get()
@@ -168,11 +169,13 @@ val testStartNativeExecutable by tasks.registering {
val requiredGlibcVersion: Version = Version.parse("2.17") val requiredGlibcVersion: Version = Version.parse("2.17")
val checkGlibc by tasks.registering { val checkGlibc by
tasks.registering {
enabled = buildInfo.os.isLinux && !buildInfo.musl enabled = buildInfo.os.isLinux && !buildInfo.musl
dependsOn(assembleNative) dependsOn(assembleNative)
doLast { doLast {
val exec = providers.exec { val exec =
providers.exec {
commandLine("objdump", "-T", assembleNative.get().outputs.files.singleFile) commandLine("objdump", "-T", assembleNative.get().outputs.files.singleFile)
} }
val output = exec.standardOutput.asText.get() val output = exec.standardOutput.asText.get()
@@ -0,0 +1,128 @@
/*
* 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.
*/
val assembleNativeMacOsAarch64 by tasks.registering { group = "build" }
val assembleNativeMacOsAmd64 by tasks.registering { group = "build" }
val assembleNativeLinuxAarch64 by tasks.registering { group = "build" }
val assembleNativeLinuxAmd64 by tasks.registering { group = "build" }
val assembleNativeAlpineLinuxAmd64 by tasks.registering { group = "build" }
val assembleNativeWindowsAmd64 by tasks.registering { group = "build" }
val testNativeMacOsAarch64 by tasks.registering { group = "verification" }
val testNativeMacOsAmd64 by tasks.registering { group = "verification" }
val testNativeLinuxAarch64 by tasks.registering { group = "verification" }
val testNativeLinuxAmd64 by tasks.registering { group = "verification" }
val testNativeAlpineLinuxAmd64 by tasks.registering { group = "verification" }
val testNativeWindowsAmd64 by tasks.registering { group = "verification" }
val buildInfo = project.extensions.getByType<BuildInfo>()
private fun <T : Task> Task.wraps(other: TaskProvider<T>) {
dependsOn(other)
outputs.files(other)
}
val assembleNative by
tasks.registering {
group = "build"
if (!buildInfo.isCrossArchSupported && buildInfo.isCrossArch) {
throw GradleException("Cross-arch builds are not supported on ${buildInfo.os.name}")
}
when {
buildInfo.os.isMacOsX && buildInfo.targetArch == "aarch64" -> {
wraps(assembleNativeMacOsAarch64)
}
buildInfo.os.isMacOsX && buildInfo.targetArch == "amd64" -> {
wraps(assembleNativeMacOsAmd64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "aarch64" -> {
wraps(assembleNativeLinuxAarch64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "amd64" -> {
if (buildInfo.musl) wraps(assembleNativeAlpineLinuxAmd64)
else wraps(assembleNativeLinuxAmd64)
}
buildInfo.os.isWindows && buildInfo.targetArch == "amd64" -> {
wraps(assembleNativeWindowsAmd64)
}
else -> {
doLast {
throw GradleException(
"Cannot build targeting ${buildInfo.os.name}/${buildInfo.targetArch} with musl=${buildInfo.musl}"
)
}
}
}
}
val testNative by
tasks.registering {
group = "verification"
dependsOn(assembleNative)
if (!buildInfo.isCrossArchSupported && buildInfo.isCrossArch) {
throw GradleException("Cross-arch builds are not supported on ${buildInfo.os.name}")
}
when {
buildInfo.os.isMacOsX && buildInfo.targetArch == "aarch64" -> {
dependsOn(testNativeMacOsAarch64)
}
buildInfo.os.isMacOsX && buildInfo.targetArch == "amd64" -> {
dependsOn(testNativeMacOsAmd64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "aarch64" -> {
dependsOn(testNativeLinuxAarch64)
}
buildInfo.os.isLinux && buildInfo.targetArch == "amd64" -> {
if (buildInfo.musl) dependsOn(testNativeAlpineLinuxAmd64)
else dependsOn(testNativeLinuxAmd64)
}
buildInfo.os.isWindows && buildInfo.targetArch == "amd64" -> {
dependsOn(testNativeWindowsAmd64)
}
else -> {
doLast {
throw GradleException(
"Cannot build targeting ${buildInfo.os.name}/${buildInfo.targetArch} with musl=${buildInfo.musl}"
)
}
}
}
}
val checkNative by
tasks.registering {
group = "verification"
dependsOn(testNative)
}
val buildNative by
tasks.registering {
group = "build"
dependsOn(checkNative)
}
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2025-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2025 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.
@@ -24,7 +24,7 @@ spotless {
target("**/*.pkl") target("**/*.pkl")
addStep(PklFormatterStep(pklFormatter).create()) addStep(PklFormatterStep(pklFormatter).create())
licenseHeaderFile( licenseHeaderFile(
rootProject.file("build-logic/src/main/resources/license-header.line-comment.txt"), rootProject.file("buildSrc/src/main/resources/license-header.line-comment.txt"),
"/// ", "/// ",
) )
// disable ratcheting for Pkl sources // disable ratcheting for Pkl sources
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -16,8 +16,8 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklKotlinTest") pklKotlinTest
} }
sourceSets { sourceSets {
+72
View File
@@ -0,0 +1,72 @@
# 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.
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.graalvm.polyglot:polyglot:25.0.1=testRuntimeClasspath
org.graalvm.sdk:collections:25.0.1=testRuntimeClasspath
org.graalvm.sdk:graal-sdk:25.0.1=testRuntimeClasspath
org.graalvm.sdk:nativeimage:25.0.1=testRuntimeClasspath
org.graalvm.sdk:word:25.0.1=testRuntimeClasspath
org.graalvm.truffle:truffle-api:25.0.1=testRuntimeClasspath
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.10=testRuntimeClasspath
empty=annotationProcessor,apiDependenciesMetadata,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
@@ -255,7 +255,8 @@ String literals are enclosed in double quotes:
"Hello, World!" "Hello, World!"
---- ----
TIP: Except for a few minor differences footnote:[Pkl's string literals have fewer character escape sequences and stricter rules for line indentation in multiline strings.], TIP: Except for a few minor differences footnote:[Pkl's string literals have fewer character escape sequences,
have stricter rules for line indentation in multiline strings, and do not have a line continuation character.],
String literals have the same syntax and semantics as in Swift 5. Learn one of them, know both of them! String literals have the same syntax and semantics as in Swift 5. Learn one of them, know both of them!
Inside a string literal, the following character escape sequences have special meaning: Inside a string literal, the following character escape sequences have special meaning:
@@ -361,23 +362,6 @@ str = """
""" """
---- ----
To prevent line breaks from becoming part of the string's value, use a backslash (`\`) to end those lines.
[source%tested,{pkl}]
----
str = """
Although the Dodo is extinct, \
the species will be remembered.
"""
----
This multiline string is equivalent to the following single-line string:
[source%parsed,{pkl-expr}]
----
"Although the Dodo is extinct, the species will be remembered."
----
[[custom-string-delimiters]] [[custom-string-delimiters]]
=== Custom String Delimiters === Custom String Delimiters
@@ -31,12 +31,6 @@ XXX
Things to watch out for when upgrading. Things to watch out for when upgrading.
=== Removed Java APIs
The following APIs have been removed without replacement.
* `org.pkl.config.java.Config#makeConfig` (pr:https://github.com/apple/pkl/pull/1531[])
.XXX .XXX
[%collapsible] [%collapsible]
==== ====
+30 -28
View File
@@ -1,15 +1,15 @@
[versions] # ordered alphabetically [versions] # ordered alphabetically
assertj = "3.27.7" assertj = "3.+"
checksumPlugin = "1.4.0" checksumPlugin = "1.4.0"
# 5.0.3 is the last version compatible with Kotlin 2.2 clikt = "5.+"
clikt = "5.0.3" commonMark = "0.+"
commonMark = "0.28.0"
downloadTaskPlugin = "5.7.0" downloadTaskPlugin = "5.7.0"
errorProne = "2.48.0" errorProne = "2.48.0"
errorPronePlugin = "5.1.0" errorPronePlugin = "5.1.0"
geantyref = "1.3.16" geantyref = "1.+"
#noinspection UnusedVersionCatalogEntry #noinspection UnusedVersionCatalogEntry
googleJavaFormat = "1.35.0" googleJavaFormat = "1.35.0"
# must not use `+` because used in download URL
# 25.0.2 no longer supports macos-x64 # 25.0.2 no longer supports macos-x64
graalVm = "25.0.1" graalVm = "25.0.1"
#noinspection UnusedVersionCatalogEntry #noinspection UnusedVersionCatalogEntry
@@ -29,25 +29,26 @@ graalVmSha256-windows-x64 = "fde83c5ceec2c75560c747ccd9f314f90e4cf5c5287416e67c4
#noinspection UnusedVersionCatalogEntry #noinspection UnusedVersionCatalogEntry
graalVmSha256-windows-aarch64 = "unavailable" graalVmSha256-windows-aarch64 = "unavailable"
ideaExtPlugin = "1.4.1" ideaExtPlugin = "1.4.1"
javaPoet = "0.14.0" javaPoet = "0.+"
javaxInject = "1" javaxInject = "1"
jimfs = "1.3.1" jimfs = "1.+"
jline = "4.0.12" jline = "4.+"
jmh = "1.37" jmh = "1.+"
jmhPlugin = "0.7.3" jmhPlugin = "0.7.3"
jspecify = "1.0.0" jspecify = "1.0.0"
jsr305 = "3.0.2" jsr305 = "3.+"
junit = "6.0.3" junit = "6.+"
# 1.7+ generates much more verbose code kotlinBom = "2.2.21"
kotlinPoet = "2.3.0"
kotlinStdLib = "2.2.21"
#noinspection UnusedVersionCatalogEntry #noinspection UnusedVersionCatalogEntry
kotlinTarget = "2.2" kotlinTarget = "2.2"
kotlinToolchain = "2.3.20" kotlinToolchain = "2.3.20"
# 1.7+ generates much more verbose code
kotlinPoet = "1.6.+"
kotlinxHtml = "0.12.0" kotlinxHtml = "0.12.0"
# 1.9.0 is the last version compatible with Kotlin 2.2 # 1.8.1 is the last version that supports Kotlin 2.1,
kotlinxSerialization = "1.9.0" # which is the language level currently set in pklKotlinLibrary.
kotlinxCoroutines = "1.10.2" kotlinxSerialization = "1.8.1"
kotlinxCoroutines = "1.+"
#noinspection UnusedVersionCatalogEntry #noinspection UnusedVersionCatalogEntry
ktfmt = "0.62" ktfmt = "0.62"
# replaces nuValidator's log4j dependency # replaces nuValidator's log4j dependency
@@ -55,15 +56,15 @@ ktfmt = "0.62"
log4j = "2.17.1" log4j = "2.17.1"
msgpack = "0.9.11" msgpack = "0.9.11"
nexusPublishPlugin = "2.0.0" nexusPublishPlugin = "2.0.0"
nullaway = "0.13.2" nullaway = "0.13.1"
nullawayPlugin = "3.0.0" nullawayPlugin = "3.0.0"
nuValidator = "26.4.2" nuValidator = "26.+"
paguro = "3.10.3" paguro = "3.+"
shadowPlugin = "9.4.1" shadowPlugin = "9.+"
slf4j = "2.0.17" slf4j = "2.+"
snakeYaml = "3.0.1" snakeYaml = "2.+"
spotlessPlugin = "8.4.0" spotlessPlugin = "8.4.0"
wiremock = "3.13.2" wiremock = "3.+"
[libraries] # ordered alphabetically [libraries] # ordered alphabetically
assertj = { group = "org.assertj", name = "assertj-core", version.ref = "assertj" } assertj = { group = "org.assertj", name = "assertj-core", version.ref = "assertj" }
@@ -93,12 +94,13 @@ junitEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", vers
junitParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" } junitParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" }
#noinspection UnusedVersionCatalogEntry #noinspection UnusedVersionCatalogEntry
junitLauncher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit" } junitLauncher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit" }
#noinspection UnusedVersionCatalogEntry
kotlinBom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlinBom" }
kotlinPlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlinToolchain" } kotlinPlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlinToolchain" }
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 = "kotlinStdLib" } kotlinReflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlinBom" }
kotlinScripting = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-jsr223", version.ref = "kotlinStdLib" } kotlinScripting = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-jsr223", version.ref = "kotlinBom" }
#noinspection UnusedVersionCatalogEntry kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlinBom" }
kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlinStdLib" }
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" }
kotlinxCoroutinesCore = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } kotlinxCoroutinesCore = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
+4
View File
@@ -0,0 +1,4 @@
# 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.
empty=classpath
+1 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
plugins { plugins {
id("pklAllProjects") pklAllProjects
`java-platform` `java-platform`
`maven-publish` `maven-publish`
signing signing
+155
View File
@@ -0,0 +1,155 @@
# 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.
com.ethlo.time:itu:1.14.0=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.20=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-core:2.20.1=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.20.1=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.20.1=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.1=testCompileClasspath,testRuntimeClasspath
com.fasterxml.jackson:jackson-bom:2.20.1=testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-core-jvm:5.1.0=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-core:5.1.0=apiDependenciesMetadata,compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-jvm:5.1.0=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown-jvm:5.1.0=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown:5.1.0=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt:5.1.0=apiDependenciesMetadata,compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core-jvm:3.0.2=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core:3.0.2=apiDependenciesMetadata,compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.2=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.2=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm:3.0.2=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.2=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown:3.0.2=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant:3.0.2=apiDependenciesMetadata,compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.github.jknack:handlebars-helpers:4.3.1=testCompileClasspath,testRuntimeClasspath
com.github.jknack:handlebars:4.3.1=testCompileClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.41.0=testCompileClasspath,testRuntimeClasspath
com.google.guava:failureaccess:1.0.3=testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.5.0-jre=testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.1=testCompileClasspath,testRuntimeClasspath
com.jayway.jsonpath:json-path:2.10.0=testCompileClasspath,testRuntimeClasspath
com.networknt:json-schema-validator:1.5.9=testCompileClasspath,testRuntimeClasspath
commons-fileupload:commons-fileupload:1.6.0=testCompileClasspath,testRuntimeClasspath
commons-io:commons-io:2.19.0=testCompileClasspath,testRuntimeClasspath
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
net.javacrumbs.json-unit:json-unit-core:2.40.1=testCompileClasspath,testRuntimeClasspath
net.minidev:accessors-smart:2.6.0=testRuntimeClasspath
net.minidev:json-smart:2.6.0=testRuntimeClasspath
net.sf.jopt-simple:jopt-simple:5.0.4=testCompileClasspath,testRuntimeClasspath
org.apache.httpcomponents.client5:httpclient5:5.5.1=testCompileClasspath,testRuntimeClasspath
org.apache.httpcomponents.core5:httpcore5-h2:5.3.6=testCompileClasspath,testRuntimeClasspath
org.apache.httpcomponents.core5:httpcore5:5.3.6=testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.eclipse.jetty.http2:http2-common:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.http2:http2-hpack:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.http2:http2-server:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api:5.0.2=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-alpn-client:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-alpn-java-client:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-alpn-java-server:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-alpn-server:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-bom:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-client:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-http:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-io:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-proxy:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-security:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-server:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-servlet:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-servlets:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-util:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-webapp:11.0.26=testCompileClasspath,testRuntimeClasspath
org.eclipse.jetty:jetty-xml:11.0.26=testCompileClasspath,testRuntimeClasspath
org.graalvm.polyglot:polyglot:25.0.1=compileClasspath,compileOnlyDependenciesMetadata,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.graalvm.sdk:collections:25.0.1=compileClasspath,compileOnlyDependenciesMetadata,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.graalvm.sdk:graal-sdk:25.0.1=compileClasspath,compileOnlyDependenciesMetadata,nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:jniutils:25.0.1=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.graalvm.sdk:nativeimage:25.0.1=compileClasspath,compileOnlyDependenciesMetadata,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.graalvm.sdk:word:25.0.1=compileClasspath,compileOnlyDependenciesMetadata,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-api:25.0.1=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-compiler:25.0.1=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-runtime:25.0.1=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest-core:2.2=testCompileClasspath,testRuntimeClasspath
org.hamcrest:hamcrest:2.2=testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=apiDependenciesMetadata,compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=apiDependenciesMetadata,compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=apiDependenciesMetadata,swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-stdlib:2.3.0=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,nativeImageClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains:markdown-jvm:0.7.3=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
org.jetbrains:markdown:0.7.3=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
org.jline:jline-native:4.0.12=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jline:jline-reader:4.0.12=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jline:jline-terminal-jni:4.0.12=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jline:jline-terminal:4.0.12=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=compileClasspath,nativeImageClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.organicdesign:Paguro:3.10.3=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
org.slf4j:slf4j-api:2.0.17=testCompileClasspath,testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.10=nativeImageClasspath,runtimeClasspath,testRuntimeClasspath
org.wiremock:wiremock:3.13.2=testCompileClasspath,testRuntimeClasspath
org.xmlunit:xmlunit-core:2.11.0=testCompileClasspath,testRuntimeClasspath
org.xmlunit:xmlunit-legacy:2.11.0=testCompileClasspath,testRuntimeClasspath
org.xmlunit:xmlunit-placeholders:2.11.0=testCompileClasspath,testRuntimeClasspath
org.yaml:snakeyaml:2.4=testCompileClasspath,testRuntimeClasspath
empty=annotationProcessor,implementationDependenciesMetadata,intransitiveDependenciesMetadata,javaExecutable,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,shadow,signatures,sourcesJar,stagedAlpineLinuxAmd64Executable,stagedLinuxAarch64Executable,stagedLinuxAmd64Executable,stagedMacAarch64Executable,stagedMacAmd64Executable,stagedWindowsAmd64Executable,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
+6 -6
View File
@@ -18,14 +18,14 @@ import java.io.OutputStream
import org.gradle.kotlin.dsl.support.serviceOf import org.gradle.kotlin.dsl.support.serviceOf
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklKotlinLibrary") pklKotlinLibrary
id("pklPublishLibrary") pklPublishLibrary
id("pklJavaExecutable") pklJavaExecutable
id("pklNativeExecutable") pklNativeExecutable
`maven-publish` `maven-publish`
// already on build script class path (see build-logic/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
id(libs.plugins.shadow.get().pluginId) id(libs.plugins.shadow.get().pluginId)
+97
View File
@@ -0,0 +1,97 @@
# 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.
com.github.ajalt.clikt:clikt-core-jvm:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-core:5.1.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-jvm:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown-jvm:5.1.0=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown:5.1.0=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt:5.1.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core-jvm:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core:3.0.2=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant:3.0.2=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
com.palantir.javapoet:javapoet:0.14.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.graalvm.polyglot:polyglot:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:collections:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:graal-sdk:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:nativeimage:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:word:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-api:25.0.1=runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=apiDependenciesMetadata,swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-stdlib:2.3.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=runtimeClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.10=runtimeClasspath,testRuntimeClasspath
empty=annotationProcessor,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,shadow,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
+7 -7
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -14,18 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklKotlinLibrary") pklKotlinLibrary
id("pklPublishLibrary") pklPublishLibrary
id("pklJavaExecutable") pklJavaExecutable
} }
dependencies { dependencies {
// CliJavaCodeGeneratorOptions exposes pkl-commons-cli and pkl-base // CliJavaCodeGeneratorOptions exposes CliBaseOptions
api(projects.pklCommonsCli) api(projects.pklCommonsCli)
api(projects.pklCore)
implementation(projects.pklCommons) implementation(projects.pklCommons)
implementation(projects.pklCore)
implementation(libs.javaPoet) implementation(libs.javaPoet)
testImplementation(projects.pklConfigJava) testImplementation(projects.pklConfigJava)
+102
View File
@@ -0,0 +1,102 @@
# 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.
com.github.ajalt.clikt:clikt-core-jvm:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-core:5.1.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-jvm:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown-jvm:5.1.0=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown:5.1.0=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt:5.1.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core-jvm:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core:3.0.2=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant:3.0.2=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
com.squareup:kotlinpoet:1.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.graalvm.polyglot:polyglot:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:collections:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:graal-sdk:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:nativeimage:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:word:25.0.1=runtimeClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-api:25.0.1=runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=compileClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.2.21=testRuntimeClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.2.21=testRuntimeClasspath
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.2.21=testRuntimeClasspath
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jsr223:2.2.21=testRuntimeClasspath
org.jetbrains.kotlin:kotlin-scripting-jvm-host:2.2.21=testRuntimeClasspath
org.jetbrains.kotlin:kotlin-scripting-jvm:2.2.21=testRuntimeClasspath
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=apiDependenciesMetadata,swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-stdlib:2.3.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable,testRuntimeClasspath
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=runtimeClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.10=runtimeClasspath,testRuntimeClasspath
empty=annotationProcessor,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,shadow,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklKotlinLibrary") pklKotlinLibrary
id("pklPublishLibrary") pklPublishLibrary
id("pklJavaExecutable") pklJavaExecutable
} }
publishing { publishing {
+108
View File
@@ -0,0 +1,108 @@
# 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.
com.github.ajalt.clikt:clikt-core-jvm:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-core:5.1.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-jvm:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown-jvm:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt-markdown:5.1.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.clikt:clikt:5.1.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath-jvm:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.colormath:colormath:3.6.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core-jvm:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-core:3.0.2=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm-jna:3.0.2=runtimeClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-jvm:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant-markdown:3.0.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ajalt.mordant:mordant:3.0.2=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.graalvm.compiler:compiler:25.0.1=svmClasspath
org.graalvm.espresso:espresso-svm:25.0.1=svmClasspath
org.graalvm.nativeimage:native-image-base:25.0.1=svmClasspath
org.graalvm.nativeimage:objectfile:25.0.1=svmClasspath
org.graalvm.nativeimage:pointsto:25.0.1=svmClasspath
org.graalvm.nativeimage:svm-capnproto-runtime:25.0.1=svmClasspath
org.graalvm.nativeimage:svm-configure:25.0.1=svmClasspath
org.graalvm.nativeimage:svm:25.0.1=svmClasspath
org.graalvm.nativeimage:truffle-runtime-svm:25.0.1=svmClasspath
org.graalvm.polyglot:polyglot:25.0.1=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.graalvm.sdk:collections:25.0.1=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.graalvm.sdk:graal-sdk:25.0.1=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.graalvm.sdk:jniutils:25.0.1=svmClasspath
org.graalvm.sdk:nativeimage-libgraal:25.0.1=svmClasspath
org.graalvm.sdk:nativeimage:25.0.1=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.graalvm.sdk:word:25.0.1=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-api:25.0.1=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-compiler:25.0.1=svmClasspath
org.graalvm.truffle:truffle-runtime:25.0.1=svmClasspath
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,runtimeClasspath,svmClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=apiDependenciesMetadata,swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-stdlib:2.3.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=runtimeClasspath,svmClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.organicdesign:Paguro:3.10.3=runtimeClasspath,svmClasspath,testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.10=runtimeClasspath,svmClasspath,testRuntimeClasspath
empty=annotationProcessor,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,signatures,sourcesJar,svmAnnotationProcessor,svmApiDependenciesMetadata,svmCompileClasspath,svmCompileOnlyDependenciesMetadata,svmImplementationDependenciesMetadata,svmIntransitiveDependenciesMetadata,svmKotlinScriptDefExtensions,svmRuntimeClasspath,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
+4 -4
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklKotlinLibrary") pklKotlinLibrary
id("pklPublishLibrary") pklPublishLibrary
} }
val svmClasspath: Configuration by configurations.creating val svmClasspath: Configuration by configurations.creating
+63
View File
@@ -0,0 +1,63 @@
# 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.
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=apiDependenciesMetadata,compileClasspath,testCompileClasspath
org.assertj:assertj-core:3.27.7=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=apiDependenciesMetadata,compileClasspath,testCompileClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
empty=annotationProcessor,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
+3 -3
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -16,8 +16,8 @@
import java.security.MessageDigest import java.security.MessageDigest
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklKotlinLibrary") pklKotlinLibrary
} }
// note: no need to publish this library // note: no need to publish this library
+62
View File
@@ -0,0 +1,62 @@
# 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.
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=apiDependenciesMetadata,compileClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,runtimeClasspath,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=testCompileClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
empty=annotationProcessor,compileOnlyDependenciesMetadata,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
+4 -4
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklKotlinLibrary") pklKotlinLibrary
id("pklPublishLibrary") pklPublishLibrary
} }
publishing { publishing {
+98
View File
@@ -0,0 +1,98 @@
# 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.
com.github.ajalt.clikt:clikt-core-jvm:5.1.0=pklCodegenJava
com.github.ajalt.clikt:clikt-core:5.1.0=pklCodegenJava
com.github.ajalt.clikt:clikt-jvm:5.1.0=pklCodegenJava
com.github.ajalt.clikt:clikt-markdown-jvm:5.1.0=pklCodegenJava
com.github.ajalt.clikt:clikt-markdown:5.1.0=pklCodegenJava
com.github.ajalt.clikt:clikt:5.1.0=pklCodegenJava
com.github.ajalt.colormath:colormath-jvm:3.6.0=pklCodegenJava
com.github.ajalt.colormath:colormath:3.6.0=pklCodegenJava
com.github.ajalt.mordant:mordant-core-jvm:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-core:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-jvm-ffm-jvm:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-jvm-ffm:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-jvm-graal-ffi-jvm:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-jvm-graal-ffi:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-jvm-jna-jvm:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-jvm-jna:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-jvm:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-markdown-jvm:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant-markdown:3.0.2=pklCodegenJava
com.github.ajalt.mordant:mordant:3.0.2=pklCodegenJava
com.github.ben-manes.caffeine:caffeine:2.9.3=swiftExportClasspathResolvable
com.google.errorprone:error_prone_annotations:2.28.0=swiftExportClasspathResolvable
com.palantir.javapoet:javapoet:0.14.0=pklCodegenJava
io.github.java-diff-utils:java-diff-utils:4.12=kotlinInternalAbiValidation
io.leangen.geantyref:geantyref:1.3.16=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.opentelemetry:opentelemetry-api:1.41.0=swiftExportClasspathResolvable
io.opentelemetry:opentelemetry-context:1.41.0=swiftExportClasspathResolvable
javax.inject:javax.inject:1=testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.18.3=testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.14.0=pklCodegenJava
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.assertj:assertj-core:3.27.7=testCompileClasspath,testRuntimeClasspath
org.bouncycastle:bcpg-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcpkix-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcprov-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.bouncycastle:bcutil-jdk18on:1.80=kotlinBouncyCastleConfiguration
org.checkerframework:checker-qual:3.43.0=swiftExportClasspathResolvable
org.graalvm.polyglot:polyglot:25.0.1=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:collections:25.0.1=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:graal-sdk:25.0.1=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:nativeimage:25.0.1=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
org.graalvm.sdk:word:25.0.1=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
org.graalvm.truffle:truffle-api:25.0.1=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
org.jetbrains.kotlin:abi-tools-api:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:abi-tools:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-bom:2.2.21=compileClasspath,pklCodegenJava,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-build-tools-api:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-compat:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-cri-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-build-tools-impl:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-compiler-runner:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-client:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-klib-abi-reader:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.3.20=kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.20=kotlinInternalAbiValidation
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-reflect:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlin:kotlin-script-runtime:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-scripting-common:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-scripting-jvm:2.3.20=kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.21=pklCodegenJava,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.21=pklCodegenJava,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.2.21=swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains.kotlin:kotlin-stdlib:2.3.0=pklCodegenJava
org.jetbrains.kotlin:kotlin-stdlib:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath
org.jetbrains.kotlin:kotlin-tooling-core:2.3.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath
org.jetbrains.kotlin:swift-export-embeddable:2.2.21=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath,swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3=swiftExportClasspathResolvable
org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3=swiftExportClasspathResolvable
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinInternalAbiValidation,kotlinKlibCommonizerClasspath,pklCodegenJava,swiftExportClasspathResolvable,testCompileClasspath,testRuntimeClasspath
org.jetbrains:markdown-jvm:0.7.3=pklCodegenJava
org.jetbrains:markdown:0.7.3=pklCodegenJava
org.jspecify:jspecify:1.0.0=pklCodegenJava,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:6.0.3=testRuntimeClasspath
org.junit.jupiter:junit-jupiter-params:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-commons:6.0.3=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:6.0.3=testRuntimeClasspath
org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath
org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath
org.msgpack:msgpack-core:0.9.11=compileClasspath,pklCodegenJava,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
org.organicdesign:Paguro:3.10.3=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
org.snakeyaml:snakeyaml-engine:2.10=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
empty=annotationProcessor,apiDependenciesMetadata,compileOnlyDependenciesMetadata,fatJar,firstPartySourcesJars,implementationDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,shadow,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
+5 -6
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -14,11 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
plugins { plugins {
id("pklAllProjects") pklAllProjects
id("pklJavaLibrary") pklJavaLibrary
id("pklFatJar") pklFatJar
id("pklPublishLibrary") pklPublishLibrary
id("pklJSpecify")
signing signing
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -17,17 +17,18 @@ package org.pkl.config.java;
import java.io.InputStream; import java.io.InputStream;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import org.jspecify.annotations.Nullable; import java.util.Map;
import org.pkl.config.java.mapper.ConversionException; import org.pkl.config.java.mapper.ConversionException;
import org.pkl.config.java.mapper.ValueMapper; import org.pkl.config.java.mapper.ValueMapper;
import org.pkl.core.Composite;
import org.pkl.core.Evaluator; import org.pkl.core.Evaluator;
import org.pkl.core.PklBinaryDecoder;
/** /**
* A root, intermediate, or leaf node in a configuration tree. Child nodes can be obtained by name * A root, intermediate, or leaf node in a configuration tree. Child nodes can be obtained by name
* using {@link #get(String)}. To consume the node's composite or scalar value, convert the value to * using {@link #get(String)}. To consume the node's composite or scalar value, convert the value to
* the desired Java type, using one of the provided {@link #as} methods. * the desired Java type, using one of the provided {@link #as} methods.
*/ */
@SuppressWarnings({"DeprecatedIsStillUsed"})
public interface Config { public interface Config {
/** /**
* The dot-separated name of this node. For example, the node reached using {@code * The dot-separated name of this node. For example, the node reached using {@code
@@ -54,7 +55,7 @@ public interface Config {
* *
* @throws ConversionException if the value cannot be converted to the given type * @throws ConversionException if the value cannot be converted to the given type
*/ */
<T extends @Nullable Object> T as(Class<T> type); <T> T as(Class<T> type);
/** /**
* Converts this node's value to the given {@link Type}. * Converts this node's value to the given {@link Type}.
@@ -63,60 +64,59 @@ public interface Config {
* *
* @throws ConversionException if the value cannot be converted to the given type * @throws ConversionException if the value cannot be converted to the given type
*/ */
<T extends @Nullable Object> T as(Type type); <T> T as(Type type);
/** /**
* Converts this node's value to the given {@link JavaType}. * Converts this node's value to the given {@link JavaType}.
* *
* @throws ConversionException if the value cannot be converted to the given type * @throws ConversionException if the value cannot be converted to the given type
*/ */
<T extends @Nullable Object> T as(JavaType<T> type); <T> T as(JavaType<T> type);
/** /**
* Decodes a config from the supplied byte array. * Decode a config from the supplied byte array.
* *
* @return the decoded config * @return the encoded config
* @deprecated Use {@code ConfigDecoderBuilder...build().decode(bytes)} instead. For a direct
* equivalent, use {@code ConfigDecoder.preconfigured().setValueMapper(mapper).decode(bytes)}.
*/ */
@Deprecated(forRemoval = true)
static Config fromPklBinary(byte[] bytes, ValueMapper mapper) { static Config fromPklBinary(byte[] bytes, ValueMapper mapper) {
return ConfigDecoder.preconfigured().setValueMapper(mapper).decode(bytes); return makeConfig(PklBinaryDecoder.decode(bytes), mapper);
} }
/** /**
* Decodes a config from the supplied byte array using a preconfigured {@link ValueMapper}. * Decode a config from the supplied byte array using a preconfigured {@link ValueMapper}.
* *
* @return the decoded config * @return the encoded config
* @deprecated Use {@code ConfigDecoder.preconfigured().decode(bytes)} instead.
*/ */
@Deprecated(forRemoval = true)
static Config fromPklBinary(byte[] bytes) { static Config fromPklBinary(byte[] bytes) {
return ConfigDecoder.preconfigured().decode(bytes); return fromPklBinary(bytes, ValueMapper.preconfigured());
} }
/** /**
* Decodes a config from the supplied {@link InputStream} using a preconfigured {@link * Decode a config from the supplied {@link InputStream} using a preconfigured {@link
* ValueMapper}. * ValueMapper}.
* *
* @return the decoded config * @return the encoded config
* @deprecated Use {@code ConfigDecoderBuilder...build().decode(inputStream)} instead. For a
* direct equivalent, use {@code
* ConfigDecoder.preconfigured().setValueMapper(mapper).decode(inputStream)}.
*/ */
@Deprecated(forRemoval = true)
static Config fromPklBinary(InputStream inputStream, ValueMapper mapper) { static Config fromPklBinary(InputStream inputStream, ValueMapper mapper) {
return ConfigDecoder.preconfigured().setValueMapper(mapper).decode(inputStream); return makeConfig(PklBinaryDecoder.decode(inputStream), mapper);
} }
/** /**
* Decodes a config from the supplied {@link InputStream}. * Decode a config from the supplied {@link InputStream}.
* *
* @return the decoded config * @return the encoded config
* @deprecated Use {@code ConfigDecoder.preconfigured().decode(inputStream)} instead.
*/ */
@Deprecated(forRemoval = true)
static Config fromPklBinary(InputStream inputStream) { static Config fromPklBinary(InputStream inputStream) {
return ConfigDecoder.preconfigured().decode(inputStream); return fromPklBinary(inputStream, ValueMapper.preconfigured());
}
static Config makeConfig(Object decoded, ValueMapper mapper) {
if (decoded instanceof Composite composite) {
return new CompositeConfig("", mapper, composite);
}
if (decoded instanceof Map<?, ?> map) {
return new MapConfig("", mapper, map);
}
return new LeafConfig("", mapper, decoded);
} }
} }
@@ -1,62 +0,0 @@
/*
* Copyright © 2026 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.
*/
package org.pkl.config.java;
import java.io.InputStream;
import org.pkl.config.java.mapper.ValueMapper;
/** Decodes Pkl binary data into {@link Config} objects. */
public interface ConfigDecoder {
/**
* Returns a preconfigured decoder that uses {@link ValueMapper#preconfigured()}.
*
* <p>For more control over configuration, use {@link ConfigDecoderBuilder}.
*
* @return a preconfigured decoder
*/
static ConfigDecoder preconfigured() {
return ConfigDecoderBuilder.preconfigured().build();
}
ValueMapper getValueMapper();
/**
* Returns a copy of this decoder with the supplied value mapper.
*
* @param mapper the value mapper to use
* @return a decoder with the supplied value mapper
*/
ConfigDecoder setValueMapper(ValueMapper mapper);
/**
* Decodes configuration from the supplied byte array.
*
* @param bytes the data to decode
* @return the decoded configuration
*/
Config decode(byte[] bytes);
/**
* Decodes configuration from the supplied input stream.
*
* <p>This method does not close the stream; the caller is responsible for closing it.
*
* @param inputStream the data to decode
* @return the decoded configuration
*/
Config decode(InputStream inputStream);
}
@@ -1,79 +0,0 @@
/*
* Copyright © 2026 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.
*/
package org.pkl.config.java;
import org.pkl.config.java.mapper.ValueMapperBuilder;
/**
* Builder for {@link ConfigDecoder} instances.
*
* <p>Use {@link #preconfigured()} to obtain a preconfigured builder, or {@link #unconfigured()} for
* full control over its configuration.
*/
public final class ConfigDecoderBuilder {
private ValueMapperBuilder mapperBuilder;
private ConfigDecoderBuilder(ValueMapperBuilder mapperBuilder) {
this.mapperBuilder = mapperBuilder;
}
/**
* Returns a preconfigured builder that uses {@link ValueMapperBuilder#preconfigured()}.
*
* @return a preconfigured builder
*/
public static ConfigDecoderBuilder preconfigured() {
return new ConfigDecoderBuilder(ValueMapperBuilder.preconfigured());
}
/**
* Returns an unconfigured builder that uses {@link ValueMapperBuilder#unconfigured()}.
*
* @return an unconfigured builder
*/
public static ConfigDecoderBuilder unconfigured() {
return new ConfigDecoderBuilder(ValueMapperBuilder.unconfigured());
}
/**
* Returns the value mapper builder used by this decoder builder.
*
* @return the value mapper builder
*/
public ValueMapperBuilder getValueMapperBuilder() {
return mapperBuilder;
}
/**
* Sets the value mapper builder used by this decoder builder.
*
* @param mapperBuilder the value mapper builder to use
* @return this builder
*/
public ConfigDecoderBuilder setValueMapperBuilder(ValueMapperBuilder mapperBuilder) {
this.mapperBuilder = mapperBuilder;
return this;
}
/**
* Builds a {@link ConfigDecoder} using the current configuration.
*
* @return the configured decoder
*/
public ConfigDecoder build() {
return new ConfigDecoderImpl(mapperBuilder.build());
}
}
@@ -1,48 +0,0 @@
/*
* Copyright © 2026 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.
*/
package org.pkl.config.java;
import java.io.InputStream;
import org.pkl.config.java.mapper.ValueMapper;
import org.pkl.core.PklBinaryDecoder;
final class ConfigDecoderImpl implements ConfigDecoder {
private final ValueMapper mapper;
ConfigDecoderImpl(ValueMapper mapper) {
this.mapper = mapper;
}
@Override
public ValueMapper getValueMapper() {
return mapper;
}
@Override
public ConfigDecoder setValueMapper(ValueMapper mapper) {
return new ConfigDecoderImpl(mapper);
}
@Override
public Config decode(byte[] bytes) {
return ConfigUtils.createConfig(PklBinaryDecoder.decode(bytes), mapper);
}
@Override
public Config decode(InputStream inputStream) {
return ConfigUtils.createConfig(PklBinaryDecoder.decode(inputStream), mapper);
}
}
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -21,7 +21,6 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.jspecify.annotations.Nullable;
import org.pkl.config.java.mapper.ValueMapperBuilder; import org.pkl.config.java.mapper.ValueMapperBuilder;
import org.pkl.core.EvaluatorBuilder; import org.pkl.core.EvaluatorBuilder;
import org.pkl.core.SecurityManager; import org.pkl.core.SecurityManager;
@@ -29,6 +28,7 @@ import org.pkl.core.StackFrameTransformer;
import org.pkl.core.http.HttpClient; import org.pkl.core.http.HttpClient;
import org.pkl.core.project.DeclaredDependencies; import org.pkl.core.project.DeclaredDependencies;
import org.pkl.core.project.Project; import org.pkl.core.project.Project;
import org.pkl.core.util.Nullable;
/** A builder for {@link ConfigEvaluator}s. */ /** A builder for {@link ConfigEvaluator}s. */
@SuppressWarnings({"UnusedReturnValue", "unused"}) @SuppressWarnings({"UnusedReturnValue", "unused"})
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -15,8 +15,6 @@
*/ */
package org.pkl.config.java; package org.pkl.config.java;
import static org.pkl.config.java.ConfigUtils.createConfig;
import org.pkl.config.java.mapper.ValueMapper; import org.pkl.config.java.mapper.ValueMapper;
import org.pkl.core.Evaluator; import org.pkl.core.Evaluator;
import org.pkl.core.ModuleSource; import org.pkl.core.ModuleSource;
@@ -39,13 +37,13 @@ final class ConfigEvaluatorImpl implements ConfigEvaluator {
@Override @Override
public Config evaluateOutputValue(ModuleSource moduleSource) { public Config evaluateOutputValue(ModuleSource moduleSource) {
var value = evaluator.evaluateOutputValue(moduleSource); var value = evaluator.evaluateOutputValue(moduleSource);
return createConfig(value, mapper); return Config.makeConfig(value, mapper);
} }
@Override @Override
public Config evaluateExpression(ModuleSource moduleSource, String expression) { public Config evaluateExpression(ModuleSource moduleSource, String expression) {
var value = evaluator.evaluateExpression(moduleSource, expression); var value = evaluator.evaluateExpression(moduleSource, expression);
return createConfig(value, mapper); return Config.makeConfig(value, mapper);
} }
@Override @Override
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -18,9 +18,9 @@ package org.pkl.config.java;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.*; import java.util.*;
import org.jspecify.annotations.Nullable;
import org.pkl.config.java.mapper.Types; import org.pkl.config.java.mapper.Types;
import org.pkl.core.Pair; import org.pkl.core.Pair;
import org.pkl.core.util.Nullable;
/** /**
* Runtime representation of a possibly parameterized Java type. Factory methods are provided to * Runtime representation of a possibly parameterized Java type. Factory methods are provided to
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -20,10 +20,10 @@ import java.io.UncheckedIOException;
import java.util.HashSet; import java.util.HashSet;
import java.util.Properties; import java.util.Properties;
import java.util.Set; import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.pkl.config.java.InvalidMappingException; import org.pkl.config.java.InvalidMappingException;
import org.pkl.core.PClassInfo; import org.pkl.core.PClassInfo;
import org.pkl.core.util.IoUtils; import org.pkl.core.util.IoUtils;
import org.pkl.core.util.Nullable;
/** /**
* Describes mappings of Pkl class names to their corresponding Java classes. * Describes mappings of Pkl class names to their corresponding Java classes.
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -15,15 +15,13 @@
*/ */
package org.pkl.config.java.mapper; package org.pkl.config.java.mapper;
import org.jspecify.annotations.Nullable;
/** Thrown when a {@link ValueMapper} conversion fails. */ /** Thrown when a {@link ValueMapper} conversion fails. */
public class ConversionException extends RuntimeException { public class ConversionException extends RuntimeException {
public ConversionException(String message) { public ConversionException(String message) {
super(message); super(message);
} }
public ConversionException(String message, @Nullable Throwable cause) { public ConversionException(String message, Throwable cause) {
super(message, cause); super(message, cause);
} }
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -15,8 +15,6 @@
*/ */
package org.pkl.config.java.mapper; package org.pkl.config.java.mapper;
import org.jspecify.annotations.Nullable;
/** /**
* Converter for a particular source and target type. * Converter for a particular source and target type.
* *
@@ -24,7 +22,7 @@ import org.jspecify.annotations.Nullable;
* @param <T> the converter's target type * @param <T> the converter's target type
*/ */
@FunctionalInterface @FunctionalInterface
public interface Converter<S, T extends @Nullable Object> { public interface Converter<S, T> {
/** /**
* Converts the given value. The given {@link ValueMapper} can be used to convert nested values of * Converts the given value. The given {@link ValueMapper} can be used to convert nested values of
* composite values (objects, collections, etc.). * composite values (objects, collections, etc.).
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -19,8 +19,8 @@ import java.lang.reflect.Array;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.Collection; import java.util.Collection;
import java.util.Optional; import java.util.Optional;
import org.jspecify.annotations.Nullable;
import org.pkl.core.PClassInfo; import org.pkl.core.PClassInfo;
import org.pkl.core.util.Nullable;
final class PCollectionToArray implements ConverterFactory { final class PCollectionToArray implements ConverterFactory {
@Override @Override
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -23,8 +23,8 @@ import java.lang.reflect.Type;
import java.util.Collection; import java.util.Collection;
import java.util.Optional; import java.util.Optional;
import java.util.function.Function; import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.pkl.core.PClassInfo; import org.pkl.core.PClassInfo;
import org.pkl.core.util.Nullable;
class PCollectionToCollection implements ConverterFactory { class PCollectionToCollection implements ConverterFactory {
private static final Lookup lookup = MethodHandles.lookup(); private static final Lookup lookup = MethodHandles.lookup();
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -24,8 +24,8 @@ import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.Properties; import java.util.Properties;
import java.util.function.Function; import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.pkl.core.PClassInfo; import org.pkl.core.PClassInfo;
import org.pkl.core.util.Nullable;
class PMapToMap implements ConverterFactory { class PMapToMap implements ConverterFactory {
private static final Lookup lookup = MethodHandles.lookup(); private static final Lookup lookup = MethodHandles.lookup();
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -22,10 +22,10 @@ import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup; import java.lang.invoke.MethodHandles.Lookup;
import java.lang.reflect.*; import java.lang.reflect.*;
import java.util.*; import java.util.*;
import org.jspecify.annotations.Nullable;
import org.pkl.core.Composite; import org.pkl.core.Composite;
import org.pkl.core.PClassInfo; import org.pkl.core.PClassInfo;
import org.pkl.core.PObject; import org.pkl.core.PObject;
import org.pkl.core.util.Nullable;
public class PObjectToDataObject implements ConverterFactory { public class PObjectToDataObject implements ConverterFactory {
private static final Lookup lookup = MethodHandles.lookup(); private static final Lookup lookup = MethodHandles.lookup();
@@ -156,7 +156,7 @@ public class PObjectToDataObject implements ConverterFactory {
private final MethodHandle constructorHandle; private final MethodHandle constructorHandle;
private final Collection<Tuple2<String, Type>> parameters; private final Collection<Tuple2<String, Type>> parameters;
private final PClassInfo<Object>[] cachedPropertyTypes; private final PClassInfo<Object>[] cachedPropertyTypes;
private final @Nullable Converter<Object, T>[] cachedConverters; private final Converter<Object, T>[] cachedConverters;
ConverterImpl( ConverterImpl(
Type targetType, Type targetType,
@@ -172,7 +172,7 @@ public class PObjectToDataObject implements ConverterFactory {
Arrays.fill(cachedPropertyTypes, PClassInfo.Unavailable); Arrays.fill(cachedPropertyTypes, PClassInfo.Unavailable);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Nullable Converter<Object, T>[] cachedConverters = new Converter[parameters.size()]; Converter<Object, T>[] cachedConverters = new Converter[parameters.size()];
this.cachedConverters = cachedConverters; this.cachedConverters = cachedConverters;
} }
@@ -203,9 +203,8 @@ public class PObjectToDataObject implements ConverterFactory {
cachedPropertyTypes[i] = cachedPropertyType; cachedPropertyTypes[i] = cachedPropertyType;
cachedConverters[i] = valueMapper.getConverter(cachedPropertyType, param.second); cachedConverters[i] = valueMapper.getConverter(cachedPropertyType, param.second);
} }
var cachedConverter = cachedConverters[i]; assert cachedConverters[i] != null;
assert cachedConverter != null; args[i] = cachedConverters[i].convert(property, valueMapper);
args[i] = cachedConverter.convert(property, valueMapper);
i += 1; i += 1;
} catch (ConversionException e) { } catch (ConversionException e) {
throw new ConversionException( throw new ConversionException(
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -18,9 +18,9 @@ package org.pkl.config.java.mapper;
import java.lang.reflect.ParameterizedType; import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.Optional; import java.util.Optional;
import org.jspecify.annotations.Nullable;
import org.pkl.core.PClassInfo; import org.pkl.core.PClassInfo;
import org.pkl.core.Pair; import org.pkl.core.Pair;
import org.pkl.core.util.Nullable;
final class PPairToPair implements ConverterFactory { final class PPairToPair implements ConverterFactory {
@Override @Override
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -46,16 +46,12 @@ final class PStringToEnum implements ConverterFactory {
if (enumType == DataSizeUnit.class) { if (enumType == DataSizeUnit.class) {
for (var value : values) { for (var value : values) {
var unit = (DataSizeUnit) value; var unit = (DataSizeUnit) value;
var name = CodeGeneratorUtils.toEnumConstantName(unit.getSymbol()); enumValuesByName.put(CodeGeneratorUtils.toEnumConstantName(unit.getSymbol()), value);
assert name != null;
enumValuesByName.put(name, value);
} }
} else if (enumType == DurationUnit.class) { } else if (enumType == DurationUnit.class) {
for (var value : values) { for (var value : values) {
var unit = (DurationUnit) value; var unit = (DurationUnit) value;
var name = CodeGeneratorUtils.toEnumConstantName(unit.getSymbol()); enumValuesByName.put(CodeGeneratorUtils.toEnumConstantName(unit.getSymbol()), value);
assert name != null;
enumValuesByName.put(name, value);
} }
} else { } else {
for (Enum<?> value : values) { for (Enum<?> value : values) {
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -20,7 +20,7 @@ import static java.util.Arrays.stream;
import io.leangen.geantyref.CaptureType; import io.leangen.geantyref.CaptureType;
import io.leangen.geantyref.GenericTypeReflector; import io.leangen.geantyref.GenericTypeReflector;
import java.lang.reflect.*; import java.lang.reflect.*;
import org.jspecify.annotations.Nullable; import org.pkl.core.util.Nullable;
/** /**
* Reflection utilities for implementing {@link ConverterFactory}s. Mostly covers introspection of * Reflection utilities for implementing {@link ConverterFactory}s. Mostly covers introspection of
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -16,7 +16,7 @@
package org.pkl.config.java.mapper; package org.pkl.config.java.mapper;
import java.util.Objects; import java.util.Objects;
import org.jspecify.annotations.Nullable; import org.pkl.core.util.Nullable;
// avoid name clash with org.pkl.core.Pair // avoid name clash with org.pkl.core.Pair
final class Tuple2<S, T> { final class Tuple2<S, T> {
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -16,7 +16,7 @@
package org.pkl.config.java.mapper; package org.pkl.config.java.mapper;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import org.jspecify.annotations.Nullable; import org.pkl.core.util.Nullable;
/** /**
* Maps a type requested during conversion to the implementation type to be instantiated. The * Maps a type requested during conversion to the implementation type to be instantiated. The
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -16,7 +16,6 @@
package org.pkl.config.java.mapper; package org.pkl.config.java.mapper;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import org.jspecify.annotations.Nullable;
import org.pkl.core.PClassInfo; import org.pkl.core.PClassInfo;
import org.pkl.core.PModule; import org.pkl.core.PModule;
@@ -31,40 +30,38 @@ public interface ValueMapper {
} }
/** /**
* Converts the given Pkl value to the given Java target type. The Pkl value can be an entire * Converts the given Pkl object to the given Java target type. The Pkl object can be an entire
* {@link PModule} or any value contained therein. See {@link PClassInfo#forValue} for which Java * {@link PModule} or any value contained therein. See {@link PClassInfo#forValue} for which Java
* types are used to represent Pkl values. * types are used to represent Pkl objects.
* *
* <p>When mapping to a generic target type, a fully parameterized type needs to be passed, e.g. * <p>When mapping to a generic target type, a fully parameterized type needs to be passed, e.g.
* {@code List<String>}. Parameterized type literals can be created using {@link Types}, e.g. * {@code List<String>}. Parameterized type literals can be created using {@link Types}, e.g.
* {@code Types.listOf(String.class)}. * {@code Types.listOf(String.class)}.
* *
* <p>If an error occurs during conversion, or if {@link ValueMapper} does not know how to convert * <p>If an error occurs during conversion, or if {@link ValueMapper} does not know how to convert
* from the given Pkl value to the given target type, a {@link ConversionException} is thrown. * from the given object to the given target type, a {@link ConversionException} is thrown.
*/ */
<S, T extends @Nullable Object> T map(S value, Type targetType); <S, T> T map(S model, Type targetType);
/** /**
* Same as {@link #map(Object, Type)}, except that the target type is narrowed from {@link Type} * Same as {@link #map(Object, Type)}, except that the target type is narrowed from {@link Type}
* to {@link Class} to allow for better type inference. * to {@link Class} to allow for better type inference.
*/ */
default <S, T extends @Nullable Object> T map(S value, Class<T> targetType) { default <S, T> T map(S model, Class<T> targetType) {
return map(value, (Type) targetType); return map(model, (Type) targetType);
} }
/** /**
* Returns the converter with the given source and target types. Throws {@link * Returns the converter with the given source and target types. Throws {@link
* ConversionException} if no such converter exists. * ConversionException} if no such converter exists.
*/ */
<S, T extends @Nullable Object> Converter<S, T> getConverter( <S, T> Converter<S, T> getConverter(PClassInfo<S> sourceType, Type targetType);
PClassInfo<S> sourceType, Type targetType);
/** /**
* Same as {@link #getConverter(PClassInfo, Type)}, except that the target type is narrowed from * Same as {@link #getConverter(PClassInfo, Type)}, except that the target type is narrowed from
* {@link Type} to {@link Class} to allow for better type inference. * {@link Type} to {@link Class} to allow for better type inference.
*/ */
default <S, T extends @Nullable Object> Converter<S, T> getConverter( default <S, T> Converter<S, T> getConverter(PClassInfo<S> sourceType, Class<T> targetType) {
PClassInfo<S> sourceType, Class<T> targetType) {
return getConverter(sourceType, (Type) targetType); return getConverter(sourceType, (Type) targetType);
} }
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -52,9 +52,9 @@ class ValueMapperImpl implements ValueMapper {
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public <S, T> T map(S value, Type targetType) { public <S, T> T map(S model, Type targetType) {
var sourceType = PClassInfo.forValue(value); var sourceType = PClassInfo.forValue(model);
return (T) getConverter(sourceType, targetType).convert(value, this); return (T) getConverter(sourceType, targetType).convert(model, this);
} }
private <S> Class<?> getTargetType(PClassInfo<S> sourceType, Type targetType) { private <S> Class<?> getTargetType(PClassInfo<S> sourceType, Type targetType) {
@@ -1,4 +1,4 @@
@NullMarked @NonnullByDefault
package org.pkl.config.java.mapper; package org.pkl.config.java.mapper;
import org.jspecify.annotations.NullMarked; import org.pkl.core.util.NonnullByDefault;
@@ -1,4 +1,4 @@
@NullMarked @NonnullByDefault
package org.pkl.config.java; package org.pkl.config.java;
import org.jspecify.annotations.NullMarked; import org.pkl.core.util.NonnullByDefault;
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024-2025 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.
@@ -26,49 +26,22 @@ import org.pkl.core.PObject;
public abstract class AbstractConfigTest { public abstract class AbstractConfigTest {
protected static final String pigeonText = private final Config pigeonConfig = getPigeonConfig();
""" private final Config pigeonModuleConfig = getPigeonModuleConfig();
pigeon { private final Config pairConfig = getPairConfig();
age = 30 private final Config mapConfig = getMapConfig();
friends = List("john", "mary")
address {
street = "Fuzzy St."
}
}
""";
protected abstract Config loadConfig(String text); protected abstract Config getPigeonConfig();
private Config loadPigeonConfig() { protected abstract Config getPigeonModuleConfig();
return loadConfig(pigeonText);
}
private Config loadPigeonModuleConfig() { protected abstract Config getPairConfig();
return loadConfig(
"""
age = 30
friends = List("john", "mary")
address { street = "Fuzzy St." }
""");
}
private Config loadPairConfig() { protected abstract Config getMapConfig();
return loadConfig(
"""
x { first = "file/path"; second = 42 }
""");
}
private Config loadMapConfig() {
return loadConfig(
"""
x = Map("one", 1, "two", 2)
""");
}
@Test @Test
public void navigate() { public void navigate() {
var pigeon = loadPigeonConfig().get("pigeon"); var pigeon = pigeonConfig.get("pigeon");
assertThat(pigeon.getQualifiedName()).isEqualTo("pigeon"); assertThat(pigeon.getQualifiedName()).isEqualTo("pigeon");
assertThat(pigeon.getRawValue()).isInstanceOf(PObject.class); assertThat(pigeon.getRawValue()).isInstanceOf(PObject.class);
@@ -85,7 +58,7 @@ public abstract class AbstractConfigTest {
@Test @Test
public void navigateToNonExistingObjectChild() { public void navigateToNonExistingObjectChild() {
var pigeon = loadPigeonConfig().get("pigeon"); var pigeon = pigeonConfig.get("pigeon");
var t = catchThrowable(() -> pigeon.get("non-existing")); var t = catchThrowable(() -> pigeon.get("non-existing"));
assertThat(t) assertThat(t)
@@ -97,7 +70,7 @@ public abstract class AbstractConfigTest {
@Test @Test
public void navigateToNonExistingMapChild() { public void navigateToNonExistingMapChild() {
var map = loadMapConfig().get("x"); var map = mapConfig.get("x");
var t = catchThrowable(() -> map.get("non-existing")); var t = catchThrowable(() -> map.get("non-existing"));
assertThat(t) assertThat(t)
@@ -108,7 +81,7 @@ public abstract class AbstractConfigTest {
@Test @Test
public void navigateToNonExistingLeafChild() { public void navigateToNonExistingLeafChild() {
var age = loadPigeonConfig().get("pigeon").get("age"); var age = pigeonConfig.get("pigeon").get("age");
var t = catchThrowable(() -> age.get("non-existing")); var t = catchThrowable(() -> age.get("non-existing"));
assertThat(t) assertThat(t)
@@ -119,25 +92,25 @@ public abstract class AbstractConfigTest {
@Test @Test
public void convertObjectToPojoByType() { public void convertObjectToPojoByType() {
Person pigeon = loadPigeonConfig().get("pigeon").as(Person.class); Person pigeon = pigeonConfig.get("pigeon").as(Person.class);
checkPigeon(pigeon); checkPigeon(pigeon);
} }
@Test @Test
public void convertObjectToPojoByJavaType() { public void convertObjectToPojoByJavaType() {
var pigeon = loadPigeonConfig().get("pigeon").as(JavaType.of(Person.class)); var pigeon = pigeonConfig.get("pigeon").as(JavaType.of(Person.class));
checkPigeon(pigeon); checkPigeon(pigeon);
} }
@Test @Test
public void convertModuleToPojoByType() { public void convertModuleToPojoByType() {
var pigeon = loadPigeonModuleConfig().as(Person.class); var pigeon = pigeonModuleConfig.as(Person.class);
checkPigeon(pigeon); checkPigeon(pigeon);
} }
@Test @Test
public void convertModuleToPojoByJavaType() { public void convertModuleToPojoByJavaType() {
var pigeon = loadPigeonModuleConfig().as(JavaType.of(Person.class)); var pigeon = pigeonModuleConfig.as(JavaType.of(Person.class));
checkPigeon(pigeon); checkPigeon(pigeon);
} }
@@ -151,15 +124,13 @@ public abstract class AbstractConfigTest {
@Test @Test
public void convertToParameterizedTypeByType() { public void convertToParameterizedTypeByType() {
Pair<Path, Integer> pair = Pair<Path, Integer> pair =
loadPairConfig() pairConfig.get("x").as(Types.parameterizedType(Pair.class, Path.class, Integer.class));
.get("x")
.as(Types.parameterizedType(Pair.class, Path.class, Integer.class));
checkPair(pair); checkPair(pair);
} }
@Test @Test
public void convertToParameterizedTypeByJavaType() { public void convertToParameterizedTypeByJavaType() {
var pair = loadPairConfig().get("x").as(new JavaType<Pair<Path, Integer>>() {}); var pair = pairConfig.get("x").as(new JavaType<Pair<Path, Integer>>() {});
checkPair(pair); checkPair(pair);
} }
@@ -1,39 +0,0 @@
/*
* Copyright © 2026 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.
*/
package org.pkl.config.java;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import org.pkl.config.java.mapper.ConverterFactories;
public final class ConfigDecoderBuilderTest {
@Test
public void preconfiguredBuilderHasPreconfiguredMapperBuilder() {
var builder = ConfigDecoderBuilder.preconfigured();
var mapperBuilder = builder.getValueMapperBuilder();
assertThat(mapperBuilder).isNotNull();
assertThat(mapperBuilder.getConverterFactories()).isEqualTo(ConverterFactories.all);
}
@Test
public void unconfiguredBuilderHasUnconfiguredMapperBuilder() {
var builder = ConfigDecoderBuilder.unconfigured();
var mapperBuilder = builder.getValueMapperBuilder();
assertThat(mapperBuilder).isNotNull();
assertThat(mapperBuilder.getConverterFactories()).isEmpty();
}
}
@@ -1,78 +0,0 @@
/*
* Copyright © 2026 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.
*/
package org.pkl.config.java;
import static org.assertj.core.api.Assertions.assertThat;
import java.io.ByteArrayInputStream;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.pkl.config.java.mapper.ValueMapper;
import org.pkl.core.Evaluator;
import org.pkl.core.ModuleSource;
public final class ConfigDecoderTest extends AbstractConfigTest {
private static final Evaluator evaluator = Evaluator.preconfigured();
@AfterAll
public static void afterAll() {
evaluator.close();
}
private ModuleSource toModuleSource(String text) {
return ModuleSource.text(
"""
import "pkl:pklbinary"
"""
+ text
+ """
output {
renderer = new pklbinary.Renderer {}
}
""");
}
@Override
protected Config loadConfig(String text) {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(text));
return ConfigDecoder.preconfigured().decode(bytes);
}
@Test
public void fromInputStream() {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(pigeonText));
var config = ConfigDecoder.preconfigured().decode(new ByteArrayInputStream(bytes));
assertThat(config.get("pigeon").get("age").as(Integer.class)).isEqualTo(30);
}
@Test
public void fromBytesWithOwnValueMapper() {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(pigeonText));
var config =
ConfigDecoder.preconfigured().setValueMapper(ValueMapper.preconfigured()).decode(bytes);
assertThat(config.get("pigeon").get("age").as(Integer.class)).isEqualTo(30);
}
@Test
public void fromInputStreamWithOwnValueMapper() {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(pigeonText));
var config =
ConfigDecoder.preconfigured()
.setValueMapper(ValueMapper.preconfigured())
.decode(new ByteArrayInputStream(bytes));
assertThat(config.get("pigeon").get("age").as(Integer.class)).isEqualTo(30);
}
}
@@ -1,75 +0,0 @@
/*
* Copyright © 2024-2026 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.
*/
package org.pkl.config.java;
import static org.assertj.core.api.Assertions.assertThat;
import java.io.ByteArrayInputStream;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.pkl.config.java.mapper.ValueMapper;
import org.pkl.core.Evaluator;
import org.pkl.core.ModuleSource;
@SuppressWarnings("removal")
public final class ConfigDeprecatedApiTest extends AbstractConfigTest {
private static final Evaluator evaluator = Evaluator.preconfigured();
@AfterAll
public static void afterAll() {
evaluator.close();
}
private ModuleSource toModuleSource(String text) {
return ModuleSource.text(
"""
import "pkl:pklbinary"
"""
+ text
+ """
output {
renderer = new pklbinary.Renderer {}
}
""");
}
@Override
protected Config loadConfig(String text) {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(text));
return Config.fromPklBinary(bytes);
}
@Test
public void fromInputStream() {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(pigeonText));
var config = Config.fromPklBinary(new ByteArrayInputStream(bytes));
assertThat(config.get("pigeon").get("age").as(Integer.class)).isEqualTo(30);
}
@Test
public void fromBytesWithOwnValueMapper() {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(pigeonText));
var config = Config.fromPklBinary(bytes, ValueMapper.preconfigured());
assertThat(config.get("pigeon").get("age").as(Integer.class)).isEqualTo(30);
}
@Test
public void fromInputStreamWithOwnValueMapper() {
var bytes = evaluator.evaluateOutputBytes(toModuleSource(pigeonText));
var config = Config.fromPklBinary(new ByteArrayInputStream(bytes), ValueMapper.preconfigured());
assertThat(config.get("pigeon").get("age").as(Integer.class)).isEqualTo(30);
}
}
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2026 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.
@@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
import org.pkl.config.java.mapper.ConverterFactories; import org.pkl.config.java.mapper.ConverterFactories;
import org.pkl.core.SecurityManagers; import org.pkl.core.SecurityManagers;
public final class ConfigEvaluatorBuilderTest { public class ConfigEvaluatorBuilderTest {
@Test @Test
public void preconfiguredBuilderHasPreconfiguredUnderlyingBuilders() { public void preconfiguredBuilderHasPreconfiguredUnderlyingBuilders() {
var builder = ConfigEvaluatorBuilder.preconfigured(); var builder = ConfigEvaluatorBuilder.preconfigured();
@@ -0,0 +1,56 @@
/*
* 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.
*/
package org.pkl.config.java;
import java.util.Base64;
public class ConfigPklBinaryDecoderTest extends AbstractConfigTest {
// generate via: pbpaste | ./pkl-cli/build/executable/jpkl eval /dev/stdin -f pkl-binary | base64
@Override
protected Config getPigeonConfig() {
// pigeon { age = 30; friends = List("john", "mary"); address { street = "Fuzzy St." } }
return Config.fromPklBinary(
Base64.getDecoder()
.decode(
"lAGkdGVzdNklZmlsZTovLy9Vc2Vycy9qYmFzY2gvc3JjL3BrbC90ZXN0LnBrbJGTEKZwaWdlb26UAadEeW5hbWljqHBrbDpiYXNlk5MQo2FnZR6TEKdmcmllbmRzkgSSpGpvaG6kbWFyeZMQp2FkZHJlc3OUAadEeW5hbWljqHBrbDpiYXNlkZMQpnN0cmVldKlGdXp6eSBTdC4="));
}
@Override
protected Config getPigeonModuleConfig() {
// age = 30; friends = List("john", "mary"); address { street = "Fuzzy St." }
return Config.fromPklBinary(
Base64.getDecoder()
.decode(
"lAGlc3RkaW6xZmlsZTovLy9kZXYvc3RkaW6TkxCjYWdlHpMQp2ZyaWVuZHOSBJKkam9obqRtYXJ5kxCnYWRkcmVzc5QBp0R5bmFtaWOocGtsOmJhc2WRkxCmc3RyZWV0qUZ1enp5IFN0Lg=="));
}
@Override
protected Config getPairConfig() {
// x { first = "file/path"; second = 42 }
return Config.fromPklBinary(
Base64.getDecoder()
.decode(
"lAGlc3RkaW6xZmlsZTovLy9kZXYvc3RkaW6RkxCheJQBp0R5bmFtaWOocGtsOmJhc2WSkxClZmlyc3SpZmlsZS9wYXRokxCmc2Vjb25kKg=="));
}
@Override
protected Config getMapConfig() {
// x = Map("one", 1, "two", 2)
return Config.fromPklBinary(
Base64.getDecoder().decode("lAGlc3RkaW6xZmlsZTovLy9kZXYvc3RkaW6RkxCheJICgqNvbmUBo3R3bwI="));
}
}
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2025-2026 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2025 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.
@@ -16,37 +16,49 @@
package org.pkl.config.java; package org.pkl.config.java;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.pkl.core.ModuleSource.text;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.pkl.core.ModuleSource;
public final class ConfigEvaluatorTest extends AbstractConfigTest { public class ConfigTest extends AbstractConfigTest {
private static final ConfigEvaluator evaluator = ConfigEvaluator.preconfigured(); private static final ConfigEvaluator evaluator = ConfigEvaluator.preconfigured();
@AfterAll private static final String pigeonText =
public static void afterAll() { "pigeon { age = 30; friends = List(\"john\", \"mary\"); address { street = \"Fuzzy St.\" } }";
evaluator.close();
@Override
protected Config getPigeonConfig() {
return evaluator.evaluate(text(pigeonText));
} }
@Override @Override
protected Config loadConfig(String text) { protected Config getPigeonModuleConfig() {
return evaluator.evaluate(ModuleSource.text(text)); return evaluator.evaluate(
text("age = 30; friends = List(\"john\", \"mary\"); address { street = \"Fuzzy St.\" }"));
}
@Override
protected Config getPairConfig() {
return evaluator.evaluate(text("x { first = \"file/path\"; second = 42 }"));
}
@Override
protected Config getMapConfig() {
return evaluator.evaluate(text("x = Map(\"one\", 1, \"two\", 2)"));
} }
@Test @Test
public void evaluateOutputValue() { public void evaluateOutputValue() {
var valueConfig = var valueConfig =
evaluator.evaluateOutputValue( evaluator.evaluateOutputValue(
ModuleSource.text(pigeonText + "\noutput { value = (outer) { pigeon { age = 99 } } }")); text(pigeonText + "\noutput { value = (outer) { pigeon { age = 99 } } }"));
var pigeon = valueConfig.get("pigeon").as(Person.class); var pigeon = valueConfig.get("pigeon").as(Person.class);
assertThat(pigeon.age).isEqualTo(99); assertThat(pigeon.age).isEqualTo(99);
} }
@Test @Test
public void evaluateExpression() { public void evaluateExpression() {
var addressConfig = var addressConfig = evaluator.evaluateExpression(text(pigeonText), "pigeon.address");
evaluator.evaluateExpression(ModuleSource.text(pigeonText), "pigeon.address");
var address = addressConfig.as(Address.class); var address = addressConfig.as(Address.class);
assertThat(address.street).isEqualTo("Fuzzy St."); assertThat(address.street).isEqualTo("Fuzzy St.");
} }
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
import org.pkl.config.java.mapper.Reflection; import org.pkl.config.java.mapper.Reflection;
import org.pkl.config.java.mapper.Types; import org.pkl.config.java.mapper.Types;
public final class JavaTypeTest { public class JavaTypeTest {
@Test @Test
public void constructOptionalType() { public void constructOptionalType() {
var type = JavaType.optionalOf(String.class); var type = JavaType.optionalOf(String.class);

Some files were not shown because too many files have changed in this diff Show More