Gradle Project & Developer Guidelines
Gradle is completely open source (ASLv2 license) and is a community driven development effort, led by Gradle Inc.
Along with the work of a small group of core developers, Gradle depends on great community contributions in order to keep improving. If you have a bug you’d love to see fixed or a feature that you think is missing, it might be a good candidate for a contribution.
If you decide you have the time and enthusiasm to help out, then great! But before you start, check out the workflow and guidelines below. Following these simple steps can help ensure that your code contribution ends up a valuable part of a future Gradle release.
This is the general process for contributing code to the Gradle project.
- Complete and electronically sign a Gradle CLA. You’ll need to sign one of these before any code contributions can be accepted into the Gradle codebase.
- Before starting to work on a feature or a fix, it’s generally a good idea to open a discussion about your proposed changes on the Gradle Developer List. Doing so helps to ensure that:
- You understand how your proposed changes fit with the strategic goals of the Gradle project.
- You can get feedback on your proposed changes, and suggestions as to the best approach to implementation.
- The Gradle core devs can create a Jira issue for the work if deemed necessary.
- You and the other devs can collaborate in creating a design document if deemed necessary.
- All code contributions should be submitted via a pull request from a forked GitHub repository.
- Once received, the pull request will be reviewed by a Gradle core developer. Your pull request will likely get more attention if you:
- Have first discussed the change on the Gradle Developer list.
- Have followed all of the Contribution Guidelines, below.
- After review, and usually after a number of iterations of development, your pull request may be merged into the Gradle distribution.
All code contributions should contain the following:
- Unit Tests (we love Spock) for any logic introduced.
- Integration Test coverage of the bug/feature at the level of build execution.
- Documentation coverage in the user guide, DSL Reference and JavaDocs where appropriate.
@authortags and committer names are not used in the codebase (contributions are recognised in the commit history and release notes)
If you’re not sure where to start, ask on the developer list. There’s likely a number of existing examples to help get you going.
Try to ensure that your code & tests will run successfully on Java 6, and on both *nix and Windows platforms. TheGradle CI will verify this, but it helps if things work first time. Pull requests are verified on Travis CI.
- Avoid using features introduced in Java 1.7 or later
- Be careful to normalise file paths in tests. The
org.gradle.util.TextUtilclass has some useful utility functions for this purpose.
The commit messages that accompany your code changes are an important piece of documentation, and help make your contribution easier to review. Follow these guidelines when creating public commits and writing commit messages.
- Keep commits discrete: avoid including multiple unrelated changes in a single commit.
- Keep commits self-contained: avoid spreading a single change across multiple commits. A single commit should make sense in isolation.
- The first line of your commit message should be a summary of the changes and intent of the change. Details should follow on subsequent lines, each line prefixed by ‘-‘.
- If your commit pertains to a Jira issue, include the issue number (eg GRADLE-3424) in the commit message.
GRADLE-2001 Ensure that classpath does not contain duplicate entries - details - sub-details - more details
2. An individual contributing under an existing company contributor agreement
3. A company wanting its employees to contribute