{"id":22707577,"url":"https://github.com/xvik/gradle-github-info-plugin","last_synced_at":"2025-08-18T17:07:19.456Z","repository":{"id":57742849,"uuid":"47453830","full_name":"xvik/gradle-github-info-plugin","owner":"xvik","description":"Gradle Github info plugin","archived":false,"fork":false,"pushed_at":"2025-01-31T04:29:03.000Z","size":387,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T12:37:47.644Z","etag":null,"topics":["github","gradle","gradle-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xvik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2015-12-05T11:48:21.000Z","updated_at":"2025-02-24T09:50:49.000Z","dependencies_parsed_at":"2024-04-07T06:27:46.641Z","dependency_job_id":"683f1c6f-aa6b-4208-aa29-c0bcbc9a7fe1","html_url":"https://github.com/xvik/gradle-github-info-plugin","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/xvik/gradle-github-info-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-github-info-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-github-info-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-github-info-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-github-info-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xvik","download_url":"https://codeload.github.com/xvik/gradle-github-info-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-github-info-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271027687,"owners_count":24687082,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["github","gradle","gradle-plugin"],"created_at":"2024-12-10T10:13:28.481Z","updated_at":"2025-08-18T17:07:19.420Z","avatar_url":"https://github.com/xvik.png","language":"Groovy","readme":"# Gradle Github info plugin\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://www.opensource.org/licenses/MIT)\n[![CI](https://github.com/xvik/gradle-github-info-plugin/actions/workflows/CI.yml/badge.svg)](https://github.com/xvik/gradle-github-info-plugin/actions/workflows/CI.yml)\n[![Appveyor build status](https://ci.appveyor.com/api/projects/status/github/xvik/gradle-github-info-plugin?svg=true)](https://ci.appveyor.com/project/xvik/gradle-github-info-plugin)\n[![codecov](https://codecov.io/gh/xvik/gradle-github-info-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/xvik/gradle-github-info-plugin)\n\n\n### About\n\nPlugin generates common github links (like repository, issues, vcs etc) for project and configures common plugins.\nThe main intention is to remove boilerplate and simplify project configuration.\n\nFeatures:\n\n* Supports plugins:\n    - `maven-publish` configure published pom sections (including license section)\n    - `plugin-publish` configure gradle plugin links\n* Conventional github links may be used directly to configure other plugins manually through `github` object (e.g. `github.site`)\n* In multi-module project always configures defaults from the root project\n\nYou can use it with [java-lib plugin](https://github.com/xvik/gradle-java-lib-plugin) to remove more configuration boilerplate\nfor java or groovy library or gradle plugin.\n\n##### Summary\n\n* Configuration closures: `github`\n\n### Setup\n\n[![Maven Central](https://img.shields.io/maven-central/v/ru.vyarus/gradle-github-info-plugin.svg)](https://maven-badges.herokuapp.com/maven-central/ru.vyarus/gradle-github-info-plugin)\n[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/ru/vyarus/github-info/ru.vyarus.github-info.gradle.plugin/maven-metadata.xml.svg?colorB=007ec6\u0026label=plugins%20portal)](https://plugins.gradle.org/plugin/ru.vyarus.github-info)\n\n```groovy\nbuildscript {\n    repositories {\n        gradlePluginPortal()\n    }\n    dependencies {\n        classpath 'ru.vyarus:gradle-github-info-plugin:2.0.0'\n    }\n}\napply plugin: 'ru.vyarus.github-info'\n```\n\nOR\n\n```groovy\nplugins {\n    id 'ru.vyarus.github-info' version '2.0.0'\n}\n```\n\n#### Compatibility\n\nPlugin compiled for java 8, compatible with java 17\n\nGradle | Version\n--------|-------\n7       | 2.0.0\n5.1     | [1.5.0](https://github.com/xvik/gradle-github-info-plugin/tree/1.5.0)\n\n#### Snapshots\n\n\u003cdetails\u003e\n      \u003csummary\u003eSnapshots may be used through JitPack\u003c/summary\u003e\n\n* Go to [JitPack project page](https://jitpack.io/#ru.vyarus/gradle-github-info-plugin)\n* Select `Commits` section and click `Get it` on commit you want to use\n  or use `master-SNAPSHOT` to use the most recent snapshot\n\n* Add to `settings.gradle` (top most!) (exact commit hash might be used as version) :\n\n  ```groovy\n  pluginManagement {\n      resolutionStrategy {\n          eachPlugin {\n              if (requested.id.id == 'ru.vyarus.github-info') {\n                  useModule('ru.vyarus:gradle-github-info-plugin:master-SNAPSHOT')\n              }\n          }\n      }\n      repositories {\n          gradlePluginPortal()      \n          maven { url 'https://jitpack.io' }              \n      }\n  }    \n  ``` \n* Use plugin without declaring version:\n\n  ```groovy\n  plugins {\n      id 'ru.vyarus.github-info'\n  }\n  ```  \n\n\u003c/details\u003e\n\n\n### Usage\n\nMinimum required configuration:\n\n```groovy\ngithub {\n    user 'test'\n    license 'MIT'    \n}\n```\n\nUser may be used to define either user or organization (links will be correct for both).\n`github.repository` will be set to project name by default (root project name in case of multi-module).\n\nOther license properties may be also required (see below).\n\nAll other properties are generated by conventions. You can override any property.\n\nIf some required properties are not set validation error will be thrown to prevent incorrect usage.\n\n#### Using in configurations\n\nAll properties may be used in other configurations\n\n```groovy\ngithub {\n    user 'test'\n    license 'MIT'\n}\n\nsomePlugin {\n    websiteUrl = github.site\n    vcsUrl = github.vcsUrl\n    importantFileUrl = github.rawFileUrl('IFile.txt')\n}\n```\n\n### Available properties\n\n| Property      | Description                                      | Default value                                                          |\n|---------------|--------------------------------------------------|------------------------------------------------------------------------|\n| user          | Github user or organization name                 |                                                                        |\n| repository    | Github repository name                           | $rootProject.name                                                      |\n| branch        | Branch name for file links                       | HEAD (to support both legacy 'master' and new 'main')                      |\n| license       | License short name (e.g. 'MIT')                  |                                                                        |\n| licenseName   | License full name (e.g. 'The MIT License')       | may be set by convention (see license section)                         |\n| licenseUrl    | Url to license file                              | may be set by convention (see license section)                         |\n| repositoryUrl | Github repository url                            | https://github.com/$user/$repository                                   |\n| issues        | Url to github issues                             | https://github.com/$user/$repository/issues                            |\n| site          | Project website                                  | $repositoryUrl                                                         |\n| vcsUrl        | Version control url                              | https://github.com/$user/${repository}                                 |\n| scmConnection | SCM connection url                               | scm:git:git://github.com/$user/${repository}                           |\n| changelogFile | Path to changelog file, relative to project root | CHANGELOG.md, CHANGELOG.txt or CHANGELOG if file found in project root |\n\n#### License\n\nPlugin contains hardcoded info for most common licenses:\n\n| License ID | License name |\n|------------|--------------|\n| Apache | [Apache License 2.0](http://opensource.org/licenses/Apache-2.0) |\n| GPLv2 | [GNU General Public License 2.0](http://opensource.org/licenses/GPL-2.0) |\n| GPLv3 | [GNU General Public License 3.0](http://opensource.org/licenses/GPL-3.0) |\n| AGPL | [GNU Affero General Public License 3.0](http://opensource.org/licenses/AGPL-3.0) |\n| LGPLv2.1 | [The GNU Lesser General Public License 2.1](http://opensource.org/licenses/LGPL-2.1) |\n| LGPLv3 | [The GNU Lesser General Public License 3.0](http://opensource.org/licenses/LGPL-3.0) |\n| MIT | [The MIT License](http://opensource.org/licenses/MIT) |\n| Artistic | [Artistic License 2.0](http://opensource.org/licenses/Artistic-2.0) |\n| EPL | [Eclipse Public License 1.0](http://opensource.org/licenses/EPL-1.0) |\n| BSD 3-clause | [The BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause) |\n| MPL | [Mozilla Public License 2.0](http://opensource.org/licenses/MPL-2.0) |\n\nIf `license` property value is one of license id above then `licenseName` will be set.\nOtherwise, `licenseName` must be specified manually.\n\n`licenseUrl` default:\n\n* Looks if `LICENSE` or `LICENSE.txt` file contained in project root, then url will be\n  `https://raw.githubusercontent.com/$user/$repository/HEAD/LICENSE` (or with txt extension accordingly)\n* If license file not found in project, but `license` matches known license id (table above) then url will be set as\n  link to `opensource.org` (see links above)\n* If neither license file found nor license id recognized then url must be set manually\n\n#### Utility method\n\n`github.rawFileUrl(file, branch)` method may be used in build script to generate direct (raw) urls to files on github repository.\n\nFor example,\n\n```groovy\ngithub.rawFileUrl('folder/file.txt')\n\n```\n\nWill generate the following url:\n\n```\nhttps://raw.githubusercontent.com/$user/$repository/HEAD/folder/file.txt\n```\n\nBranch parameter is optional ('HEAD' by default in order to support both old 'master' and new 'main' default branch names)\n\n### Plugins defaults\n\nPlugin recognize some common plugins and apply default values to them (but not overrides user configuration!)\n\n#### maven-publish\n\nIf [maven-publish](https://docs.gradle.org/current/userguide/publishing_maven.html) plugin available, then\nfor all defined publications pom will be extended with:\n\n```xml\n\u003curl\u003e${github.site}\u003c/url\u003e\n\u003cscm\u003e\n    \u003curl\u003e${github.vcsUrl}\u003c/url\u003e\n    \u003cconnection\u003e${github.scmConnection}\u003c/connection\u003e\n    \u003cdeveloperConnection\u003e${github.scmConnection}\u003c/developerConnection\u003e\n\u003c/scm\u003e\n\u003clicenses\u003e\n    \u003clicense\u003e\n        \u003cname\u003e${github.licenseName}\u003c/name\u003e\n        \u003curl\u003e%{github.licenseUrl}\u003c/url\u003e\n        \u003cdistribution\u003erepo\u003c/distribution\u003e\n    \u003c/license\u003e\n\u003c/licenses\u003e\n\u003cissueManagement\u003e\n    \u003csystem\u003eGitHub\u003c/system\u003e\n    \u003curl\u003e${github.issues}\u003c/url\u003e\n\u003c/issueManagement\u003e\n```\n\n#### plugin-publish\n\nIf [publish-plugin](https://plugins.gradle.org/docs/publish-plugin) plugin available, then following defaults\nwill be applied for gradle 7.6 and above:\n\n```groovy\ngradlePlugin {\n    website = github.site\n    vcsUrl = github.vcsUrl\n}\n```\n\nFor older gradle versions `pluginBundle` configured:\n\n```groovy\npluginBundle {\n    website = github.site\n    vcsUrl = github.vcsUrl\n}\n```\n\nSo you can avoid these properties in `gradlePlugin` configuration in your build file. If you manually specify any of these\nvalues it will not be overridden.\n\n### Might also like\n\n* [quality-plugin](https://github.com/xvik/gradle-quality-plugin) - java and groovy source quality checks\n* [pom-plugin](https://github.com/xvik/gradle-pom-plugin) - improves pom generation\n* [java-library generator](https://github.com/xvik/generator-lib-java) - java library project generator\n\n---\n[![gradle plugin generator](http://img.shields.io/badge/Powered%20by-%20Gradle%20plugin%20generator-green.svg?style=flat-square)](https://github.com/xvik/generator-gradle-plugin) \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxvik%2Fgradle-github-info-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxvik%2Fgradle-github-info-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxvik%2Fgradle-github-info-plugin/lists"}