Skip to content

adessoTurkey/android-sample-app

Repository files navigation

GitHub Actions CircleCI

Development

API Key

To run the application you need to supply an API key from TMBD. When you get the key please add following variable to your local environment:

API_KEY_TMDB = Your API Key

How to set an environment variable in Mac / Windows

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

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

License

Copyright 2020 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.