Skip to content

adessoTurkey/android-boilerplate

Repository files navigation

GitHub Actions CircleCI CodeStyle Kotlin Version Gradle API License

Android Boilerplate

Android boilerplate app that showcases architecture and libraries used at adesso Turkey.

There are two simple list-detail pages to show basic implementations followed.

For more detailed implementation, please have a look Android sample app developed with this Android boilerplate.

Movie list (Light) Movie detail (Dark)

Prerequisites

  • API Key

To run the application, an API key from TMBD should be supplied. WIt should be added following variable to local environment:

API_KEY_TMDB = Your API Key

How to set an environment variable in Mac (Bash) / Mac (Zsh) / Windows

  • Keystore details (Release builds only)

To be able to build the application with release configs, keystore details should be set. It would be enough to rename keystore.properties.sample file as keystore.properties, and update the content.

Keystore file will be resolved at root level build.gradle file if the build variant is release.

Here is a sample keystore.properties file:

RELEASE.STORE_FILE=./movee.keystore
RELEASE.STORE_PASSWORD=password-for-store
RELEASE.KEY_ALIAS=alias-for-key
RELEASE.KEY_PASSWORD=password-for-key

Development

Code style *

To maintain the style and quality of the code, are used the bellow static analysis tools. All of them use properly configuration and you find them in the project root directory config/.{toolName}.

Tools Config file Check command Fix command
detekt .detekt.yml ./gradlew detekt -
ktlint - ./gradlew ktlint ./gradlew ktlintFormat
spotless - ./gradlew spotlessCheck ./gradlew spotlessApply
lint .lint.xml ./gradlew lint -
gradle versions plugin - ./gradlew dependencyUpdates -

All these tools, except Gradle Versions Plugin, are integrated in pre-commit git hook, in order ensure that all static analysis and tests passes before you can commit your changes. Gradle Versions Plugin can be run optionally. To skip them for specific commit add this option at your git command:

git commit --no-verify

It's highly recommended to fix broken code styles. There is a gradle task which execute ktlintFormat and spotlessApply for you:

./gradlew reformat

There is another gradle task checkFormat which executes detekt, ktlint, spotlessCheck and lint to check the code style:

./gradlew checkFormat

The pre-commit git hooks have exactly the same checks as CircleCI and are defined in this script. This step ensures that all commits comply with the established rules. However the continuous integration will ultimately be validated that the changes are correct.

If you want to know more about naming convention, code style and more please look at our Android guideline repository.

Architecture

  • Single Activity
  • MVVM Pattern

View: Renders UI and delegates user actions to ViewModel

ViewModel: Can have simple UI logic but most of the time just gets the data from UseCase

UseCase: Contains all business rules and they written in the manner of single responsibility principle

Repository: Single source of data. Responsible to get data from one or more data sources

Tech Stack

Dependencies

Plugins

Join the crew!

Act now to join our team and become an adessi — enjoy a Great Place to Work!

License

Copyright 2022 adesso Turkey

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Android boilerplate app that showcases architecture and libraries used at adesso Turkey

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published