All Projects → luojilab → Ddcomponentforandroid

luojilab / Ddcomponentforandroid

Licence: mit
一套完整有效的android组件化方案,支持组件的组件完全隔离、单独调试、集成调试、组件交互、UI跳转、动态加载卸载等功能

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects
kotlin
9241 projects

Projects that are alternatives of or similar to Ddcomponentforandroid

Jimu
一种简单有效的android组件化方案,支持组件的代码资源隔离、单独调试、集成调试、组件交互、UI跳转、生命周期等完整功能。
Stars: ✭ 2,355 (-28.22%)
Mutual labels:  android-architecture, android-application, android-component
Armscomponent
📦 A complete android componentization solution, powered by MVPArms (MVPArms 官方快速组件化方案).
Stars: ✭ 1,664 (-49.28%)
Mutual labels:  android-architecture, android-application, android-component
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (-93.33%)
Mutual labels:  android-architecture, android-application
Awesome Android Complete Reference
Awesome Android references for everything like best practices, performance optimization, etc.
Stars: ✭ 2,701 (-17.68%)
Mutual labels:  android-architecture, android-application
Android Mvp Sample Application
Android MVP Sample Application
Stars: ✭ 260 (-92.08%)
Mutual labels:  android-architecture, android-application
Android Spotify Mvp
Android Sample to explain Model View Presenter in android applications.
Stars: ✭ 184 (-94.39%)
Mutual labels:  android-architecture, android-application
Android Mvp Architecture
🏛 A basic sample android application to understand MVP in a very simple way. Just clone, build, run and understand MVP.
Stars: ✭ 203 (-93.81%)
Mutual labels:  android-architecture, android-application
Android Cleanarchitecture
This is a sample app that is part of a series of blog posts I have written about how to architect an android application using Uncle Bob's clean architecture approach.
Stars: ✭ 15,062 (+359.07%)
Mutual labels:  android-architecture, android-application
Mvparms
⚔️ A common architecture for Android applications developing based on MVP, integrates many open source projects, to make your developing quicker and easier (一个整合了大量主流开源项目高度可配置化的 Android MVP 快速集成框架).
Stars: ✭ 10,146 (+209.23%)
Mutual labels:  android-architecture, android-application
Android-daily-read-tips
log for articles and info in android for every developer
Stars: ✭ 13 (-99.6%)
Mutual labels:  android-application, android-architecture
Android-Clean-Architecture
🚀A basic sample android application to understand Clean Architecture in a very simple way and is written in Kotlin.
Stars: ✭ 39 (-98.81%)
Mutual labels:  android-application, android-architecture
android-boilerplate
Android Boilerplate à la ustwo
Stars: ✭ 43 (-98.69%)
Mutual labels:  android-application, android-architecture
Droid Feed
Aggregated Android news, articles, podcasts and conferences about Android Development
Stars: ✭ 174 (-94.7%)
Mutual labels:  android-architecture, android-application
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (-95.82%)
Mutual labels:  android-architecture, android-application
Calculator-Plus
A Simple Calculator with rich features for daily use.
Stars: ✭ 14 (-99.57%)
Mutual labels:  android-application, android-architecture
Nytimes App
🗽 A Simple Demonstration of the New York Times App 📱 using Jsoup web crawler with MVVM Architecture 🔥
Stars: ✭ 246 (-92.5%)
Mutual labels:  android-architecture, android-application
Cameraxdemo
A sample camera app with CameraX API from Android Jetpack
Stars: ✭ 112 (-96.59%)
Mutual labels:  android-architecture, android-application
Android Inappbilling
A sample which uses Google's Play Billing Library and it does InApp Purchases and Subscriptions.
Stars: ✭ 114 (-96.53%)
Mutual labels:  android-architecture, android-application
media-picker
Easy customizable picker for all your needs in Android application
Stars: ✭ 167 (-94.91%)
Mutual labels:  android-application, android-architecture
CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-99.21%)
Mutual labels:  android-application, android-architecture

DDComponent

PRs Welcome License

实现功能:

  • 组件可以单独调试
  • 杜绝组件之前相互耦合,代码完全隔离,彻底解耦
  • 组件之间通过接口+实现的方式进行数据传输
  • 使用scheme和host路由的方式进行activity之间的跳转
  • 自动生成路由跳转路由表
  • 任意组件可以充当host,集成其他组件进行集成调试
  • 可以动态对已集成的组件进行加载和卸载
  • 支持kotlin组件

使用指南

1、主项目引用编译脚本

在根目录的gradle.properties文件中,增加属性:

mainmodulename=app

其中mainmodulename是项目中的host工程,一般为app

在根目录的build.gradle中增加配置

buildscript {
    dependencies {
        classpath 'com.luojilab.ddcomponent:build-gradle:1.2.0'
    }
}

为每个组件引入依赖库,如果项目中存在basiclib等基础库,可以统一交给basiclib引入

compile 'com.luojilab.ddcomponent:componentlib:1.3.0'

2、拆分组件为module工程

在每个组件的工程目录下新建文件gradle.properties文件,增加以下配置:

isRunAlone=true
debugComponent=sharecomponent
compileComponent=sharecomponent

上面三个属性分别对应是否单独调试、debug模式下依赖的组件,release模式下依赖的组件。具体使用方式请解释请参见上文第二篇文章

3、应用组件化编译脚本

在组件和host的build.gradle都增加配置:

apply plugin: 'com.dd.comgradle'

注意:不需要在引用com.android.application或者com.android.library

同时增加以下extension配置:

combuild {
    applicationName = 'com.luojilab.reader.runalone.application.ReaderApplication'
    isRegisterCompoAuto = true
}

组件注册还支持反射的方式,有关isRegisterCompoAuto的解释请参见上文第二篇文章

4、混淆

在混淆文件中增加如下配置

-keep interface * {
  <methods>;
}
-keep class com.luojilab.component.componentlib.** {*;}
-keep class com.luojilab.router.** {*;}
-keep class com.luojilab.gen.** {*;}
-keep class * implements com.luojilab.component.componentlib.router.ISyringe {*;}
-keep class * implements com.luojilab.component.componentlib.applicationlike.IApplicationLike {*;}

关于如何进行组件之间数据交互和UI跳转,请参看 Wiki

License

DDComponentForAndroid 使用的 MIT 协议,详细请参考 LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].