Boilerplate project for Android apps. The template that I use for the apps that I build.
Nodejs developer? I have a boilerplate project for you! iOS developer? I have a boilerplate project for you!
AndroidBlanky has been modified over years of building Android apps. Through experience, I try to improve the way that I build Android apps as I encounter common bugs and annoyances. After each encounter, some engineering work is done to help remove that annoyance and prevent that bug from happening again.
AndroidBlanky comes equipped with the following goals:
This project attempts to be as small as possible to help you get up and running, fast. To stay small, here are the specific tasks that the project attempts to complete. Try to be no more, no less.
Decisions made for this project
@Inject
to classes. I like to avoid dependencies that deeply embed in a project and are difficult to replace at a later time if chosen. When I build apps, I like to use some external development services/tools to improve my developer experience and user experience. Here is a list of these services:
For privacy reasons, I like to avoid using 3rd party services for my apps.
Below is a list of development tools that are used in this project. These are tools beyond the typical Android development tools that are common amongst Android developers such as Android Studio. Check out the app's build.gradle
files to see what Android specific tools and libraries are installed in the app.
Follow the instructions below to get the project setup so you can begin development!
But wait!... If you are here looking to build a brand new app, follow the instructions in this document to do some initial setup of the project. If someone else on your development team has already setup the project for you, you can skip reading that document and proceed with the instructions below.
After you clone the GitHub repository on your computer, follow these instructions:
brew install ktlint
on macOS to install. See this doc to install on any other OS. You know you have bundler installed when you run ktlint --version
on your computer and get an output like this: X.X.X
./.github/workflows/test.yml
and view the java version the CI server is using. That's the Java version you should use for local development. ./hooks/autohook.sh install # Install git hooks
Open Android Studio. Select Import project (gradle)
. Then, select the root directory of this project on your computer.
You're all set! Compile the app within Android Studio. You can also execute unit, integration, and UI tests within Android Studio. This document tells you how to run tests within Android Studio.
This may not work at this time... I want to take a step back and reconsider the implementation. See if there is a better way.
Need to take screenshots of the app for the app store? Screenshots are generated automatically for you through Espresso UI tests. To create screenshots, do the following steps:
@ScreenshotOnly
to an androidTest
instrumentation test function in your Espresso tests to mark a test as one you want to have a screenshot taken for you.screenshotUtil.takeForStore("Home screen")
to have a screenshot taken for you.fastlane/Fastfile
to include the ones you need.bundle exec fastlane create_screenshots
.At this time, screenshots are meant to be created on your development machine and manually upload screenshots to the Play Console.
AndroidBlanky is not open for contributions at this time. This project showcases my preferred way to build an Android app. If you wish to make edits, by all means, fork the repo and make your edits in your own copy of the repo.