Skip to content

Latest commit

 

History

History
116 lines (89 loc) · 3.99 KB

CONTRIBUTING.md

File metadata and controls

116 lines (89 loc) · 3.99 KB

Contributing

Issues, Bugs, Feature or Component Requests

While we currently don't accept issues from people outside the Adevinta Platform to this repo, we welcome discussions and questions here!

If you're part of the Adevinta Platform ⬇️

Requirements

This repository uses git-lfs to handle cashapp/paparazzi screenshot testing.
If you introduce visible changes, you'll likely have to update screenshots files for the tests to pass.

# Install
brew install git-lfs
# Check
git lfs install

We currently use AGP 8.1.0 which requires developers to use JDK 17 on Gradle JDK.

If you're on macOS, you can install it with brew

brew install openjdk@17

ℹ️ If you're using a device with Apple silicon (M1/M2) then you might need to install a zulu distribution

or install it directly from Android Studio:
FileSettingsBuild, Execution, DeploymentBuild ToolsGradleGradle JDK

Gradle tasks

Here is a list of Gradle tasks commonly used in this project:

  • Code formatting: run spotless formatter
    ./gradlew spotlessApply
  • Building: assemble all modules in release mode
    ./gradlew assembleRelease
  • Testing: run all unit tests and screenshot tests
    ./gradlew globalCiUnitTest verifyPaparazziRelease
  • Screenshot testing: record golden images
    ./gradlew cleanRecordPaparazziRelease
  • Linting: run Lint analysis
    ./gradlew lintRelease
  • Deploying: publish all Maven publications to the local Maven cache ~/.m2.
    ./gradlew publishToMavenLocal
  • Dokka: generate Dokka documentation website
    ./gradlew dokkaHtmlMultiModule --no-configuration-cache
    python3 -m http.server --directory build/dokka
    # Open http://[::]:8000

Pull Requests

The best way to make an impact is by creating code submissions called pull requests. Pull requests should be ‘solutions’ to GitHub issues.

To make a pull request:

  1. Make sure there’s a GitHub issue for the change you’re proposing.
  2. Fork the repo for the platform your code works in.
  3. Write code in your fork, on a branch if you plan to make multiple changes.
  4. Create a pull request to merge your branch’s contributions into the corresponding Spark repo by following the .
  5. The pull request will be triaged by a #spark-dev member and code reviewed by a #spark-contributors-android member.
  6. If the pull request is accepted, the accepting #spark-dev member will merge the pull request for you.

What if I already made a pull request but want to add more commits?

If you correctly created a new branch for your changes, you can simply upload the new commits to your fork and they will automatically appear in the PR.

Code review

Regardless of language or platform, all code goes through code review before it can be merged into main branches.

We use a set of tools to ensure that the code quality stays high and that the code is consistent across the codebase.

So you might see :

  • Some comments on your review from bots like automatic highlighting of lint warnings/errors introduced.
  • We're using screenshot testing to ensure that the UI is not broken by changes. If you introduce visible changes, you'll likely have to update screenshots files for the test to pass.
  • We're using commit convention for the PR title you can find more information here.