Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.vicent9920:baseproject:1.0.0'
}
dependencies {
implementation("com.github.vicent9920:baseproject:1.0.0")
}
<dependency>
<groupId>com.github.vicent9920</groupId>
<artifactId>baseproject</artifactId>
<version>1.0.0</version>
</dependency>
libraryDependencies += "com.github.vicent9920" % "baseproject" % "1.0.0"
:dependencies [[com.github.vicent9920/baseproject "1.0.0"]]
此项目是在轮子哥的模板工程上进行重构的,初衷是为了删除一些自己不熟悉的框架而添加一些自己熟悉的框架,并且使用 androidX、jetpack、Kotlin,完成一个自己用起来顺手的模板工程。这也符合其开源初衷:
当我们日复一日年复一年的搬砖的时候,你是否曾想过提升一下开发效率,如果一个模板的项目摆在你的面前,你还会选择自己搭架构么
Navigation
来实现 Fragment
控制WebActivity
增加 WebView
下载文件功能WebActivity
展示Activity
基类、 Fragment
基类封装以及部分自定义 View
编写等添加自定义圆弧View
下载地址
// ViewModel and LiveData
api "androidx.lifecycle:lifecycle-extensions:$rootProject.ext.lifecycle_version"
// For Kotlin use navigation-fragment-ktx
implementation "android.arch.navigation:navigation-fragment:$rootProject.ext.nav_version"
// For Kotlin use navigation-ui-ktx
implementation "android.arch.navigation:navigation-ui:$rootProject.ext.nav_version"
// RecyclerView
api "androidx.recyclerview:recyclerview:$rootProject.ext.recyclerview"
Retrofit 网络
implementation "com.squareup.retrofit2:retrofit:$rootProject.ext.retrofit"
Gson 解析
implementation "com.squareup.retrofit2:converter-gson:$rootProject.ext.gson"
Glide 图片加载
implementation "com.github.bumptech.glide:glide:$rootProject.ext.glide"
annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.ext.glide"
//城市选择 https://github.com/zaaach/CityPicker
implementation "com.zaaach:citypicker:$rootProject.ext.citypicker"
// 仿魅族banner https://github.com/pinguo-zhouwei/MZBannerView
implementation "com.github.pinguo-zhouwei:MZBannerView:$rootProject.ext.mzBanner"
// Easy 工具类 https://github.com/yjfnypeu/EasyAndroid
api "com.github.yjfnypeu:EasyAndroid:$rootProject.ext.EasyAndroid"
// 屏幕适配 https://github.com/JessYanCoding/AndroidAutoSize
api "me.jessyan:autosize:$rootProject.ext.autosize"
// Adapter https://github.com/CymChad/BaseRecyclerViewAdapterHelper
api "com.github.CymChad:BaseRecyclerViewAdapterHelper:$rootProject.ext.BaseRecyclerViewAdapterHelper"
// 沉浸式状态栏颜色 https://github.com/laobie/StatusBarUtil
implementation "com.jaeger.statusbarutil:library:$rootProject.ext.statusbarutil"
// 界面侧滑 https://github.com/bingoogolapple/BGASwipeBackLayout-Android
implementation "cn.bingoogolapple:bga-swipebacklayout:$rootProject.ext.swipebacklayout"
// 键对值存储器 https://github.com/orhanobut/hawk
implementation "com.orhanobut:hawk:$rootProject.ext.hawk"
// 版本更新 https://github.com/yjfnypeu/UpdatePlugin
implementation "com.github.yjfnypeu:UpdatePlugin:$rootProject.ext.updatePlugin"
//城市选择 https://github.com/zaaach/CityPicker
implementation "com.zaaach:citypicker:$rootProject.ext.citypicker"
// 扫一扫 https://github.com/mylhyl/Android-Zxing
implementation "com.mylhyl:zxingscanner:$rootProject.ext.zxing"