mirror of
https://github.com/apple/pkl.git
synced 2026-07-10 23:22:46 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
.allowedModules: ListProperty<String>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `["pkl:", "file:", "modulepath:", "https:", "repl:", "package:", "projectpackage:"]` +
|
||||
Example: `allowedModules = ["file:"]` +
|
||||
URI patterns that determine which modules can be loaded and evaluated.
|
||||
Patterns are matched against the beginning of module URIs.
|
||||
(File paths have been converted to `file:` URLs at this stage.)
|
||||
At least one pattern needs to match for a module to be loadable.
|
||||
Both source modules and transitive modules are subject to this check.
|
||||
====
|
||||
|
||||
.allowedResources: ListProperty<String>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `["env:", "prop:", "modulepath:", "https:", "file:", "package:", "projectpackage:"]` +
|
||||
Example: `allowedResources = ["env:", "prop:"]` +
|
||||
URL patterns that determine which external resources can be read.
|
||||
Patterns are matched against the beginning of resource URLs.
|
||||
At least one pattern needs to match for a resource to be readable.
|
||||
====
|
||||
|
||||
.environmentVariables: MapProperty<String, String>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `[:]` (note that Gradle default differs from CLI default) +
|
||||
Example 1: `environmentVariables = ["MY_VAR_1": "myValue1", "MY_VAR_2": "myValue2"]` +
|
||||
Example 2: `environmentVariables = System.getenv()` +
|
||||
Environment variables that can be read by Pkl code with `read("env:<envVariableName>")`.
|
||||
====
|
||||
|
||||
.evalRootDir: DirectoryProperty
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `rootProject.layout.projectDirectory` +
|
||||
Example 1: `evalRootDir = layout.projectDirectory.dir("pkl-modules")` +
|
||||
Example 2: `evalRootDir.fileValue file("/some/absolute/path")` +
|
||||
|
||||
Root directory for `file:` modules and resources.
|
||||
If non-null, access to file-based modules and resources is restricted to those located under the root directory.
|
||||
Any symlinks are resolved before this check is performed.
|
||||
====
|
||||
|
||||
.evalTimeout: Property<java.time.Duration>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `null` +
|
||||
Example: `evalTimeout = Duration.ofSeconds(10)` +
|
||||
Duration after which evaluation of a source module will be timed out.
|
||||
Note that a timeout is treated the same as a program error in that any subsequent source modules will not be evaluated.
|
||||
====
|
||||
|
||||
.externalProperties: MapProperty<String, String>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `[:]` +
|
||||
Example: `externalProperties = ["myProp1": "myValue1", "myProp2": "myValue2"]` +
|
||||
External properties that can be read by Pkl code with `read("prop:<propertyName>")`.
|
||||
====
|
||||
|
||||
.moduleCacheDir: DirectoryProperty
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `null` +
|
||||
Example 1: `moduleCacheDir = layout.buildDirectory.dir("pkl-module-cache")` +
|
||||
Example 2: `moduleCacheDir.fileValue file("/absolute/path/to/cache")` +
|
||||
The cache directory for storing packages.
|
||||
If `null`, defaults to `~/.pkl/cache`.
|
||||
====
|
||||
|
||||
.noCache: Property<Boolean>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `false` +
|
||||
Disable cacheing of packages.
|
||||
====
|
||||
|
||||
.modulePath: ConfigurableFileCollection
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `files()` (empty collection) +
|
||||
Example: `modulePath.from files("dir1", "zip1.zip", "jar1.jar")` +
|
||||
The directories, ZIP archives, or JAR archives to search when resolving `modulepath:` URIs.
|
||||
Relative paths are resolved against the project directory.
|
||||
====
|
||||
Reference in New Issue
Block a user