1 Star 0 Fork 0

悠然骑猪/buildSrc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
dependencies.gradle 11.61 KB
一键复制 编辑 原始数据 按行查看 历史
huliang011 提交于 2024-05-13 08:48 . 打包基本完成
//所有的 库中有叠加的三方库 的引用 和 需要公开的依赖
if (!getRootProject().name.contains('buildSrc')) {
//////////////////////////// 别名区 //////////////////////////// //////////////////////////// 别名区 ////////////////////////////
//////////////////////////// 别名区 //////////////////////////// //////////////////////////// 别名区 ////////////////////////////
//////////////////////////// 别名区 //////////////////////////// //////////////////////////// 别名区 ////////////////////////////
//////////////////////////// 别名区 //////////////////////////// //////////////////////////// 别名区 ////////////////////////////
/* getProject().metaClass.multidex = 'androidx.multidex:multidex:2.0.1' //Android多Dex加载
getProject().metaClass.rxjava = 'io.reactivex.rxjava2:rxjava:2.2.19' //响应式编程 框架
getProject().metaClass.toastCompat = 'me.drakeet.support:toastcompat:1.1.0' //Toast弹窗
getProject().metaClass.mmkv = 'com.tencent:mmkv-static:1.0.23' //键值对 使用
getProject().metaClass.autosize = 'me.jessyan:autosize:1.2.1' // 尺寸自适应框架
getProject().metaClass.glide = 'com.github.bumptech.glide:glide:4.12.0' //Glide API
getProject().metaClass.glide_okhttp3 = 'com.github.bumptech.glide:okhttp3-integration:4.12.0'
//Glide API
getProject().metaClass.glideProcessor = 'com.github.bumptech.glide:compiler:4.12.0' //Glide注解处理器
getProject().metaClass.androidx = 'androidx.appcompat:appcompat:1.1.0' //Android兼容包
getProject().metaClass.retrofit = 'com.squareup.retrofit2:retrofit:2.6.4'
//网络Restful接口框架 retrofit
getProject().metaClass.retrofit_rxjava = 'com.squareup.retrofit2:adapter-rxjava2:2.6.4'
//retrofit rxjava嵌入包
getProject().metaClass.retrofit_gson = 'com.squareup.retrofit2:converter-gson:2.6.4'
// retrofit gson嵌入包
getProject().metaClass.gson = 'com.google.code.gson:gson:2.8.5' // gson解析
getProject().metaClass.eventbus = 'org.greenrobot:eventbus:3.2.0' // 事件驱动器
getProject().metaClass.okhttp = 'com.squareup.okhttp3:okhttp:3.12.0' // 网络请求层
getProject().metaClass.okhttp_logging = 'com.squareup.okhttp3:logging-interceptor:3.12.0'
getProject().metaClass.relinker = 'com.getkeepsafe.relinker:relinker:1.3.1' // 加载.so库 保护库
getProject().metaClass.dnsJava = 'org.dnsjava:dnsjava:2.0.6' // dns解析
getProject().metaClass.qigsaw = "com.iqiyi.android.qigsaw:splitcore:${QIGSAW_VERSION}" //插件核心库
getProject().metaClass.okDownloader = "com.liulishuo.okdownload:okdownload:1.0.5" //下载器
getProject().metaClass.room = "android.arch.persistence.room:runtime:2.2.5" //room
getProject().metaClass.room_rxjava = "android.arch.persistence.room:rxjava2:2.2.5"
getProject().metaClass.androidAnnotation = 'androidx.annotation:annotation:1.0.0'
//rxjava for room
getProject().metaClass.roomProcessor = "android.arch.persistence.room:compiler:2.2.5"
getProject().metaClass.lifecycle = "androidx.lifecycle:lifecycle-runtime:2.2.0"
getProject().metaClass.lifecycleExtensions = "androidx.lifecycle:lifecycle-extensions:2.2.0"
getProject().metaClass.lifecycleProcessor = "androidx.lifecycle:lifecycle-compiler:2.2.0"
getProject().metaClass.recycleView = "androidx.recyclerview:recyclerview:1.1.0"
getProject().metaClass.rxjavaAndroid = 'io.reactivex.rxjava2:rxandroid:2.1.1' //响应式编程 框架
getProject().metaClass.commonsCodec = 'commons-codec:commons-codec:1.10'
getProject().metaClass.bcprovJdk16 = 'org.bouncycastle:bcprov-jdk16:1.46'
getProject().metaClass.commonsIo = 'commons-io:commons-io:2.6'
getProject().metaClass.hilt = 'com.google.dagger:hilt-android:2.28-alpha'
getProject().metaClass.hiltProcessor = 'com.google.dagger:hilt-android-compiler:2.28-alpha'
getProject().metaClass.hiltVM = 'androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha01'
getProject().metaClass.hiltVMProcessor = 'androidx.hilt:hilt-compiler:1.0.0-alpha01'
getProject().metaClass.logan = 'com.dianping.android.sdk:logan:1.2.4'//日志存储,调用lib_logger即可
getProject().metaClass.bugly = 'com.tencent.bugly:crashreport:latest.release'
getProject().metaClass.buglyNative = 'com.tencent.bugly:nativecrashreport:3.8.0'
getProject().metaClass.customactivityoncrash = 'cat.ereza:customactivityoncrash:2.2.0'
getProject().metaClass.banner = 'com.youth.banner:banner:1.4.10'
getProject().metaClass.dataStore = 'androidx.datastore:datastore-rxjava2:1.0.0-alpha06'
getProject().metaClass.dataStorePref = 'androidx.datastore:datastore-preferences-rxjava2:1.0.0-alpha06'
getProject().metaClass.constraintLayout = 'com.android.support.constraint:constraint-layout:2.0.4'
getProject().metaClass.jsoup = 'org.jsoup:jsoup:1.12.1'
getProject().metaClass.commonLang = 'org.apache.commons:commons-lang3:3.9'
getProject().metaClass.commonsNet = 'commons-net:commons-net:3.6'
getProject().metaClass.parcelerApi = 'org.parceler:parceler-api:1.1.12'
getProject().metaClass.parceler = 'org.parceler:parceler:1.1.12'
getProject().metaClass.autodispose = 'com.uber.autodispose:autodispose-android-archcomponents:1.4.0'
getProject().metaClass.preference = 'androidx.preference:preference:1.1.0'
getProject().metaClass.zxing = 'cn.bingoogolapple:bga-qrcode-zxing:1.3.6'
//for sync data
getProject().metaClass.cilpherDb = 'net.zetetic:android-database-sqlcipher:3.5.9'
getProject().metaClass.cilpherSp = 'net.grandcentrix.tray:tray:0.10.0'
// metric use jackson
getProject().metaClass.jacksonCore = 'com.fasterxml.jackson.core:jackson-core:2.9.5'
getProject().metaClass.jacksonDatabind = 'com.fasterxml.jackson.core:jackson-databind:2.9.5'
getProject().metaClass.jacksonAnnotations = 'com.fasterxml.jackson.core:jackson-annotations:2.9.5'
getProject().metaClass.jacksonJson = [jacksonCore, jacksonDatabind, jacksonAnnotations]
// ijk player
getProject().metaClass.ijkplayer_java = 'tv.rapid.media:ijkplayer-java:1.2.8'
getProject().metaClass.ijkplayer_armv7a = 'tv.rapid.media:ijkplayer-armv7a:1.2.8'
getProject().metaClass.ijkplayer_armv5 = 'tv.rapid.media:ijkplayer-armv5:1.2.8'
getProject().metaClass.ijkplayer_arm64 = 'tv.rapid.media:ijkplayer-arm64:1.2.8'
getProject().metaClass.ijkplayer_exo = 'tv.rapid.media:ijkplayer-exo:1.2.8'
getProject().metaClass.ijkplayer_common = 'tv.rapid.media:ijkplayer-common:1.2.8'
getProject().metaClass.ijkplayer_drm = 'tv.rapid.media:external-ijkplayer-drm:1.1.5'
getProject().metaClass.ijkplayer_arm32 = [ijkplayer_java, ijkplayer_armv7a, ijkplayer_exo, ijkplayer_common, ijkplayer_drm]
// prt engine wrapper
// todo: use normal release not SNAPSHOT
getProject().metaClass.prtEngineWrapper = 'com.stream.prt:prt-engine-java:1.0.1-2.10T08'
getProject().metaClass.brtClient = 'com.goose:stream-brt-client:2.6.3@aar'
getProject().metaClass.brtEngine = 'com.goose:stream-brt-engine:2.6.3@aar'
//catchup
getProject().metaClass.catchupPlayer = 'com.goose:live-player-support-tracker:1.0.10'
//ijm
getProject().metaClass.lib_JMEncryptBox = 'com.thirdparty:ijiami:3.2.0.02@aar'
//timber
getProject().metaClass.timber = 'com.jakewharton.timber:timber:4.5.0'
//rx java 1.0 only for live module!!!
//todo: modify the live sdk aar, migrate to rxjava2.0
getProject().metaClass.rxjava1 = 'io.reactivex:rxjava:1.3.0'
getProject().metaClass.rxjavaAndroid1 = 'io.reactivex:rxandroid:1.2.1'
getProject().metaClass.retrofit_rxjava1 = 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
getProject().metaClass.exoplayer = 'com.google.android.exoplayer:exoplayer:2.17.1'
//组件
getProject().metaClass.route = project(':c_interface') //各模块 维系组件 所有模块都要引用
//工具类单独依赖
getProject().metaClass.arouter = project(":lib_arouter_api") //阿里路由API 针对插件化修改
getProject().metaClass.arouterProcessor = project(":lib_arouter_compiler") //阿里路由注解处理器 针对插件化修改
getProject().metaClass.arouterAnnotation = 'com.alibaba:arouter-annotation:1.0.6' //阿里路由的注解
getProject().metaClass.myProcessor = project(":lib_processor") //自用注解处理器
getProject().metaClass.myAnotation = project(":lib_anotation") //自用注解
getProject().metaClass.c_ui = project(":c_ui") //通用 样式UI层
getProject().metaClass.lib_ui = project(":lib_ui") // 自定义UI
getProject().metaClass.lib_mvx = project(":lib_mvx") // mvx架构
getProject().metaClass.lib_common_utils = project(':lib_common_utils') //工具类 基础功能类
getProject().metaClass.lib_hardware = project(':lib_hardware')
getProject().metaClass.lib_api = project(':lib_api')
getProject().metaClass.libsCompile = [arouter, lib_common_utils, lib_mvx, lib_ui] //依赖集合
getProject().metaClass.lib_geoip = project(":lib_geoip")
getProject().metaClass.lib_metric = project(":lib_metric")
getProject().metaClass.c_tracking = project(":c_tracking")
getProject().metaClass.c_config = project(":c_config")
getProject().metaClass.lib_log = project(":lib_logger")
getProject().metaClass.lib_storage = project(":lib_storage")
getProject().metaClass.lib_plugin_res = project(":lib_plugin_res")
getProject().metaClass.lib_model = project(":lib_model")
getProject().metaClass.lib_dex_api = project(":lib_dex_api")
getProject().metaClass.lib_nanohttpd = project(":lib_nanohttpd")
getProject().metaClass.lib_androidlua = project(":lib_androidlua")
getProject().metaClass.lib_driskv2 = project(":lib_driskv2")
getProject().metaClass.lib_goose_advertisement = project(":lib_goose_advertisement")
getProject().metaClass.lib_keyboard = project(":lib_keyboard")
getProject().metaClass.lib_sink_lib_release = project(":lib_sink_lib_release")
getProject().metaClass.lib_traceroute = project(":lib_traceroute")
getProject().metaClass.libKit = [lib_common_utils, lib_log] //lib 必备依赖套件
getProject().metaClass.cKit = [retrofit, lib_common_utils, lib_hardware, lib_log, lib_storage]
//c层 必备依赖套件
getProject().metaClass.mKit = [androidx, route, lib_mvx, arouter, lib_common_utils, lib_ui, myAnotation, lib_hardware, c_ui, lib_log, c_tracking]
*/ //m层 必备依赖套件
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} else {
//buildSrc工程
applyRootProjectProperties()
}
getProject().metaClass.qigsawGradlePlugin = "com.iqiyi.android.qigsaw:gradle-plugin:${QIGSAW_VERSION}"
getProject().metaClass.gradlePlugin = "com.android.tools.build:gradle:${AGP_VERSION}"
void applyRootProjectProperties() {
Properties gradle_properties = new Properties()
File gradlePropertiesFile = project.rootProject.file('../gradle.properties')
if (gradlePropertiesFile.exists()) {
gradle_properties.load(gradlePropertiesFile.newDataInputStream())
}
gradle_properties.each { key, value ->
project.ext[key] = value
}
}
def build_versions = [:]
build_versions.min_sdk = 21
build_versions.compile_sdk = 30
build_versions.target_sdk = 33
build_versions.build_tools = "30.0.2"
ext.build_versions = build_versions
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/YouRanQiZhu/build-src.git
git@gitee.com:YouRanQiZhu/build-src.git
YouRanQiZhu
build-src
buildSrc
master

搜索帮助