Class BunExtension
This extension is exposed to build scripts as bun { ... } and allows
users to control which version of Bun is installed and which platform/system
variant is used.
Usage
bun {
version = "1.1.0" // Optional, defaults to "latest"
system = BunSystem.detect() // Optional, defaults to auto-detection
}
No defaults are set directly on this extension. This is intentional so that users may explicitly leave values unset or override them later. Defaults are applied during plugin wiring instead of at extension construction time.
-
Constructor Summary
ConstructorsConstructorDescriptionBunExtension(org.gradle.api.model.ObjectFactory objects) Constructs the Bun extension. -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<Boolean> Whether to disable SSL certificate verification during downloads.abstract org.gradle.api.provider.Property<BunSystem> The system/platform variant of Bun to install.abstract org.gradle.api.provider.Property<String> The Bun version to install.
-
Constructor Details
-
BunExtension
@Inject public BunExtension(org.gradle.api.model.ObjectFactory objects) Constructs the Bun extension.Defaults are intentionally not applied here so users can explicitly "unset" values if desired. The plugin is responsible for applying fallback defaults during task wiring.
- Parameters:
objects- GradleObjectFactoryused for creating managed properties
-
-
Method Details
-
getVersion
The Bun version to install.This value may be:
- An explicit version string (e.g.
"1.1.0") "latest"to resolve the most recent release- Unset, in which case the plugin will apply a default
- Returns:
- a Gradle
Propertyrepresenting the configured Bun version
- An explicit version string (e.g.
-
getSystem
The system/platform variant of Bun to install.This typically corresponds to a combination of operating system and CPU architecture (for example, Windows x64, Linux arm64, etc.).
When unset, the plugin will attempt to auto-detect the appropriate
BunSystemfor the current build environment.- Returns:
- a Gradle
Propertyrepresenting the configured Bun system
-
getDisableSslVerification
Whether to disable SSL certificate verification during downloads.This is useful in corporate environments with SSL-intercepting proxies. Defaults to false.
- Returns:
- a Gradle
Propertyrepresenting whether SSL verification is disabled
-