2025-07-09 16:02:54 +08:00
|
|
|
|
plugins {
|
|
|
|
|
|
id 'com.android.library' // 替换 application 插件
|
|
|
|
|
|
id 'maven-publish' // 添加发布插件
|
|
|
|
|
|
}
|
2025-06-30 13:49:41 +08:00
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
namespace "com.tfq.library"
|
2025-07-09 16:02:54 +08:00
|
|
|
|
compileSdkVersion 36
|
2025-06-30 13:49:41 +08:00
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
2025-07-09 16:02:54 +08:00
|
|
|
|
minSdkVersion 24
|
|
|
|
|
|
targetSdkVersion 36
|
2025-06-30 13:49:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
|
release {
|
2025-07-30 17:11:53 +08:00
|
|
|
|
|
2025-06-30 13:49:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-29 10:02:54 +08:00
|
|
|
|
|
|
|
|
|
|
// 添加 extractNativeLibs 配置
|
|
|
|
|
|
packagingOptions {
|
|
|
|
|
|
jniLibs {
|
|
|
|
|
|
useLegacyPackaging = true
|
|
|
|
|
|
pickFirsts += '**/*.so'
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-06-30 13:49:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
|
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
|
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
|
|
|
|
|
2025-07-30 15:54:37 +08:00
|
|
|
|
api 'androidx.appcompat:appcompat:1.7.0'
|
|
|
|
|
|
api 'com.google.android.material:material:1.12.0'
|
2025-06-30 13:49:41 +08:00
|
|
|
|
|
2025-07-30 15:37:52 +08:00
|
|
|
|
//gson
|
2025-07-31 17:22:28 +08:00
|
|
|
|
api 'com.google.code.gson:gson:2.9.0'
|
2025-06-30 13:49:41 +08:00
|
|
|
|
|
2025-07-30 15:37:52 +08:00
|
|
|
|
//okhttp
|
2025-07-30 16:53:26 +08:00
|
|
|
|
api 'com.squareup.okhttp3:okhttp:5.0.0-alpha.16'
|
|
|
|
|
|
api 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.16'
|
2025-06-30 13:49:41 +08:00
|
|
|
|
|
|
|
|
|
|
//图片加载
|
2025-07-09 16:02:54 +08:00
|
|
|
|
api 'com.github.bumptech.glide:glide:4.16.0'
|
2025-06-30 13:49:41 +08:00
|
|
|
|
// Glide图形转换工具
|
2025-07-09 16:02:54 +08:00
|
|
|
|
api 'jp.wasabeef:glide-transformations:4.3.0'
|
2025-06-30 13:49:41 +08:00
|
|
|
|
|
2025-07-30 15:37:52 +08:00
|
|
|
|
//高斯模糊效果
|
|
|
|
|
|
api 'com.github.centerzx:ShapeBlurView:1.0.5'
|
|
|
|
|
|
|
2025-06-30 13:49:41 +08:00
|
|
|
|
// 吐司框架:https://github.com/getActivity/Toaster
|
|
|
|
|
|
api 'com.github.getActivity:Toaster:12.8'
|
|
|
|
|
|
|
2025-07-30 15:37:52 +08:00
|
|
|
|
//权限请求
|
2025-11-20 14:21:42 +08:00
|
|
|
|
api 'com.github.getActivity:XXPermissions:26.5'
|
2025-07-30 15:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
//RecyclerView
|
|
|
|
|
|
api 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.28'
|
|
|
|
|
|
|
|
|
|
|
|
//沉浸式
|
|
|
|
|
|
api 'com.geyifeng.immersionbar:immersionbar:3.2.2'
|
2025-07-29 13:57:21 +08:00
|
|
|
|
|
2025-07-09 16:02:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-29 15:50:40 +08:00
|
|
|
|
|
2025-07-09 16:02:54 +08:00
|
|
|
|
afterEvaluate {
|
|
|
|
|
|
publishing {
|
|
|
|
|
|
publications {
|
|
|
|
|
|
release(MavenPublication) {
|
2025-07-29 15:50:40 +08:00
|
|
|
|
groupId = 'com.chuangketie.jk'
|
2025-07-30 16:39:10 +08:00
|
|
|
|
artifactId = 'lib_base'
|
2025-11-20 14:21:42 +08:00
|
|
|
|
version = rootProject.maven_version.baselib_version
|
2025-07-29 15:50:40 +08:00
|
|
|
|
artifact("$buildDir/outputs/aar/${project.name}-release.aar")
|
|
|
|
|
|
|
|
|
|
|
|
// 添加依赖传递配置
|
|
|
|
|
|
pom.withXml {
|
|
|
|
|
|
def dependenciesNode = asNode().appendNode('dependencies')
|
|
|
|
|
|
|
2025-07-29 16:10:22 +08:00
|
|
|
|
// 处理所有api配置的依赖
|
2025-07-29 15:50:40 +08:00
|
|
|
|
configurations.api.allDependencies.each { dep ->
|
|
|
|
|
|
if (dep.group != null && dep.version != 'unspecified') {
|
|
|
|
|
|
def dependencyNode = dependenciesNode.appendNode('dependency')
|
|
|
|
|
|
dependencyNode.appendNode('groupId', dep.group)
|
|
|
|
|
|
dependencyNode.appendNode('artifactId', dep.name)
|
|
|
|
|
|
dependencyNode.appendNode('version', dep.version)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-09 16:02:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-29 15:50:40 +08:00
|
|
|
|
|
2025-07-30 10:37:45 +08:00
|
|
|
|
repositories {
|
|
|
|
|
|
maven {
|
|
|
|
|
|
url = "file://${projectDir.parent}/maven"
|
|
|
|
|
|
}
|
2025-07-29 15:50:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|