项目作者: moallemi

项目描述 :
A sample app illustrating Android development best practices with Android Jetpack.
高级语言: Kotlin
项目地址: git://github.com/moallemi/car-explorer.git
创建时间: 2019-05-09T07:23:28Z
项目社区:https://github.com/moallemi/car-explorer

开源协议:

下载


Car Explorer

A sample app illustrating Android development best practices with Android Jetpack.

Getting Started

This project uses the Gradle build system. To build this project, use the
gradlew build command or use “Import Project” in Android Studio.

There are Gradle tasks for testing the project:

  • test - for running unit tests

Android development

  • Foundation - Components for core system capabilities, Kotlin extensions and support for
    multidex and automated testing.
    • AppCompat - Degrade gracefully on older versions of Android.
    • Android KTX - Write more concise, idiomatic Kotlin code.
    • Test - An Android testing framework for unit and runtime UI tests.
  • Architecture - A collection of libraries that help you design robust, testable, and
    maintainable apps. Start with classes for managing your UI component lifecycle and handling data
    persistence.
    • Lifecycles - Create a UI that automatically responds to lifecycle events.
    • LiveData - Build data objects that notify views when the underlying database changes.
    • ViewModel - Store UI-related data that isn’t destroyed on app rotations. Easily schedule
      asynchronous tasks for optimal execution.
  • Third party
    • Dagger - For Dependency Injection
    • RxJava - To Manage async calls in reactive way
    • Picasso - For image loading

Development setup

For development, the latest version of Android Studio 3.4 is required. The latest version can be
downloaded from here.

Code style

Car Explorer uses ktlint to enforce Kotlin coding styles.
Here’s how to configure it for use with Android Studio (instructions adapted
from the ktlint README):

  • Close Android Studio if it’s open

  • Download ktlint using these installation instructions

  • Inside the project root directory run:

    ./ktlint --apply-to-idea-project --android

  • Start Android Studio

API keys

You need to supply API / client keys for the various services the
app uses. That is currently Google Maps Api Key. You can find information about
how to gain access via the relevant links.

When you obtain the keys, you can provide them to the app by putting the following in the
gradle.properties file in your user home:

Get this from Google Cloud Console

  1. car_explorer_google_maps_api_key=<insert>

On Linux/Mac that file is typically found at ~/.gradle/gradle.properties or in the project directory car-explorer/gradle.properties