Class BunExtension

java.lang.Object
io.github.m_segreti.BunExtension

public abstract class BunExtension extends Object
Gradle extension used to configure the Bun runtime for a project.

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 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 - Gradle ObjectFactory used for creating managed properties
  • Method Details

    • getVersion

      public abstract org.gradle.api.provider.Property<String> 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 Property representing the configured Bun version
    • getSystem

      public abstract org.gradle.api.provider.Property<BunSystem> 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 BunSystem for the current build environment.

      Returns:
      a Gradle Property representing the configured Bun system
    • getDisableSslVerification

      public abstract org.gradle.api.provider.Property<Boolean> 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 Property representing whether SSL verification is disabled