We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
The first step to contributing is to fork the repository and clone it onto your machine.
-
Ensure you have Java version 8 or later installed on your machine.
-
Try running some tests.
- Run
./mvnw clean test
in the root directory of the project to run the tests.The./mvnw
is a self-contained Maven wrapper that allows you to build the project without having Maven installed on your local machine. - You can run the tests of a specific module by using the
-f
flag like this:./mvnw clean test -f spring-cloud-gcp-pubsub
- Run
-
(Optional) Install the Google Cloud SDK. The Google Cloud SDK a set of tools that you can use to manage resources and applications hosted on Google Cloud.
-
For our purposes, it contains the
gcloud
command line tool which allows you to specify a GCP account and project with which you can run our integration tests and sample applications on your machine.-
Run
gcloud auth application-default login
to log into your Google Cloud account. -
Run
gcloud config set project [YOUR_PROJECT_ID]
to set the GCP project ID you wish to use. -
Verify your settings using
gcloud config list
. This will display the account settings that will be used to authenticate with Google Cloud on your machine.
-
-
NOTE: These methods are recommended for local development only and not for production use. It is recommended to use Service Accounts for authentication in production applications.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
- Identify an existing issue to associate with your proposed change, or file a new issue.
- Fork the repository, develop and test your code changes.
- Commit your changes with meaningful messages (commit message best practices)
- Ensure that your code adheres to the Google Java Style Guide.
- Ensure your code has an appropriate set of unit tests which all pass.
- If you haven’t already done so, sign a Contributor License Agreement.
- Create a pull request with the proposed code change, to be reviewed by a member of the team.
When submitting code, please follow Java Google code style guidelines. If you are developing with Eclipse or Intellij, the easiest way is to import the Java style configurations found here.
You may find the google-java-format tool helpful for formatting your code. It is also available as an IntelliJ plugin or Eclipse plugin.
This project follows Google's Open Source Community Guidelines.