Image for post
Image for post
Basic overview of AOSP

Submitting a patch to AOSP

Google has the AOSP (Android Open Source Project) where you can find most of the source code regarding the Android ecosystem. Gradle Plugins, R8/D8, Lint and many other things are located there.

Submitting a patch is easier than expected. Last year, I’ve submitted my first patch —

So let’s get started and see how we can set up our machine so we can contribute.


We need to authenticate our self with Google. Just go with the instructions on this link —- — your Google account will be used and you will end up with a Git Cookie for authentication.

This only needs to be done once per machine.

Environment setup

We need to use repo. According to Google, repo is a tool that makes it easier to work with Git in the context of Android. There’s more information here.

So, let’s start by installing repo and making it executable:

If you’re on Mac you can also install it via brew: brew install repo

Now, we can use repo to initialize and checkout our desired branch — which will take a while:

Once everything is done, you can open the project where you want to contribute to with IntelliJ. Everything should be checked in as IntelliJ projects so there’s no need to use the build.gradle files for opening them.


Now it’s up to you and you can start tinkering around. After you have made your changes you can use repo to sync and create your first contribution:

git commit -s will open your default editor where you can place your title and description of your commit. An example would look like this:

Once you’ve entered your commit message you can upload your changes with repo upload. It will create the patch and now you can request reviews.

That’s all.

Final phase

Tor reviewed my contribution and gave me some feedback. In the end, he made some changes around it and in October 2018 it landed and is now being shipped to everyone who is using Lint with the Android Gradle Plugin 3.4.x or higher —

Happy contributing!

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store