ACG Club, a pure ACG aggregation App
Project address: github.com/Rabtman/Acg…
For the purpose of hobby and learning, THIS MD-style application is intended to create a market-oriented product by covering some popular technical frameworks on Android
Through this project, you can learn the following techniques:
- Material Design
- MVP
- componentization
- Kotlin
- RxJava2
- Retrofit
- Dagger2
- Realm
- Glide
- Arouter
- Jsoup
- Gradle configuration
- Hot update
- Confusion, multi-channel package
preview
App Download experience
Project related
Project environment
- Android Studio 3.0
- Gradle 4.1
- Kotlin 1.2.21
- compileSdkVersion 26
The project structure
Acgclub-app Host app-common Base library -common-res Common resources -Component-acgComic component -src/main-runalone Takes effect when the component is run independently Component-acgnews Component-Component-AcgSchedule Component - Router Configuration and related service implementation - third-party liBS inventory - Gradle - Base_component_kapt. Gradle Kotlin - Base_component_kapt. Gradle Kotlin - Config. gradle project information configurationCopy the code
The new component
-
Component name Fixed prefix with Component –
-
Build. gradle needs to be configured as follows:
/ / necessary
apply from:".. /base_component.gradle"
/ / using Java
apply from:".. /base_component_compiler.gradle"
/ / or kotlin
apply from:".. /base_component_kapt.gradle"
// If you are using a database
apply plugin: 'realm-android'
Copy the code
-
The res file within the component will be bound with the component’s real name prefix (e.g. Component-acgnews, a layout file name will need to start with acgnews_layout.xml)
-
When the component runs independently, it also needs to pay attention to providing relevant application, entry activity, Androidmanifest.xml, etc
Project configuration
Config. gradle configures project properties, such as package name, version number, compiled version…
Among them:
// Merge the components to be merged into the main program. The components that are not merged will run independently."acgnews"."acgschedule"
//"acgcomic"
]
Copy the code
After the Merge property is modified, the project needs to be rebuilt
other
- DaggerXXX will be automatically generated by completing the compilation when the project indicates that DaggerXXX is missing
- You can configure the key and signature of the third-party library in the local local.properties as required. If you do not need them, delete them by yourself
# Aliyun user feedback
fbAppKey=""
fbAppSecret=""
# Allies
umengAppKey=""
#bugly
buglyAppId=""
# Signature information
storeFile=
storePassword=
keyAlias=
keyPassword=
# Umeng share key
SINA_WEIBO_KEY=""
SINA_WEIBO_SECRET=""
QQ_ZONE_ID=""
QQ_ZONE_KEY=""
WEIXIN_ID=""
WEIXIN_KEY=""
Copy the code
- To ensure that bugly hot updates work, please make sure that the tinkerId in the Tinker-support. gradle file in the app directory is unique every time you type the official package
contact
The project needs to be improved in many places, if there are bugs or better suggestions welcome to put forward, if it is helpful to you, please feel free to star, your support is my motivation to move forward!!
- issue
- Mail: [email protected] or [email protected]
- blog:rabtman.com/
thanks
RxJava
RxAndroid
Dagger2
RxPermissions
RxCache
Retrofit
Okhttp
Gson
Butterknife
Glide
LeakCanary
Realm
MVPArms
Jsoup
Jsoup-Annotations
Fragmentation
BlockCanary
ARouter
DialogUtil
Toasty
BaseRecyclerViewAdapterHelper
HtmlTextView
MZBannerView
StatusBarUtil
LoadSir
Logger
AndroidUtilCode
VasDolly