GithubHelp home page GithubHelp logo

krishnatejakanchi / kotlin-android-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plastix/kotlin-android-boilerplate

0.0 1.0 0.0 4.8 MB

Kotlin Android boilerplate project with MVVM architecture using RxJava, Dagger 2, and more!

License: MIT License

Kotlin 98.86% Shell 1.14%

kotlin-android-boilerplate's Introduction

Kotlin-Android-Boilerplate CircleCI

An MVVM Boilerplate Android project written in Kotlin. This sample application fetches the top starred Kotlin repositories from Github and displays them. Inspired by @hitherejoe's Android-Boilerplate project.

Note: This project was developed before Google's introduction of Android Architecture Components at I/O 2017. I strongly encourage that you read their application architecture guide.

Screenshots

Libraries

Testing Libraries

Requirements

To compile and run the project you'll need:

Building

To build, install and run a debug version, run this from the root of the project:

./gradlew assembleDebug

Testing

To run unit tests on your machine:

./gradlew test

To run instrumentation tests on connected devices:

./gradlew connectedAndroidTest

Release Builds

A release build needs to be signed with an Android Keystore. The easiest way to generate a keystore is to open Android Studio and go to Build -> Generate Signed Apk -> Create New... After that you need to create a signing.properties file in the root directory and add the following info to it:

STORE_FILE=/path/to/your.keystore
STORE_PASSWORD=yourkeystorepass
KEY_ALIAS=projectkeyalias
KEY_PASSWORD=keyaliaspassword

Running ./gradlew assembleRelease will then build and sign a release version of the app.

FAQ

Why Kotlin?

In a nutshell, Kotlin throws all the bad parts of Java out the window and brings lots of great features from Java 8 and functional programming (Yet still compiling to Java 6 bytecode). Kotlin brings much needed language features to Android which is stuck on Java 6.

What is with all the interfaces?

By default Kotlin classes are closed (final). This makes them hard to mock unless you use a tool like Powermock. I'd rather just mock interfaces with Mockito than go through the hassle of using Powermock.

Update: Mockito 2.0 Supports mocking static and final out of the box. Thus, it removes the need for all of these interfaces.

How do I use this project?

This is a boilerplate project aimed to help bootstrap new Kotlin applications. Feel free to fork this application or use this project generator. Don't forget to change the following things for your application:

  • Application ID (Gradle)
  • Application Name (String resource)
  • Package names

Attributions

kotlin-android-boilerplate's People

Contributors

marcinmoskala avatar plastix avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.