75 lines
1.9 KiB
Groovy
75 lines
1.9 KiB
Groovy
plugins {
|
|
id 'com.android.library' // 替换 application 插件
|
|
id 'maven-publish' // 添加发布插件
|
|
}
|
|
|
|
android {
|
|
namespace 'com.tfq.libraryad'
|
|
compileSdkVersion 34
|
|
|
|
defaultConfig {
|
|
minSdkVersion 24
|
|
targetSdkVersion 34
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
jniLibs.srcDirs = ['libs']
|
|
// assets.srcDirs += ['../android_data/csj_config']
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
repositories {
|
|
flatDir {
|
|
dirs 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly fileTree(include: ['*.aar', '*.jar'], dir: 'libs')
|
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
|
implementation 'com.google.android.material:material:1.11.0'
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
|
|
//沉浸式
|
|
implementation 'com.gyf.immersionbar:immersionbar:3.0.0-beta05'
|
|
//gson
|
|
// implementation 'com.google.code.gson:gson:2.13.1'
|
|
// implementation 'com.alibaba:fastjson:2.0.57'
|
|
}
|
|
|
|
|
|
afterEvaluate {
|
|
publishing {
|
|
publications {
|
|
release(MavenPublication) {
|
|
groupId = 'com.jiangke.group' // 自定义组织标识
|
|
artifactId = 'JKBaseLib' // 库名称
|
|
version = '1.0.0'
|
|
artifact("$buildDir/outputs/aar/${project.name}-release.aar")// 指定 AAR 文件路径
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url = "file://${projectDir.parent}/maven" // 指向本地目录
|
|
}
|
|
/*maven {
|
|
url = "https://gitee.com/jiangke/JKBaseLib/raw/master/maven/"
|
|
credentials {
|
|
username = project.findProperty("gitee.user") ?: ""
|
|
password = project.findProperty("gitee.token") ?: ""
|
|
}
|
|
}*/
|
|
}
|
|
}
|
|
} |