一:创建项目并且进行上传到gitee
1:注册gitee账号密码
2:IDE工具androidstudio配置git工具
3 创建代码仓库
二:抽取原有项目框架
文件
config.gradle
ext {
android = [
// 应用程序包名
applicationId : "程序包名",
// 用于编译的SDK版本
compileSdkVersion: 29,
// 用于Gradle编译项目的工具版本
buildToolsVersion: "29.0.3",
// 最低支持Android版本
minSdkVersion : 21,
// 目标版本
targetSdkVersion : 29,
versionCode : 1,
versionName : "v1.0.0.0",
// 设置是否使用混淆
minifyEnabled : false,
dataBinding : true
]
dependVersion = [
gradle_version : "4.0.1",
constraint_layout : "2.0.4",
kotlin_version : "1.4.10",
appcompat : "1.2.0",
legacy_support_v4 : "1.0.0",
fragment : "1.2.5",
multidex_version : "2.0.0",
recyclerview : "1.2.0-alpha06",
viewpager2 : "1.0.0",
core_ktx : "1.3.2",
annotation : "1.1.0",
preference : "1.1.1",
cardview : "1.0.0",
material : "1.2.1",
swiperefreshlayout : "1.1.0",
coordinatorlayout : "1.0.0",
lifecycle : "2.2.0",
// lifecycle : "2.3.0-alpha07",
coroutines : "1.3.4",
junit : "4.12",
test_junit : "1.1.1",
espresso_core : "3.2.0",
BaseRecyclerViewAdapterHelperVersion: "3.0.4",
glide_version : "4.11.0",
eventbus_version : "3.2.0",
greendao_version : "3.2.2",
// greendao_version : "3.3.0",
tinkerAndroidLibVersion : "1.9.9",
nativecrashreportVersion : "3.7.1",
appJoint_version : "1.5",
ylzinfo_basiclib_version : "0.1.5",
ylzhttp_version : "0.0.10",
arouter_api_version : "1.5.1",
arouter_compiler_version : "1.5.1",
swipe_back_layout_version : "1.1.0",
immersion_bar_version : "3.0.0",
status_bar_version : "1.5.1",
gson_version : "2.8.5",
fastjson_version : "1.1.68.android",
okhttp3_version : "3.12.1",
okhttputils_version : "2.6.2",
retrofit_version : "2.9.0",
material_dialogs_version : "3.3.0",
aspectj_version : "2.0.10",
tinker : "1.9.6",
bugly_crashreport_upgrade : "1.3.5",
bugly_nativecrashreport : "latest.release",
walle_version : "1.1.7",
and_permission : "2.0.3",
permissionsdispatcher : "4.8.0",
banner_version : "2.1.0",
smart_refresh_version : "2.0.3",
tag_view_version : "1.1.7",
matisse_version : "0.5.3-beta3",
luban_version : "1.1.8",
photo_view_version : "2.0.0",
filedownloader_version : "1.7.7",
svga_player_version : "2.5.15 ",
mmkv_version : "1.2.10",
banner_version : "2.1.0"
]
dependencies = [
// ------------- Android -------------
constraint_layout : "androidx.constraintlayout:constraintlayout:${dependVersion.constraint_layout}",
kotlin : "org.jetbrains.kotlin:kotlin-stdlib:${dependVersion.kotlin_version}",
core_ktx : "androidx.core:core-ktx:${dependVersion.core_ktx}",
appcompat : "androidx.appcompat:appcompat:${dependVersion.appcompat}",
fragment_ktx : "androidx.fragment:fragment-ktx:${dependVersion.fragment}",
legacy_support_v4 : "androidx.legacy:legacy-support-v4:${dependVersion.legacy_support_v4}",
recyclerview : "androidx.recyclerview:recyclerview:${dependVersion.recyclerview}",
viewpager2 : "androidx.viewpager2:viewpager2:${dependVersion.viewpager2}",
annotation : "androidx.annotation:annotation:${dependVersion.annotation}",
preference : "androidx.preference:preference:${dependVersion.preference}",
cardview : "androidx.cardview:cardview:${dependVersion.cardview}",
swiperefreshlayout : "androidx.swiperefreshlayout:swiperefreshlayout:${dependVersion.swiperefreshlayout}",
smart_refresh : "com.scwang.smart:refresh-layout-kernel:${dependVersion.smart_refresh_version}",
smart_refresh_header_classics : "com.scwang.smart:refresh-header-classics:${dependVersion.smart_refresh_version}",
coordinatorlayout : "androidx.coordinatorlayout:coordinatorlayout:${dependVersion.coordinatorlayout}",
material : "com.google.android.material:material:${dependVersion.material}",
multidex : "androidx.multidex:multidex:${dependVersion.multidex_version}",
lifecycle_extensions : "androidx.lifecycle:lifecycle-extensions:${dependVersion.lifecycle}",
lifecycle_livedata : "androidx.lifecycle:lifecycle-livedata-ktx:${dependVersion.lifecycle}",
lifecycle_viewmodel : "androidx.lifecycle:lifecycle-viewmodel-ktx:${dependVersion.lifecycle}",
coroutines_android : "org.jetbrains.kotlinx:kotlinx-coroutines-android:${dependVersion.coroutines}",
coroutines_core : "org.jetbrains.kotlinx:kotlinx-coroutines-core:${dependVersion.coroutines}",
//------------- 测试 -------------
junit : "junit:junit:${dependVersion.junit}",
test_junit : "androidx.test.ext:junit:${dependVersion.test_junit}",
espresso_core : "androidx.test.espresso:espresso-core:${dependVersion.espresso_core}",
// ------------- 网络请求 -------------
okhttp3 : "com.squareup.okhttp3:okhttp:${dependVersion.okhttp3_version}",
logging_interceptor : "com.squareup.okhttp3:logging-interceptor:${dependVersion.okhttp3_version}",
retrofit : "com.squareup.retrofit2:retrofit:${dependVersion.retrofit_version}",
retrofit_converter_gson : "com.squareup.retrofit2:converter-gson:${dependVersion.retrofit_version}",
okhttputils : "com.zhy:okhttputils:${dependVersion.okhttputils_version}",
arouter_api : "com.alibaba:arouter-api:${dependVersion.arouter_api_version}",
arouter_compiler : "com.alibaba:arouter-compiler:${dependVersion.arouter_compiler_version}",
adapter_helper : "com.github.CymChad:BaseRecyclerViewAdapterHelper:${dependVersion.BaseRecyclerViewAdapterHelperVersion}",
glide : "com.github.bumptech.glide:glide:${dependVersion.glide_version}",
glide_compiler : "com.github.bumptech.glide:compiler:${dependVersion.glide_version}",
greendao : "org.greenrobot:greendao:${dependVersion.greendao_version}",
eventbus : "org.greenrobot:eventbus:${dependVersion.eventbus_version}",
swipe_back_layout : "me.imid.swipebacklayout.lib:library:${dependVersion.swipe_back_layout_version}",
immersion_bar : "com.gyf.immersionbar:immersionbar:${dependVersion.immersion_bar_version}",
immersion_bar_components : "com.gyf.immersionbar:immersionbar-components:${dependVersion.immersion_bar_version}",
status_bar : "com.jaeger.statusbarutil:library:${dependVersion.status_bar_version}",
gson : "com.google.code.gson:gson:${dependVersion.gson_version}",
fastjson : "com.alibaba:fastjson:${dependVersion.fastjson_version}",
material_dialogs : "com.afollestad.material-dialogs:core:${dependVersion.material_dialogs_version}",
aspectj : "org.aspectj:aspectjrt:${dependVersion.aspectj_version}",
tinker : "com.tencent.tinker:tinker-android-lib:${dependVersion.tinker}",
bugly_crashreport_upgrade : "com.tencent.bugly:crashreport_upgrade:${dependVersion.bugly_crashreport_upgrade}",
bugly_nativecrashreport : "com.tencent.bugly:nativecrashreport:${dependVersion.bugly_nativecrashreport}",
walle : "com.meituan.android.walle:library:${dependVersion.walle_version}",
and_permission : "com.yanzhenjie:permission:${dependVersion.and_permission}",
permissionsdispatcher : "com.github.permissions-dispatcher:permissionsdispatcher:${dependVersion.permissionsdispatcher}",
permissionsdispatcher_processor: "com.github.permissions-dispatcher:permissionsdispatcher-processor:${dependVersion.permissionsdispatcher}",
banner : "com.youth.banner:banner:${dependVersion.banner_version}",
tag_view : "co.lujun:androidtagview:${dependVersion.tag_view_version}",
matisse : "com.zhihu.android:matisse:${dependVersion.matisse_version}",
luban : "top.zibin:Luban:${dependVersion.luban_version}",
photo_view : "com.github.chrisbanes:PhotoView:${dependVersion.photo_view_version}",
filedownloader : "com.liulishuo.filedownloader:library:${dependVersion.filedownloader_version}",
svga_player : "com.github.yyued:SVGAPlayer-Android:${dependVersion.svga_player_version}",
mmkv : "com.tencent:mmkv-static:${dependVersion.mmkv_version}",
banner : "com.youth.banner:banner:${dependVersion.banner_version}"
]
}