Github info extension. Repository name is set to project name by default. Required fields are: user and license.
licenseUrl will lead to LICENSE or LICENSE.txt file if it exists in project root.
Most useful licenses are recognized and licenseName and licenseUrl could be set automatically (see LicenseHelper for all supported). If license is not recognized, other license properties must be filled manually.
Other fields are generated automatically using conventions, but they still may be overridden manually.
For example, minimal configuration:
github {
user 'user'
license 'MIT'
}
Generated fields may be used in other configurations like pom generation or bintray upload.
Simply reference required property github.site
Special method rawFileUrl may be used to generate direct links to files on github repository.
| Type | Name and description |
|---|---|
java.lang.String |
changelogFile |
java.lang.String |
issues |
java.lang.String |
licenseLicense short name (e.g. |
java.lang.String |
licenseName |
java.lang.String |
licenseUrl |
java.lang.String |
repositoryGithub repository name. |
java.lang.String |
repositoryUrl |
java.lang.String |
scmConnection |
java.lang.String |
site |
java.lang.String |
userGithub user (or organization) name. |
java.lang.String |
vcsUrl |
| Constructor and description |
|---|
GithubInfoExtension
(org.gradle.api.Project project) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.String |
baseUrlPart()@return base repository url part (without protocol: 'github.com/user/repo') |
|
java.lang.String |
getChangelogFile()Changelog file path relative to root. |
|
java.lang.String |
getIssues()Issue tracker url. |
|
java.lang.String |
getLicenseName()License name (e.g. |
|
java.lang.String |
getLicenseUrl()License url. |
|
java.lang.String |
getRepositoryUrl()Repository url (github site link). |
|
java.lang.String |
getScmConnection()Scm connection url. |
|
java.lang.String |
getSite()Site url. |
|
java.lang.String |
getVcsUrl()Vcs url. |
|
java.lang.String |
rawFileUrl(java.lang.String filePath, java.lang.String branch = 'master')@param filePath file path from project root |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
License short name (e.g. MIT). Required field.
Github repository name. If not specified will be the same as project name.
Github user (or organization) name. Required field.
Changelog file path relative to root. Default to CHANGELOG.md, CHANGELOG.txt or CHANGELOG if file with this name found in project root, otherwise should be specified manually. (for now, only bintray support this optional info)
Issue tracker url. By default, github issues url (https://github.com/user/repo/issues).
License name (e.g. The MIT License). Required for some licenses.
License url. If LICENSE (or LICENSE.txt) file contained in repository root, url will lead to this file, otherwise field must be filled manually for some licenses.
Repository url (github site link). By default, https://github.com/user/repo
Scm connection url. By default, git scm url (scm:git:git://github.com/user/repo)
Site url. By default, repository url (https://github.com/user/repo)
Vcs url. By default, github git url (https://github.com/user/repo)
filePath - file path from project rootbranch - git branch (master by default)Groovy Documentation