GithubHelp home page GithubHelp logo

thenishchalraj / android-mvvm-boilerplate-creater Goto Github PK

View Code? Open in Web Editor NEW
71.0 3.0 12.0 225 KB

A script that automates the tedious task of creating basic android files with the packages and imports for MVVM architecture.

License: MIT License

Shell 100.00%
android mvvm-android mvvm-architecture android-development android-architecture script shell-script bash-script android-studio mvvm

android-mvvm-boilerplate-creater's Introduction

Hey there!

Android MVVM Boilerplate Creater Logo

Android MVVM Boilerplate Creater

A script that creates the files and codes in them for android MVVM architecture in kotlin.

Android-MVVM-Boilerplate-Creater - behind the scenes

Features

  • Type command > Enter > Done. (it's that fast)
  • Each layer in different package.
  • Generates basic utility package too.
  • Packages with all the basic codes in Kotlin.
  • Contains imports for all the files created.
  • Uses Retrofit2, Dagger2 and Lifecycle.
  • Dependencies and suggestions after boilerplate created.

Steps to run

(tested on linux)

METHOD 1:

  • Go to the release space here
  • Download suitable Asset
  • Extract it
  • Move into the directory
  • Modify the file permission (if applicable)
  • Run according to the usage

METHOD 2:

  • git clone https://github.com/thenishchalraj/Android-MVVM-Boilerplate-Creater.git
  • cd Android-MVVM-Boilerplate-Creater
  • chmod +x ./mvvm_creater.sh
  • (for demo) ./mvvm_creater.sh ~/testing_dir Weather com.example.weatherapp

Boom! you're done.

Packages and files that are created

.
└── data/
    ├── api/
    │   ├── MainApi.kt
    │   └── MainDataSource.kt
    ├── model/
    │   └── SomeModel.kt
    ├── repository/
    │   └── MainRepository.kt
    ├── di/
    │   ├── base/
    │   │   ├── AppComponent.kt
    │   │   ├── AppModule.kt
    │   │   ├── ViewModelFactoryModule.kt
    │   │   ├── ViewModelKey.kt
    │   │   └── ViewModelModule.kt
    │   ├── ActivityBuildersModule.kt
    │   └── MainModule.kt
    ├── ui/
    │   ├── base/
    │   │   └── ViewModelFactory.kt
    │   └── main/
    │       ├── view
    │       └── viewmodel/
    │           └── MainViewModel.kt
    ├── utils/
    │   ├── Endpoints.kt
    │   ├── ISTDateDeserializer.kt
    │   ├── Resource.kt
    │   └── Status.kt
    └── WeatherApplication.kt

Usage

  • -h (shows help)
  • -s (shows suggestions)
  • -d (shows used dependencies)
  • arguments 1, 2, 3 (path-to-directory, base application name, application package name)

ToDos

  • Make the script compact/optimized
  • Different scripts for different architecture (MVP, MVC, Full-Modular or some best techniques)
  • Make and test its working on windows & mac

References

Contribution

Fork the repository, either do your own improvements or pick something from the ToDos or Issues and start a PR to the dev branch after successful testing.

License

Read the license here

android-mvvm-boilerplate-creater's People

Contributors

thenishchalraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.