{"id":19413011,"url":"https://github.com/buildless/plugin-gradle","last_synced_at":"2025-04-24T11:31:37.730Z","repository":{"id":176559616,"uuid":"646018337","full_name":"buildless/plugin-gradle","owner":"buildless","description":"Buildless plug-in for Gradle","archived":false,"fork":false,"pushed_at":"2024-06-14T09:02:16.000Z","size":25490,"stargazers_count":6,"open_issues_count":13,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-14T10:26:20.144Z","etag":null,"topics":["buildcache","gradle","gradle-plugin","java","kotlin","saas"],"latest_commit_sha":null,"homepage":"https://gradle.docs.less.build/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildless.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-27T03:11:52.000Z","updated_at":"2024-06-14T10:26:29.977Z","dependencies_parsed_at":"2024-04-29T22:26:52.454Z","dependency_job_id":"e7aa73fe-48bf-434a-93de-2b767b746bcc","html_url":"https://github.com/buildless/plugin-gradle","commit_stats":null,"previous_names":["buildless/plugin-gradle"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildless%2Fplugin-gradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildless%2Fplugin-gradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildless%2Fplugin-gradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildless%2Fplugin-gradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildless","download_url":"https://codeload.github.com/buildless/plugin-gradle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223952420,"owners_count":17230878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buildcache","gradle","gradle-plugin","java","kotlin","saas"],"created_at":"2024-11-10T12:29:59.867Z","updated_at":"2024-11-10T12:30:00.494Z","avatar_url":"https://github.com/buildless.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://less.build\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./dokka/images/masthead-dark@4x.png\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./dokka/images/masthead@4x.png\"\u003e\n      \u003cimg src=\"./dokka/images/masthead@4x.png\" width=\"800\" alt=\"Buildless for Gradle\" /\u003e\n    \u003c/picture\u003e\n    \u003cbr /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/buildless/plugin-gradle/actions/workflows/trigger.push.yml\"\u003e\u003cimg src=\"https://github.com/buildless/plugin-gradle/actions/workflows/trigger.yml/badge.svg\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://plugins.gradle.org/plugin/build.less\"\u003e\u003cimg src=\"https://img.shields.io/gradle-plugin-portal/v/build.less\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://less.build/discord\"\u003e\u003cimg src=\"https://img.shields.io/discord/1119121740161884252?b1\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://sonarcloud.io/summary/new_code?id=buildless_plugin-gradle\"\u003e\u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=buildless_plugin-gradle\u0026metric=security_rating\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://sonarcloud.io/summary/new_code?id=buildless_plugin-gradle\"\u003e\u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=buildless_plugin-gradle\u0026metric=sqale_rating\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://sonarcloud.io/summary/new_code?id=buildless_plugin-gradle\"\u003e\u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=buildless_plugin-gradle\u0026metric=reliability_rating\" /\u003e\u003c/a\u003e\n\u003ca href=\"http://kotlinlang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Kotlin-1.9.21-blue.svg?logo=kotlin\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis repo defines a plugin for Gradle which integrates with [Buildless][1] for [remote build caching][2].\nBuildless can be used as a [drop-in remote HTTPS cache endpoint][3], or you can use this plug-in which offers a number\nof extra luxurious features (see below).\n\n\u003e **Note**\n\u003e Requires Gradle `8.0` or above\n\n### Current version\n\n**Latest:** `1.0.0-rc2`\n\n**`settings.gradle.kts` (Kotlin DSL):**\n\n```kotlin\nplugins {\n    id(\"build.less\") version \"1.0.0-rc2\"\n}\n```\n\n**`settings.gradle` (Groovy DSL):**\n\n```groovy\nplugins {\n    id 'build.less' version '1.0.0-rc2'\n}\n```\n\n**`libs.versions.toml` (Version Catalog):**\n\n```toml\n[versions]\n# ...\nbuildless = \"1.0.0-rc2\"\n\n[plugins]\n# ...\nbuildless = { id = \"build.less\", version.ref = \"buildless\" }\n```\n\n## Getting started\n\nInstalling and using the plugin is pretty easy.\n\n1. **Install the plugin** in your `settings.gradle` file (see above)\n2. **Set your API key** via the Gradle DSL, env vars, config files, or JVM or Gradle properties (see below)\n3. ???\n4. **Profit!** (Enjoy lightning-fast build caching)\n\nOf course, if you want to, you can customize the plugin's settings to your heart's content. Settings are documented\nbelow the _Features_ section in this README.\n\n## Features\n\n- 🚀 **Lightning-fast build caching** with [Buildless][1]\n- ⚡ **[Buildless Agent][7] support** for near-cache, async pushes, and protocol upgrades\n- 🔑 **Automatically load API keys** from environment vars, `.env`, config files, or Gradle or JVM properties\n- 🧠 **Smart auto-configuration** of lowest-latency endpoints based on your location\n- 📡 **Build telemetry** for enhanced cache reporting and performance\n- 🔧 **Configure Gradle build caching** in one combined block, with our without using Buildless\n\nWe have more exciting features coming soon! Check out our [public roadmap][4] for more info.\n\n### Supply Chain Security\n\nOur plugin is built in a secure fashion, and so is our service. Here are a few things we do keep things hardened:\n\n- [Dependency Verification](https://docs.gradle.org/current/userguide/dependency_verification.html): We aggressively\n  verify dependencies, and use [Dependency Locking](https://docs.gradle.org/current/userguide/dependency_locking.html)\n  to make sure versions don't drift\n- We ship SBOMs in OWASP [CycloneDX](https://cyclonedx.org/) format, and soon in SPDX too\n- Releases are stamped via [Sigstore](https://sigstore.dev)\n- We aggressively update versions, and only depend on high-quality libraries / plugins\n- All releases and publications are signed, all commits in those releases are signed\n- All plugin code is open source, in this repo\n\n## Configuration\n\nThe plugin provides a **Gradle DSL** for configuring Buildless with Gradle, and additionally provides project-level\ncustomizations and checks.\n\n**The most important thing to set up is your API key.** There are several ways to specify your key; they are listed\nexhaustively below, with their order of precedence.\n\n#### Complete configuration sample\n\n**`settings.gradle.kts` (Kotlin DSL):**\n\n```kotlin\nplugins {\n  id(\"build.less\") version \"1.0.0-rc2\"\n}\n\nbuildless {\n  // various flags:\n  debug = true  // activate or deactivate debug mode (verbose logging, API tracing, etc)\n  telemetry = true  // activate or deactivate private build telemetry (build analytics in the dashboard)\n  reportErrors = true  // activate or deactivate error reporting to the buildless team (just plugin errors)\n\n  // options for configuring your API key:\n  apiKey(\"...\")\n  apiKey(ApiKey.of(\"...\"))\n  apiKey(ApiKey.of(\"...\", type = SubjectType.ORG))\n\n  // configuring local caching (it defaults to being active):\n  localCache.enabled = true  // turn the local cache on or off\n  localCache.directory = \"...\"  // set the directory where the cache is stored (defaults to .gradle/cache)\n\n  // or...\n  localCache {\n    enabled = true\n    directory = \"...\"\n  }\n\n  // configuring remote caching (it defaults to being active):\n  remoteCache.enabled = true  // turn the remote cache on or off\n  remoteCache.endpoint = \"...\"  // set a custom or enterprise cache endpoint (not usually necessary)\n\n  // or...\n  remoteCache {\n      enabled = true\n      endpoint = \"...\"\n  }\n}\n```\n\n### API key\n\nBuilds use your **regular API key**, not your events key. Once you setup your Buildless account, you can find your key\nin your [dashboard][5], either in the _Tenant \u003e Settings_ section (for an org-level key), or in your _Profile_ (for your\nuser-level key).\n\nOnce you obtain your API key, you can set it up in any of the following ways. The first key found (from top to bottom in\nthis document) will be used:\n\n- **1) DSL string** (not recommended). For example:\n\n  ```kotlin\n  buildless {\n    apiKey(\"...\")\n  }\n  ```\n\n- **2) Environment variables**. All the following values work:\n\n  - `BUILDLESS_APIKEY`\n  - `GRADLE_CACHE_PASSWORD`\n\n- **3) Gradle or JVM system properties**. All the following values work:\n\n  - `buildless.apiKey`\n\n- **4) Config file (recommended)**. All the following locations work (project root unless otherwise specified):\n  - `.buildless.toml`, `.buildless.yaml`, `.buildless.json` (with or without preceding `.`)\n  - `.github/.buildless.toml`, `.github/.buildless.yaml`, `.github/.buildless.json` (with or without preceding `.`)\n  - `package.json:buildless` (as a JSON object)\n  - `~/.config/buildless.toml`, `~/.config/buildless.yaml`, `~/.config/buildless.json` (with or without preceding `.`)\n\n\u003e Note:\n\u003e You can find your Buildless API key in your [dashboard][5].\n\n### Debug mode\n\n\u003e Default value: `true`\n\n```kotlin\nbuildless {\n  debug = true  // or `BUILDLESS_DEBUG` or `-Dbuildless.debug` or `-Pbuildless.debug`\n}\n```\n\nActivating debug mode **activate verbose logging** for the plugin, and additionally marks API calls with trace values\nwhich can be used for diagnosis from the [dashboard][5].\n\n### Agent\n\n\u003e Default: On when Agent is active, off otherwise\n\n```kotlin\nbuildless {\n  agent {\n    enabled = true  // enabled by default if agent is active\n  }\n}\n```\n\nThe [Buildless Agent][7] is software which runs on the local machine and acts as a caching proxy between Gradle and\nBuildless. It is highly recommended to use the Agent, as it upgrades Gradle's cache traffic from HTTP/1.1 to HTTP/2 or\nHTTP/3, and performs a number of other optimizations.\n\n#### About the Agent\n\nAgent functionality is also recommended for two other reasons:\n\n- **Async pushes:** With the Agent enabled, your build no longer has to wait for pushes to fully complete to the Cloud.\n  Instead, these are deferred and your build continues immediately.\n\n\n- **Resilience:** If there is a network interruption or outage with Buildless Cloud, or your Cloud-based cache is\n  inaccessible for any other reason, your build continues and remains unaffected.\n\nThe Buildless Agent is provided with the [CLI tools][8].\n\n#### Agent detection\n\nThe Agent is detected, if running, via a known configuration file location on disk, as well as socket or port liveness\nchecks, as applicable. There is no need to restart your Gradle daemon to notice an Agent process.\n\n### Local cache\n\n\u003e Default: On when Agent is off, off when Agent is on\n\n```kotlin\nbuildless {\n  local {\n    enabled = true  // enabled by default if agent is off\n  }\n}\n```\n\nActivating the local cache enables Gradle's built-in disk caching mechanism. This is generally good to leave \u003cb\u003eoff\u003c/b\u003e\nif the Buildless Agent is enabled, because the Agent will cache in-memory and on-disk intelligently, and there isn't\nmuch sense (or gain) in duplicating that effort.\n\nYou can still opt-in to the local cache with the Agent if you want to using the snippet above.\n\n### Telemetry\n\n\u003e Default value: `true`\n\n```kotlin\nbuildless {\n  telemetry = false  // or `BUILDLESS_TELEMETRY` or `-Dbuildless.telemetry` or `-Pbuildless.telemetry`\n}\n```\n\nBuild telemetry is the basis for a great many features in Buildless. After processing, it is handed directly back to you\nfor use in your [dashboard][5]. Emitting telemetry is recommended in all circumstances (including CI and locally); the\ntelemetry transport is optimized for low overhead and doesn't block the build.\n\nIf you really don't want to emit telemetry, you can disable it as shown above.\n\n### Error reporting\n\n\u003e Default value: `true`\n\n```kotlin\nbuildless {\n  errorReporting = false\n}\n```\n\nError reporting is used to send errors to the Buildless team for analysis. It is recommended to leave this on, but if\nyou are working in an airgapped environment (or just don't want to share that information), you can always turn it off.\n\n## Support\n\nNeed help setting up Buildless, or have a question? Drop us a line:\n\n```\nemail: support at less dot build\nphone: +1-844-420-1414\n```\n\nOr chat with us anytime via the Intercom widget in the [dashboard][5].\n\n#### Legalese\n\nThis software was made by the [Elide][6] team, and is meant for use with [Buildless][1]. You can use it to configure any\nlocal or remote caching in Gradle, though.\n\n[1]: https://less.build\n[2]: https://docs.gradle.org/current/userguide/build_cache.html\n[3]: https://docs.gradle.org/current/userguide/build_cache.html#sec:build_cache_setup_http_backend\n[4]: https://features.less.build\n[5]: https://less.build/login\n[6]: https://elide.dev\n[7]: https://docs.less.build/docs/agent\n[8]: https://docs.less.build/docs/cli\n\n## License\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbuildless%2Fplugin-gradle.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbuildless%2Fplugin-gradle?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildless%2Fplugin-gradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildless%2Fplugin-gradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildless%2Fplugin-gradle/lists"}