mirror of
https://github.com/apple/pkl.git
synced 2026-08-26 21:54:03 +02:00
This changes logic that previously read/wrote from `~/.pkl` to use XDG base directories (all OSes), and Known Folders locations on Windows. For example, Pkl will look for `settings.pkl` in: 1. `$XDG_CONFIG_HOME/pkl/settings.pkl` 2. `%APPDATA/pkl/settings.pkl` 3. `~/.pkl/settings.pkl` 4. Path pkl/settings/pkl within `$XDG_CONFIG_DIRS` 5. `/etc/xdg/pkl/settings.pkl` --------- Co-authored-by: Florin Ungur <florin@florinungur.com>
76 lines
2.7 KiB
Plaintext
76 lines
2.7 KiB
Plaintext
|
|
.sourceModules: ListProperty<Object>
|
|
[%collapsible]
|
|
====
|
|
Default: `[]` +
|
|
Example 1: `sourceModules = ["module1.pkl", "module2.pkl"]` +
|
|
Example 2: `+sourceModules = fileTree("config").include("**/*.pkl")+` +
|
|
List of Pkl modules which are used for this operation.
|
|
|
|
This property accepts the following types to represent a module:
|
|
|
|
* `java.net.URI`
|
|
* `java.io.File`
|
|
* `java.nio.file.Path`
|
|
* `java.net.URL`
|
|
* `java.lang.CharSequence` - if the represented string looks like a URI (it contains a scheme), the input is treated as a URI. Otherwise, it is treated as a path. Relative paths are resolved against the project directory.
|
|
* `org.gradle.api.file.FileSystemLocation`
|
|
====
|
|
|
|
.transitiveModules: ConfigurableFileCollection
|
|
[%collapsible]
|
|
====
|
|
Default: [computed by pkl-gradle] +
|
|
Example 1: `transitiveModules.from files("module1.pkl", "module2.pkl")` +
|
|
Example 2: `+transitiveModules.from fileTree("config").include("**/*.pkl")+` +
|
|
|
|
File paths of modules that are directly or indirectly used by source modules.
|
|
|
|
This property, along with `sourceModules`, is the set of input files used to determine whether this task is up-to-date or not.
|
|
|
|
By default, Pkl computes this property by analyzing the imports of the source modules.
|
|
Setting this property explicitly causes Pkl to skip the analyze imports step.
|
|
|
|
Including source modules in `transitiveModules` is permitted but not required.
|
|
Relative paths are resolved against the project directory.
|
|
====
|
|
|
|
.projectDir: DirectoryProperty
|
|
[%collapsible]
|
|
====
|
|
Default: `null` +
|
|
Example 1: `projectDir = layout.projectDirectory.dir("pkl")` +
|
|
Example 2: `projectDir.fileValue file("/some/absolute/path")`
|
|
|
|
Directory where the project lives.
|
|
|
|
A project is a directory that contains a `PklProject` file, which is used to declare package dependencies, as well as common evaluator settings to be applied in the project.
|
|
|
|
If `null`, this is determined by searching up from the working directory for a directory that contains a `PklProject` file, until `evalRootDir` or the file system root is reached.
|
|
====
|
|
|
|
.omitProjectSettings: Property<Boolean>
|
|
[%collapsible]
|
|
====
|
|
Disables loading evaluator settings from the PklProject file.
|
|
====
|
|
|
|
.noProject: Property<Boolean>
|
|
[%collapsible]
|
|
====
|
|
Disables all behavior related to projects.
|
|
====
|
|
|
|
.settingsModule: Property<Object>
|
|
[%collapsible]
|
|
====
|
|
Default: `null` +
|
|
Example: `settingsModule = layout.projectDirectory.file("mySettings.pkl")` +
|
|
The Pkl settings module to use.
|
|
This property accepts the same input types as the `sourceModules` property.
|
|
|
|
If `null`, `~/.config/pkl/settings.pkl` on Unix or `%APPDATA%/pkl/settings.pkl` on Windows (or the legacy `~/.pkl/settings.pkl`), or defaults specified in the `pkl.settings` standard library module are used.
|
|
====
|
|
|
|
include::../partials/gradle-common-properties.adoc[]
|