-
Notifications
You must be signed in to change notification settings - Fork 22
Home
Android library for boilerplate destruction - "Just code what is worth coding"
- Generates boilerplate code based on used annotations and lets you focus on what matters.
- Generated code is fully traceable.
- Everything is generated during compile time.
- No reflection used!
- Consists of modules.
This library is divided into several modules. Each module provides different annotation and support classes:
Special annotation:
##1. Create configuration file
named blade.yaml
in application directory with Blade modules you need: (or download from sample app)
modules:
- arg
- extra
- mvp
- parcel
- state
When you change the file run gradle sync in order to refresh dependencies!
JSON format is still supported (as it was used by older versions).
So if you want you can create blade.json
instead.
{
"modules": [
"arg",
"extra",
"mvp",
"parcel",
"state"
]
}
##2. Apply Gradle plugin:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// Add Blade plugin
classpath 'eu.f3rog.blade:plugin:2.7.2'
}
}
apply plugin: 'com.android.application'
// Apply Blade plugin
apply plugin: 'blade'
It is recommended to use android gradle plugin 3.0.0 or higher.
If you use older version of the android gradle plugin, then you need to apply apt plugin. Read this for more information.
If you change used annotations - e.g. some field had some annotation and you add another or you remove some - please run a clean build after such changes.