1*fb508042SAndroid Build Coastguard WorkerHow to contribute 2*fb508042SAndroid Build Coastguard Worker================= 3*fb508042SAndroid Build Coastguard Worker 4*fb508042SAndroid Build Coastguard WorkerThank you so much for wanting to contribute to Guava! Here are a few important 5*fb508042SAndroid Build Coastguard Workerthings you should know about contributing: 6*fb508042SAndroid Build Coastguard Worker 7*fb508042SAndroid Build Coastguard Worker1. API changes require discussion, use cases, etc. Code comes later. 8*fb508042SAndroid Build Coastguard Worker2. Pull requests are great for small fixes for bugs, documentation, etc. 9*fb508042SAndroid Build Coastguard Worker3. Pull requests are not merged directly into the master branch. 10*fb508042SAndroid Build Coastguard Worker4. Code contributions require signing a Google CLA. 11*fb508042SAndroid Build Coastguard Worker 12*fb508042SAndroid Build Coastguard WorkerAPI changes 13*fb508042SAndroid Build Coastguard Worker----------- 14*fb508042SAndroid Build Coastguard Worker 15*fb508042SAndroid Build Coastguard WorkerWe make changes to Guava's public [APIs][], including adding new APIs, very 16*fb508042SAndroid Build Coastguard Workercarefully. Because of this, if you're interested in seeing a new feature in 17*fb508042SAndroid Build Coastguard WorkerGuava, the best approach is to create an [issue][] (or comment on an existing 18*fb508042SAndroid Build Coastguard Workerissue if there is one) requesting the feature and describing specific use cases 19*fb508042SAndroid Build Coastguard Workerfor it. 20*fb508042SAndroid Build Coastguard Worker 21*fb508042SAndroid Build Coastguard WorkerIf the feature has merit, it will go through a thorough process of API design 22*fb508042SAndroid Build Coastguard Workerand review. Any code should come after this. 23*fb508042SAndroid Build Coastguard Worker 24*fb508042SAndroid Build Coastguard Worker[APIs]: https://en.wikipedia.org/wiki/Application_programming_interface 25*fb508042SAndroid Build Coastguard Worker[issue]: https://github.com/google/guava/issues 26*fb508042SAndroid Build Coastguard Worker 27*fb508042SAndroid Build Coastguard WorkerPull requests 28*fb508042SAndroid Build Coastguard Worker------------- 29*fb508042SAndroid Build Coastguard Worker 30*fb508042SAndroid Build Coastguard WorkerUnless the change is a trivial fix such as for a typo, it's generally best to 31*fb508042SAndroid Build Coastguard Workerstart by opening a new issue describing the bug or feature you're intending to 32*fb508042SAndroid Build Coastguard Workerfix. Even if you think it's relatively minor, it's helpful to know what people 33*fb508042SAndroid Build Coastguard Workerare working on. And as mentioned above, API changes should be discussed 34*fb508042SAndroid Build Coastguard Workerthoroughly before moving to code. 35*fb508042SAndroid Build Coastguard Worker 36*fb508042SAndroid Build Coastguard WorkerSome examples of types of pull requests that are immediately helpful: 37*fb508042SAndroid Build Coastguard Worker 38*fb508042SAndroid Build Coastguard Worker - Fixing a bug without changing a public API. 39*fb508042SAndroid Build Coastguard Worker - Fixing or improving documentation. 40*fb508042SAndroid Build Coastguard Worker - Improvements to Maven configuration. 41*fb508042SAndroid Build Coastguard Worker 42*fb508042SAndroid Build Coastguard WorkerGuidelines for any code contributions: 43*fb508042SAndroid Build Coastguard Worker 44*fb508042SAndroid Build Coastguard Worker 1. Any significant changes should be accompanied by tests. The project already 45*fb508042SAndroid Build Coastguard Worker has good test coverage, so look at some existing tests if you're unsure 46*fb508042SAndroid Build Coastguard Worker how to go about it. 47*fb508042SAndroid Build Coastguard Worker 2. All contributions must be licensed Apache 2.0 and all files must have a 48*fb508042SAndroid Build Coastguard Worker copy of the boilerplate license comment (can be copied from an existing 49*fb508042SAndroid Build Coastguard Worker file). 50*fb508042SAndroid Build Coastguard Worker 3. Files should be formatted according to Google's [Java style guide][]. 51*fb508042SAndroid Build Coastguard Worker 4. Please squash all commits for a change into a single commit (this can be 52*fb508042SAndroid Build Coastguard Worker done using `git rebase -i`). Do your best to have a 53*fb508042SAndroid Build Coastguard Worker [well-formed commit message][] for the change. 54*fb508042SAndroid Build Coastguard Worker 55*fb508042SAndroid Build Coastguard Worker[Java style guide]: https://google.github.io/styleguide/javaguide.html 56*fb508042SAndroid Build Coastguard Worker[well-formed commit message]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html 57*fb508042SAndroid Build Coastguard Worker 58*fb508042SAndroid Build Coastguard Worker#### Merging pull requests #### 59*fb508042SAndroid Build Coastguard Worker 60*fb508042SAndroid Build Coastguard WorkerDue to Guava's nature as a subset of Google's internal codebase which is 61*fb508042SAndroid Build Coastguard Workerautomatically synced to the public GitHub repository, we are unable to merge 62*fb508042SAndroid Build Coastguard Workerpull requests directly into the master branch. Instead, once a pull request is 63*fb508042SAndroid Build Coastguard Workerready for merging, we'll make the appropriate changes in the internal codebase 64*fb508042SAndroid Build Coastguard Workerand, when the change is synced out, give the pull request author credit for the 65*fb508042SAndroid Build Coastguard Workercommit. 66*fb508042SAndroid Build Coastguard Worker 67*fb508042SAndroid Build Coastguard WorkerContributor License Agreement 68*fb508042SAndroid Build Coastguard Worker----------------------------- 69*fb508042SAndroid Build Coastguard Worker 70*fb508042SAndroid Build Coastguard WorkerContributions to any Google project must be accompanied by a Contributor 71*fb508042SAndroid Build Coastguard WorkerLicense Agreement. This is not a copyright _assignment_; it simply gives 72*fb508042SAndroid Build Coastguard WorkerGoogle permission to use and redistribute your contributions as part of the 73*fb508042SAndroid Build Coastguard Workerproject. 74*fb508042SAndroid Build Coastguard Worker 75*fb508042SAndroid Build Coastguard Worker - If you are an individual writing original source code and you're sure you 76*fb508042SAndroid Build Coastguard Worker own the intellectual property, then you'll need to sign an [individual 77*fb508042SAndroid Build Coastguard Worker CLA][]. Please include your GitHub username. 78*fb508042SAndroid Build Coastguard Worker - If you work for a company that wants to allow you to contribute your work, 79*fb508042SAndroid Build Coastguard Worker then you'll need to sign a [corporate CLA][]. 80*fb508042SAndroid Build Coastguard Worker 81*fb508042SAndroid Build Coastguard WorkerYou generally only need to submit a CLA once, so if you've already submitted 82*fb508042SAndroid Build Coastguard Workerone (even if it was for a different project), you probably don't need to do it 83*fb508042SAndroid Build Coastguard Workeragain. 84*fb508042SAndroid Build Coastguard Worker 85*fb508042SAndroid Build Coastguard Worker[individual CLA]: https://cla.developers.google.com/about/google-individual 86*fb508042SAndroid Build Coastguard Worker[corporate CLA]: https://developers.google.com/open-source/cla/corporate 87