28 Commits

Author SHA1 Message Date
Daniel Chao
07c68239b9 Remove lockfiles, manage Gradle dependencies with Dependabot (#1535)
Dependabot currently does not update lockfiles in multi-module projects
(see https://github.com/dependabot/dependabot-core/issues/14633)

To work around this issue, we will simply remove our lockfiles, and
change our version catalog to use fully specified versions.
The removal of lockfiles introduces two issues:

1. It is less visible what our dependency graph is
2. Our builds are potentially non-reproducible

To work around this, two mitigations are in place:

1. Enable `failOnDynamicVersions()`, which causes Gradle to fail the
build if any dependencies declare a version range
2. Enable GitHub dependency submission, which provides insight into the
project SBOM
2026-04-20 09:29:33 -07:00
odenix
2e49a319b3 pkl-gradle: Migrate nullness to jSpecify (#1530) 2026-04-17 12:34:54 -07:00
odenix
1571d72111 pkl-config-java: Migrate nullness to jSpecify (#1528) 2026-04-17 08:56:12 -07:00
odenix
04a9cc90d2 Improve build logic for Kotlin (#1520)
- Enforce Kotlin version via resolution rule (replaces BOM)
  - fail if kotlin-stdlib/kotlin-reflect exceed target version
- Replace kotlin-stdlib-jdk8 with kotlin-stdlib (jdk7/8 are now shims)
- Port pkl-core annotation processor to Java (with Codex)
- removes kotlin-stdlib from its compile classpath for better dependency
hygiene (Java module)
- Downgrade clikt for Kotlin 2.2 compatibility
- Upgrade kotlinx-serialization

---------

Co-authored-by: Daniel Chao <dan.chao@apple.com>
2026-04-15 09:02:42 -07:00
odenix
2d4286ee7b Upgrade JVM toolchain to 25 and Kotlin toolchain to 2.3.20 (#1516)
Motivation
- Enable correct NullAway analysis
- Pick up toolchain fixes and improvements

Toolchains
- Require JDK 25 for JVM toolchain (keep Java 17 runtime compatibility)
- Require Kotlin 2.3.20 for Kotlin toolchain (keep Kotlin 2.2 runtime
compatibility)
- Require JDK 25 for Gradle daemon JVM (via
gradle-daemon-jvm.properties)
- Fix javac and kotlinc warnings from toolchain upgrades

CI
- Bump GitHub workflows to JDK 25

Building Kotlin
- Bump Kotlin language level to 2.2 to match stdlib version
- Consolidate build logic into pklKotlinBase.gradle.kts
- Adopt modern Kotlin plugin syntax
- Fix new kotlinc warnings
- Update ktfmt to 0.62
  - first version compatible with Kotlin 2.3.20
  - changes formatting compared to 0.61
- Replace dependency resolution rule with BOM alignment
  - rule was too broad and interfered with toolchain/runtime separation

Testing
- Expand matrix to JDK 25 (LTS) and 26
- Ensure each matrix task can be run independently
- Fix KotlinCodeGeneratorsTest and EmbeddedExecutorsTest on affected
JDKs
- Disable one test in CliCommandTest on affected JDKs (failure cause
unknown)

Compatibility fixes
- Fix reflective access in DocGenerator on affected JDKs

Build fixes
- Fix misuse of `task.enabled` vs. `report.required`
- Fix `gradlew tasks` on Windows
- Downgrade Spotless to 8.3.0 to (hopefully) work around sporadic
NoClassDefFoundError

Result
- NullAway runs correctly
- Broader JDK test coverage
- More reproducible and potentially faster builds
2026-04-14 11:57:09 -07:00
odenix
623912eca0 Update msgpack to 0.9.11 and slf4j to 2.x (#1501) 2026-04-06 22:00:07 -07:00
odenix
1251843169 Update Kotlin dependencies (#1498) 2026-04-06 12:06:43 -07:00
odenix
0835c6da82 Update JUnit to 6.x (#1496) 2026-04-06 11:15:55 -07:00
odenix
a8c66938e6 Update dependencies (#1492)
Update dependencies by running `./gradlew updateDependencyLocks`. Most
of the updated dependencies are test dependencies.
2026-04-06 08:22:06 -07:00
Jen Basch
6c036bf82a Implement Pkl binary renderer and parser (#1203)
Implements a binary renderer for Pkl values, which is a lossless capturing of Pkl data.

This follows the pkl binary format that is already used with `pkl server` calls, and is
made available as a Java API and also an in-language API.

Also, introduces a binary parser into the corresponding `PObject` types in Java.
2025-10-20 09:10:22 -07:00
Daniel Chao
98ab741c54 Bump Kotlin to 2.2.20, minimum Kotlin to 2.1 (#1232)
The current version of the kotlin-gradle plugin is not compatible with
Gradle 9.1, causing error `java.lang.NoSuchMethodError:
 'org.gradle.api.Project org.gradle.api.artifacts.ProjectDependency.getDependencyProject()'`

Also, the Kotlin 2.0 language target is deprecated as of Kotlin 2.2.
2025-10-08 21:40:35 -07:00
Daniel Chao
d03a074f63 Bump dependencies (#1225)
* byte-buddy to 1.17.7
* commonmark to 0.26

And also test dependencies (junit, assertj)
2025-10-04 13:59:54 -07:00
Daniel Chao
a779316cc2 Update dependencies (#1184)
Bump test dependencies, and also commonmark
2025-08-21 21:32:56 -07:00
Daniel Chao
6cd73227a1 Update dependencies (#1128) 2025-07-18 09:29:44 -07:00
Daniel Chao
568c6ccbc2 Update dependencies, and clean up multi-JDK testing (#1088)
* Update dependencies
  1. Remove */gradle.lockfile files
  2. Run `gradle updateDependencyLocks` and commit
* Update multi-JDK testing to use simple Test task, add junit-platform-launcher to dependencies
  - Don't use JvmTestSuite (we don't use another test runner, we use the same classpath)
* Add junit-platform-launcher to libs (prevent an issue where junit-engine and junit-launcher can fall out of sync)
2025-06-04 08:30:02 -07:00
Artem Yarmoliuk
50cfb1c962 Bump clikt to 5.0.3 (#947)
This bumps Clikt from version 3 to version 5, which, among other things, improves
the help text formatting with colors.

Also: 
* Add `--version` flag to pkldoc, pkl-codegen-java, pkl-codegen-kotlin
* Add help text to pkldoc, pkl-codegen-java, pkl-codegen-kotlin
2025-02-19 15:18:02 -08:00
Daniel Chao
d00d0ba79f Update dependencies (#938) 2025-02-13 10:19:24 -08:00
odenix
258eda8630 Update Kotlin to 2.0 (#900)
- update Kotlin from 1.7.10 to 2.0.21
  - Kotlin 1.6 dependencies in Gradle lock files are expected because kotlinc,
    which is also used by some tests, internally uses some 1.6 dependencies
    for backwards compatibility reasons.
- update kotlinx-html and kotlinx-serialization
- adapt Kotlin code where necessary
- use Kotlin stdlib Path APIs where possible
- fix IntelliJ Kotlin inspection warnings
- reformat code with `./gradlew spotlessApply`
  - ktfmt adds lots of trailing commas
- Add workaround to fix IntelliJ "unresolved reference" errors
2025-01-23 14:41:59 -08:00
Daniel Chao
2a9b10097d Revert "Upgrade Kotlin to 1.7.21 (#887)" (#896)
This reverts commit 273d1219a6.
2025-01-22 08:33:06 -08:00
Kushal Pisavadia
273d1219a6 Upgrade Kotlin to 1.7.21 (#887)
What's new: https://kotlinlang.org/docs/whatsnew1720.html

Releases
--------

- https://github.com/JetBrains/kotlin/releases/tag/v1.7.20
- https://github.com/JetBrains/kotlin/releases/tag/v1.7.21
2025-01-17 14:12:31 +00:00
Daniel Chao
ec7d7267dc Update dependencies (#883)
Most of these dependencies are test dependencies.
2025-01-15 05:39:14 -08:00
translatenix
3f38173ed5 Update commonmark and test dependencies (#767) 2024-11-01 12:48:01 -07:00
translatenix
d271b62543 Update dependencies (#689)
- Update dependencies by deleting lock files and regenerating them with `gw updateDependencyLocks`.
  Deleting lock files avoids strange `some.library:some.older.version=default` entries.
  Most updated dependencies are test dependencies.
- Handle breaking changes in library commonmark.
- Fix test to close PackageServer exactly once.
  This problem surfaced because JUnit 5.11 changed override rules for lifecycle methods,
  resulting in too many instead of too few close() calls.
- Bump msgpack version
- Bump clikt version
- Bump Gradle plugin versions
2024-10-17 09:12:07 -07:00
Philip K.F. Hölzenspies
5cc2ea2d00 Revert error coloring (for development on dedicated branch) (#565) 2024-07-03 17:25:06 +01:00
Thomas Purchas
0d7b95d3ff Add colours to Pkl errors in Cli output
To make error messages from Pkl eval easier to read, this change uses
the Jansi library to colour the output, making it quicker and easier to
scan error messages and understand what's happened.

The Jansi library also detects if the CLI output is a terminal capable
of handling colours, and will automatically strip out escape codes if
the output won't support them (e.g. piping the output somewhere else).
2024-07-01 10:13:16 +01:00
Philip K.F. Hölzenspies
b03530ed1f Add support for HTTP proxying (#506)
* Add `--proxy` and `--no-proxy` CLI flags
* Add property `http` to `pkl:settings`
* Move `EvaluatorSettings` from `pkl:Project` to its own module and add property `http`
* Add support for proxying in server mode, and through Gradle
* Add `setProxy()` to `HttpClient`
* Add documentation
2024-06-12 11:54:22 -07:00
translatenix
bba5387f17 Update dependencies (#350)
* Update various dependencies
* Freeze kotlinx.html and kotlinx.serialization versions until Kotlin itself is updated.
2024-04-11 20:54:01 -07:00
Peter Niederwieser
ecad035dca Initial commit 2024-02-01 14:00:22 -08:00