Gradle plugin enforces licenses of dependencies to comply with definitions.
build.gralde.kts
plugins {
// ...
id("com.namics.oss.gradle.license-enforce-plugin") version "1.0-SNAPSHOT"
}
tasks.enforceLicenses {
allowedCategories = listOf("Apache", "BSD", "LGPL", "MIT", "ISC", "MPL")
}
Invoke:
gradle enforceLicenses
tasks.enforceLicenses {
failOnMissingLicenseInformation = false
allowedCategories = listOf("Apache", "BSD", "LGPL", "MIT", "ISC", "MPL", "GPLv2+CE", "WTFPL", "EPL", "CDDL", "CPL", "CC0")
allowedDependencies = listOf(
"this.is.good.licensed:artifact:1.0",
"this.is.good.licensed:ignoreVersionArtifact"
)
dictionaries = listOf("my-additional-dict.yml")
allowedLicenses = listOf("My Wonderful License")
analyseConfigurations = listOf("compile", "api", "implementation")
}
You may
- customize dictionaries
- all dictionaries are additive
- add a
license-dictionary.yaml
to your project.projectDir (convention for project specific dictionaries) - place a
yaml
somewhere else and add it to the task configurationdictionaries
- contribute to the bundled dictionary
- add specific
allowedDependencies
orallowedLicenses
to the task configuration
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header is mandatory and the scope of the header is optional.
Appears under "Features" header, pencil subheader:
feat(pencil): add 'graphiteWidth' option
Appears under "Bug Fixes" header, graphite subheader, with a link to issue #28:
fix(graphite): stop graphite breaking when width < 0.1
Closes #28
If the commit reverts a previous commit, it should begin with revert:
, followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>.
, where the hash is the SHA of the commit being reverted.
If the prefix is feat
, fix
or perf
, it will appear in the changelog. However if there is any BREAKING CHANGE, the commit will always appear in the changelog.
Other prefixes are up to your discretion. Suggested prefixes are docs
, chore
, style
, refactor
, and test
for non-changelog related tasks.
The scope could be anything specifying place of the commit change. For example $location
,
$browser
, $compile
, $rootScope
, ngHref
, ngClick
, ngView
, etc...
The subject contains succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes.
Breaking Changes should start with the word BREAKING CHANGE:
with a space or two newlines. The rest of the commit message is then used for this.
A detailed explanation can be found in this document.
Based on https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit