Skip to content

Latest commit

 

History

History
115 lines (74 loc) · 3.14 KB

CONTRIBUTING.md

File metadata and controls

115 lines (74 loc) · 3.14 KB

How to Contribute

If you think that you can add a new feature or want to fix a bug, we invite you to contribute to Sleepometer-Android-App and make this project better. To start contributing, follow the below instructions:

  1. Create a folder at your desire location (usually at your desktop).

  2. Open Git Bash Here

  3. Create a Git repository.

    Run command git init

  4. Fork this Repo

  5. Clone your forked repository of project.

git clone https://github.com/<your_username>/Sleepometer-Android-App.git
  1. Navigate to the project directory.
cd Sleepometer-Android-App
  1. Add a reference(remote) to the original repository.
git remote add upstream https://github.com/maityamit/Sleepometer-Android-App.git
  1. Check the remotes for this repository.
git remote -v
  1. Always take a pull from the upstream repository to your main branch to keep it updated as per the main project repository.
git pull upstream main
  1. Create a new branch(prefer a branch name that relates to your assigned issue).
git checkout -b <YOUR_BRANCH_NAME>

Setup firebase configuration

  1. First update your Android studio to the latest version.

  2. To setup firebase for development on your local system, comment out all the firebase dependencies in the app level build.gradle file and run gradle sync.

  3. Create a project on Firebase and add the package name of the project sleepometerbyamitmaity.example.sleepometer

  4. Register your app with firebase.

  5. Enable Google Sign in authentication and Realtime Database in your Firebase project.

  6. Add your SHA1 and SHA256 fingerprints to the app in the firebase project settings.

  • For windows
keytool -list -v -keystore C:\Users\your_user_name\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
  • For mac
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
  1. Download the google-services.json file in your firebase project and replace it with the google-services.json present in the cloned project.

  2. Uncomment all the firebase dependencies and run gradle sync again.

  3. Copy the Oauth client ID from google-services.json (usually on line 18) and paste it into the server client ID in strings.xml.

  4. Perform your desired changes to the code base.

  5. Check your changes.

git status
git  diff
  1. Stage your changes.
git add . <\files_that_you_made_changes>
  1. Commit your changes.
git commit -m "relavant message"
  1. Push the committed changes in your feature branch to your remote repository.
git push -u origin <your_branch_name>
  1. To create a pull request, click on compare and pull requests.

  2. Add an appropriate title and description to your PR explaining your changes.

  3. Click on Create pull request.

Congratulations🎉, you have made a PR to the Sleepometer-Android-App. Wait for your submission to be accepted and your PR to be merged by a maintainer.