Skip to content

Instantly share code, notes, and snippets.

@kevinah95
Last active November 3, 2024 04:10
Show Gist options
  • Save kevinah95/b985a88c8ac605cb37f422bd1d625c4b to your computer and use it in GitHub Desktop.
Save kevinah95/b985a88c8ac605cb37f422bd1d625c4b to your computer and use it in GitHub Desktop.

FAQ

How to upload multiple Android projects in one repository?

On Android File > New > New Module > then Create a Module or Import a Module

That will help to work on the same repo having different android projects that's how this open source does it https://github.com/braintree/braintree_android

Ref: https://stackoverflow.com/a/73139264/4752488

And what if we want to create modules inside a subdirectory?

Let's say you want to create a new module 'myfeature' and place it inside the 'features' folder:

  1. File -> New -> New Module
  2. In the Templates pane choose Android Library
  3. In the Module Name write ':features:myfeature'
  4. modify the rest of the fields to suit your needs
  5. Click on Finish

Now if you didn't have a 'features' folder it will be automatically created and a new module named 'myfeature' will be placed inside it. Otherwise the new module will appear inside the existing 'features' module.

Ref: https://stackoverflow.com/a/77579249/4752488

Use spotless to add kt file header

Tip: Add kt file header.

Example of code: https://github.com/skydoves/android-developer-roadmap/blob/main/build.gradle#L17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment