当前位置:网站首页>An auxiliary MVP architecture project quick development library -mvpfastdagger
An auxiliary MVP architecture project quick development library -mvpfastdagger
2022-06-25 09:51:00 【seevc】
Share a MVP Architecture development , It can help to generate corresponding mvp Open source library of files , You don't have to create it manually model、view、presenter、module、component The file , Improve development efficiency . Source code address :MvpFastDagger
MvpFastDagger
MVP+Dagger+Annotation Rapid generation of project architecture mvp Corresponding documents .
MVP+Dagger+Annotation Every new one in the architecture Activity or Fragment All need to be added XXPresenter、IXXview、IXXModel、XXModleImp、XXModule、XXComponent class , Adding manually is tedious , This library can help us quickly generate mvp Corresponding documents .
notes : This open source library is applicable to MVP+Dagger+Annotation Architecture projects . Need to be introduced into the project Dagger and Annotation These two open source libraries .
MvpFastDagger It only takes one step to use
When using this annotation , You need to create Activity class , And then use @MvpFastDagger.
How annotations are used :
/**
* name Corresponding to the name of the class to be created
* basePresenterClazz It needs to be created presenter The parent of a class ,
* iBaseViewClazz Is to create view The parent of a class ,
* iBaseModelClazz Is to create model The parent class of the interface class ,
* baseModelImpClazz Is to be generated ModelImp Parent class of ,
* scopeClazz Corresponding Imodel Iview Life cycle of ,
* modules Corresponding Dagger in @Component In the annotations modules Field ,
* dependencies It's corresponding to @Component In the annotations dependencies Field , This field is optional
*/
@MvpFastDagger(name = "login",
basePresenterClazz = BasePresenter.class,
iBaseViewClazz = IViewAdvance.class,
iBaseModelClazz = IModel.class,
baseModelImpClazz = BaseModel.class,
scopeClazz = PerActivity.class,
modules = AppModule.class,
dependencies = AppComponent.class)
public class LoginActivity extends BaseActivity<LoginPresenter> implements ILoginView {
...
}
among name You can write your name directly , Such as :"login", It can be used "." Segmentation , Such as :“login.login”, This will generate login Catalog , This directory is regenerated into the corresponding java file .
take MvpFastDagger Into your project
stay Gradle Configure settings in :
1. At the root build.gradle The configuration in the file is as follows :
allprojects {
repositories {
...
maven { url "https://jitpack.io" } // Add the configuration , Enable compile time from jitpack Find resource in Library
}
}
2. stay app Project build.gradle Add reference to the document :
android {
...
defaultConfig {
javaCompileOptions{
annotationProcessorOptions{
arguments = ["fastDaggerIndex": "org.harry.fastdagger.demo",// Configure your package name here , The generated files will be in this directory
"mvpSrcDir" : file("src/main/java").getAbsolutePath()]// Main works src route , Generally, this value does not need to be modified
}
}
}
}
dependencies {
...
implementation 'com.github.zhang-hai:mvpfastdagger:1.1.0' // Use mvpfastdagger library
annotationProcessor 'com.github.zhang-hai:mvpfastdagger:1.1.0' // Use mvpfastdagger Annotation processor in the library
}
边栏推荐
- How to delete a blank page that cannot be deleted in word
- pmp考试题型需要注意哪些?
- Title B of the certification cup of the pistar cluster in the Ibagu catalog
- Register the jar package as a service to realize automatic startup after startup
- Prediction of pumpkin price based on BP neural network
- 【mysql学习笔记21】存储引擎
- Creo makes a mobius belt in the simplest way
- 独步武林,架构选型手册(包含 PDF)
- Pytorch_Geometric(PyG)使用DataLoader报错RuntimeError: Sizes of tensors must match except in dimension 0.
- Voiceprint Technology (II): Fundamentals of audio signal processing
猜你喜欢

Remove the mosaic, there's a way, attached with the running tutorial
![[learn C from me and master the key to programming] insertion sort of eight sorts](/img/2c/22e065390464ed5cd1056346d46573.jpg)
[learn C from me and master the key to programming] insertion sort of eight sorts

Solution to the problem of repeated startup of esp8266
![[MySQL learning notes 22] index](/img/08/db7b765f7ddaa5706e3f7d00690d23.png)
[MySQL learning notes 22] index

Chitubox micromake l3+ slicing software configuration correspondence

Reza RA series - development environment construction

SQL advanced

Fcpx quickly add subtitles | Final Cut Pro import fcpxml subtitle file does not match the video time? I got it in code

Data-driven anomaly detection and early warning of 21 May Day C

manhattan_slam环境配置
随机推荐
Use Navicat to compare data differences and structure differences of multi environment databases, and automatic DML and DDL scripts
[competition -kab micro entrepreneurship competition] KAB National College Students' micro entrepreneurship action participation experience sharing (including the idea of writing the application form)
How much money have I made by sticking to fixed investment for 3 years?
Fcpx quickly add subtitles | Final Cut Pro import fcpxml subtitle file does not match the video time? I got it in code
Etcd教程 — 第四章 Etcd集群安全配置
manhattan_slam环境配置
Remove the mosaic, there's a way, attached with the running tutorial
瑞萨RA系列-开发环境搭建
Mengyou Technology: six elements of tiktok's home page decoration, how to break ten thousand dollars in three days
manhattan_ Slam environment configuration
手机办理长城证券开户靠谱安全吗?
[2020 cloud development + source code] 30 minutes to create and launch wechat applet practical project | zero cost | cloud database | cloud function
【mysql学习笔记20】mysql体系结构
使用EVO
MySQL source code reading (II) login connection debugging
vscode试图过程写入管道不存在
富时A50开户什么地方安全
独步武林,架构选型手册(包含 PDF)
Online notes on Mathematics for postgraduate entrance examination (9): a series of courses on probability theory and mathematical statistics
51 SCM time stamp correlation function