Android generator based on MVP, Dagger2, RxJava, Java & Kotlin Stack and usefull libraries for Android
> Latest version: 1.0.1
> Update with npm update -g generator-android-hipster
> Info with npm info generator-android-hipster
---
It provides a generator to create and maintain a android application based on the latests frameworks and patterns used by the community.
Stack:
- Kotlin
- RxJava
- RxAndroid
- MVP
- Interactors / UseCases
- Repositories
- Flavors like used in u2020
- Dagger2
- Scoped dependencies
- Event bus systems (EventBus / Otto)
- Stetho
- Retrofit / OkHttp
- Timber
- Image Loaders (Glide / Picasso)
- Google Play Services
- Push notifications
- ButterKnife
- Anko (kotlin)
- JodaTimeAndroid / Jodamoney
- Gson
- MixPanel
- Storage in SharedPreferences using Gson
- PrintView
- Calligraphy
- AutoValue / AutoParcel
Some of these technologies are optional, and you can choose what you want to use answering the questions when you create the project.
Some of them are mandatory, but can be optional soon. If you have any questions, please create a new issue and we will discuss.
---
- Create a new Activity
* Create new Activity (including resources and AndroidManifest.xml update)
* Create a new Dagger2 Component / Module or use the ApplicationComponent
* Create a Fragment (optional)
* For all cases, create the presenter
* Inject the presenter into Activity / Fragment
* Create a View interface for communication between Presenter -> View
- Create a new Entity
* It will create a model (AutoParcel), an Entity class for REST / DB communication, and a converter to parse from Entity <- -> Model class.
- Create a Interactor
* Create a base interactor.
* Use with or without Interface
* Interface use @Provides in ApplicationModule
- Create a UseCase
* Same as Interactor, but different name =)
* It equal to Interactor generation, future changes proof.
* Use with or without Interface
* Interface use @Provides in ApplicationModule
- Create a repository
* Create a repository layer (To manage calls to Remote / Local Repository without exposing them to Interactors / UseCases)
* Can create a RemoteRepository class (for REST)
* Can create a LocalRepository class (for local DB)
* Use with or without Interface
* Interface use @Provides in ApplicationModule
- Create a Push architecture:
* Create the classes to handle push notifications like this article
- Update gradle dependencies
* Update gradle dependencies to latest stable versions with just one command.
Check this article
Any suggestions? Please let me know!
First, install Yeoman and generator-android-hipster using npm (we assume you have pre-installed node.js).
``bash`
npm install -g yo
npm install -g generator-android-hipster
`bash`
yo android-hipster
`bash`
yo android-hipster:update-dependencies
`bash`
yo android-hipster:activity
`bash`
yo android-hipster:fragment
`bash`
yo android-hipster:interactor
`bash`
yo android-hipster:usecase
`bash`
yo android-hipster:repository
`bash`
yo android-hipster:entity
`bash``
yo android-hipster:push
[npm-image]: https://badge.fury.io/js/generator-android-hipster.svg
[npm-url]: https://npmjs.org/package/generator-android-hipster
[travis-image]: https://travis-ci.org/cavarzan/generator-android-hipster.svg?branch=master
[travis-url]: https://travis-ci.org/cavarzan/generator-android-hipster
[daviddm-image]: https://david-dm.org/cavarzan/generator-android-hipster.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/cavarzan/generator-android-hipster
[coveralls-image]: https://coveralls.io/repos/cavarzan/generator-android-hipster/badge.svg
[coveralls-url]: https://coveralls.io/r/cavarzan/generator-android-hipster