{"id":20272800,"url":"https://github.com/f4lco/libyear-gradle-plugin","last_synced_at":"2025-10-17T00:38:26.991Z","repository":{"id":44503830,"uuid":"339401913","full_name":"f4lco/libyear-gradle-plugin","owner":"f4lco","description":"A simple measure of dependency freshness.","archived":false,"fork":false,"pushed_at":"2025-04-08T14:28:14.000Z","size":214,"stargazers_count":25,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-11T04:42:24.663Z","etag":null,"topics":["dependency","dependency-graph","dependency-graph-analysis","libyear"],"latest_commit_sha":null,"homepage":"https://github.com/f4lco/libyear-gradle-plugin","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f4lco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-16T13:08:58.000Z","updated_at":"2025-04-08T13:50:21.000Z","dependencies_parsed_at":"2024-05-19T17:40:05.591Z","dependency_job_id":"4bd0b650-63a7-4417-b8c1-9644332d64bd","html_url":"https://github.com/f4lco/libyear-gradle-plugin","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4lco%2Flibyear-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4lco%2Flibyear-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4lco%2Flibyear-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f4lco%2Flibyear-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f4lco","download_url":"https://codeload.github.com/f4lco/libyear-gradle-plugin/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345281,"owners_count":21088242,"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":["dependency","dependency-graph","dependency-graph-analysis","libyear"],"created_at":"2024-11-14T12:47:05.180Z","updated_at":"2025-10-17T00:38:21.935Z","avatar_url":"https://github.com/f4lco.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Libyear Gradle Plugin\n\n[![Actions Status](https://github.com/f4lco/libyear-gradle-plugin/actions/workflows/build-test.yml/badge.svg)](https://github.com/f4lco/libyear-gradle-plugin/actions)\n[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/com/libyear/libyear-gradle-plugin/com.libyear.libyear-gradle-plugin.gradle.plugin/maven-metadata.xml.svg?colorB=007ec6\u0026label=Gradle%20Plugin%20Portal)](https://plugins.gradle.org/plugin/com.libyear.libyear-gradle-plugin)\n\nThis Gradle plugin measures **libyears** of your project.\nlibyears is a simple measure of software dependency freshness.\nIt is a **single number** telling you how up-to-date your dependencies are.\nLearn more on [libyear.com][libyear].\n\n![libyear before comic](https://libyear.com/cartoon1.jpg) ![libyear after comic](https://libyear.com/cartoon2.jpg)\n\n## Usage\n\nUpdate your Gradle build instructions with the following plugin application, which will automatically enable a dependency check after resolving dependencies:\n\n```kotlin\n// in Kotlin / build.gradle.kts:\nplugins {\n  id(\"com.libyear.libyear-gradle-plugin\").version(\"\u003cversion\u003e\")\n}\n\nlibyear {\n   // Which dependency configuration to check?\n  configurations = listOf(\"compileClasspath\")\n  \n  // Fail in case fetching dependency metadata fails?\n  failOnError = true\n\n  // Sometimes fetching dependency metadata fails, so we retry a few times, after all retries fail, we throw an exception and \"failOnError\" policy will be applied.\n  maxRetries: Int = 3\n  initialRetryDelayMillis: Long = 2000\n  retryBackoffMultiplier: Int = 2\n  \n  // How to validate:\n  validator = allArtifactsCombinedMustNotBeOlderThan(5.years)\n  \n  // alternatively:\n  validator = singleArtifactMustNotBeOlderThan(2.days)\n\n  // optional: limit the depth of the dependency traversal, default is 0 = only the root level, null = no limit\n  maxTransitiveDepth = 5\n}\n```\n\n```groovy\n// in Groovy / build.gradle:\nplugins {\n  id 'com.libyear.libyear-gradle-plugin' version \"\u003cversion\u003e\"\n}\n\nlibyear {\n  configurations = ['compileClasspath']\n  failOnError = true\n  validator = allArtifactsCombinedMustNotBeOlderThan(days(5))\n  maxTransitiveDepth = 5\n}\n```\n\nPlease refer to [LibYearExtension.kt][0] for all possible configuration options and additional documentation.\n\n\n## Tasks\n\nThe `reportLibyears` task shows a table with all outdated dependencies, including their newest version numbers and impact on the total of libyears.\n\n## Example\n\nIf you build on a modern framework such as Spring Boot, you invite about 10 libyears into your project. And you haven't actually started to do something useful, did you?\n\n```\n\u003e Task :example-spring-boot:reportLibyears\nCollected 2.3 decades  worth of libyears from 33 dependencies:\n -\u003e 4.2 years  from jakarta.annotation:jakarta.annotation-api (1.3.5 =\u003e 3.0.0-M1)\n -\u003e 1.9 years  from org.slf4j:jul-to-slf4j (1.7.36 =\u003e 2.1.0-alpha0)\n -\u003e 1.9 years  from org.slf4j:slf4j-api (1.7.36 =\u003e 2.1.0-alpha0)\n -\u003e 1.8 years  from org.apache.logging.log4j:log4j-api (2.17.2 =\u003e 3.0.0-beta1)\n -\u003e 1.8 years  from org.apache.logging.log4j:log4j-to-slf4j (2.17.2 =\u003e 3.0.0-beta1)\n -\u003e 1.7 years  from org.yaml:snakeyaml (1.30 =\u003e 2.2)\n -\u003e 11 months  from com.fasterxml.jackson.module:jackson-module-parameter-names (2.13.5 =\u003e 2.16.1)\n -\u003e 11 months  from com.fasterxml.jackson.datatype:jackson-datatype-jdk8 (2.13.5 =\u003e 2.16.1)\n -\u003e 11 months  from com.fasterxml.jackson.datatype:jackson-datatype-jsr310 (2.13.5 =\u003e 2.16.1)\n -\u003e 11 months  from com.fasterxml.jackson.core:jackson-annotations (2.13.5 =\u003e 2.16.1)\n -\u003e 11 months  from com.fasterxml.jackson:jackson-bom (2.13.5 =\u003e 2.16.1)\n -\u003e 11 months  from com.fasterxml.jackson.core:jackson-core (2.13.5 =\u003e 2.16.1)\n -\u003e 11 months  from com.fasterxml.jackson.core:jackson-databind (2.13.5 =\u003e 2.16.1)\n -\u003e 8.3 months from ch.qos.logback:logback-core (1.2.12 =\u003e 1.4.14)\n -\u003e 8.3 months from ch.qos.logback:logback-classic (1.2.12 =\u003e 1.4.14)\n -\u003e 28.2 days  from org.springframework.boot:spring-boot-starter-tomcat (2.7.18 =\u003e 3.2.1)\n -\u003e 28.2 days  from org.springframework.boot:spring-boot-starter-web (2.7.18 =\u003e 3.2.1)\n -\u003e 28.2 days  from org.springframework.boot:spring-boot (2.7.18 =\u003e 3.2.1)\n -\u003e 28.2 days  from org.springframework.boot:spring-boot-starter (2.7.18 =\u003e 3.2.1)\n -\u003e 28.2 days  from org.springframework.boot:spring-boot-starter-json (2.7.18 =\u003e 3.2.1)\n -\u003e 28.2 days  from org.springframework.boot:spring-boot-starter-logging (2.7.18 =\u003e 3.2.1)\n -\u003e 28.2 days  from org.springframework.boot:spring-boot-autoconfigure (2.7.18 =\u003e 3.2.1)\n -\u003e 28.1 days  from org.springframework:spring-aop (5.3.31 =\u003e 6.1.2)\n -\u003e 28.1 days  from org.springframework:spring-context (5.3.31 =\u003e 6.1.2)\n -\u003e 28.1 days  from org.springframework:spring-core (5.3.31 =\u003e 6.1.2)\n -\u003e 28.1 days  from org.springframework:spring-expression (5.3.31 =\u003e 6.1.2)\n -\u003e 28.1 days  from org.springframework:spring-web (5.3.31 =\u003e 6.1.2)\n -\u003e 28.1 days  from org.springframework:spring-webmvc (5.3.31 =\u003e 6.1.2)\n -\u003e 28.1 days  from org.springframework:spring-jcl (5.3.31 =\u003e 6.1.2)\n -\u003e 28.1 days  from org.springframework:spring-beans (5.3.31 =\u003e 6.1.2)\n -\u003e 27.7 days  from org.apache.tomcat.embed:tomcat-embed-websocket (9.0.83 =\u003e 11.0.0-M15)\n -\u003e 27.7 days  from org.apache.tomcat.embed:tomcat-embed-el (9.0.83 =\u003e 11.0.0-M15)\n -\u003e 27.7 days  from org.apache.tomcat.embed:tomcat-embed-core (9.0.83 =\u003e 11.0.0-M15)\n\nBUILD SUCCESSFUL in 28s\n1 actionable task: 1 executed\n```\n\n## Changelog\n\n### 0.4.0 (2025-04-08)\n\n@Breefield kindly contributed retriable requests to the HTTP client to compensate for instability of upstream repositories. Fixes #16.\n\n### 0.3.1 (2024-11-17)\n\nWe have merged two Dependabot PRs with GitHub Action version bumps for this patch release.\n\n### 0.3.0 (2024-11-17)\n\nThanks to @Breefield the plugin now supports inclusion and exclusion filters on dependencies.\nBy example,\n\n- Exclusion patterns allow to exclude Libyears from a particular framework, for example Spring, and\n- Inclusion patterns allow to \"narrow down\" on a particular set of dependencies, which allows to answer questions such as \"how many Libyears do internal artifacts from 'com.mycompany' bring in?\"\n\nIf build authors use both pattern in conjunction, the plugin narrows down the dependencies to the inclusion list, and then proceeds to filter out dependencies matching the exclusion pattern(s).\n\nPatterns allow for globbing, for example, the pattern `com.mycompany:*` matches all artifacts with group name \"com.mycompany\",\nand `com.mycompany:logging-*` would match all artifact names starting with \"logging\".\n\n### 0.2.1 (2024-11-08)\n\nThanks to @Breefield the plugin now writes a JSON report in `build/reports` which contains a machine-readable report of Libyears per dependency 🚀\n\n### 0.2.0 (2024-10-16)\n\n@Breefield added the `maxTransitiveDepth` toggle to put an upper bound to the depth of dependency traversal.  \nStarting with 0.2.0, because the application owners have most control over direct dependencies (depth = 0),\nthe plugin only reports the Libyears of direct dependencies by default.  \nThe full Libyear report is available with unlimited depth (`maxTransitiveDepth = null`), but will take the\nmost time and resources to complete.\n\n### 0.1.8 (2024-06-17)\n\nThe build of this release tests against the latest Gradle 7.x and 8.x release.\n\n### 0.1.7 (2024-01-01)\n\nThe build of this release tests against the latest Gradle 7.x release.\n\n### 0.1.6 (2022-02-09)\n\nThis release uses Gradle 6.9.2 as baseline for running the test suite and the plugin deployment.\n\n### 0.1.5 (2022-02-09)\n\nThis release uses Gradle 6.9.1 as baseline for running the test suite and the plugin deployment.\n\n### 0.1.4 (2021-06-24)\n\nThe violators report now excludes up-to-date dependencies which contribute zero seconds to the accumulated libyears.\n\nThe build runs against Gradle 6.9, Gradle 7.1, and Ktlint 10.1.0.\n\n### 0.1.3 (2021-06-23)\n\nThe plugin now also considers repositories defined in the settings script (`settings.gradle` or `settings.gradle.kts`) in addition to the project's repositories depending on the [repositories mode][repo-mode]. Previously, the plugin processed only the project's repositories.\n\nThe build also runs against Gradle 7 in addition to Gradle 6.x to prevent regressions.\n\n## Acknowledgements\n\nJ. Cox, E. Bouwers, M. van Eekelen and J. Visser, [Measuring Dependency\nFreshness in Software Systems][1]. In Proceedings of the 37th International\nConference on Software Engineering (ICSE 2015), May 2015\n\n[0]: https://github.com/f4lco/libyear-gradle-plugin/blob/main/libyear-gradle-plugin/src/main/kotlin/com/libyear/LibYearExtension.kt\n\n[1]: https://ericbouwers.github.io/papers/icse15.pdf\n\n[libyear]: https://libyear.com/\n\n[repo-mode]: https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:centralized-repository-declaration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4lco%2Flibyear-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff4lco%2Flibyear-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff4lco%2Flibyear-gradle-plugin/lists"}