Files
pkl/docs/modules/pkl-gradle/partials/gradle-common-properties.adoc
Daniel Chao 3bd9214858 Adjust docs for proxying (#523)
Update/polish up the documentation around http proxying
2024-06-13 09:46:21 -07:00

104 lines
3.6 KiB
Plaintext

.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 caching 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.
====
.proxy: Property<URI>
[%collapsible]
====
Default: `null` +
Example: `proxy = uri("http://proxy.example.com:1234")` +
Configures HTTP connections to connect to the provided proxy address.
The URI must have scheme `http`, and may not contain anything other than a host and port.
====
.noProxy: ListProperty<String>
[%collapsible]
====
Default: `null` +
Example: `noProxy = ["example.com", "169.254.0.0/16"]` +
Hosts to which all connections should bypass the proxy.
Hosts can be specified by name, IP address, or IP range using https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR notation].
====