JKBaseLib/Lib-iMusic/build.gradle

115 lines
3.6 KiB
Groovy
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//apply plugin: 'com.android.library'
////apply plugin: 'maven'
////apply plugin: 'com.novoda.bintray-release'
////应用ZIP配置文件
////apply from: 'musiczip.gradle'
////发布到jitpack应用配置
//apply plugin: 'com.github.dcendents.android-maven'
//group='com.github.hty527'//xxx:代表你的github用户名
plugins {
id 'com.android.library' // 替换 application 插件
id 'maven-publish' // 添加发布插件
}
android {
namespace "com.tfq.lib.music"
compileSdkVersion 36
defaultConfig {
minSdkVersion 24
targetSdkVersion 36
}
buildTypes {
release {
}
}
// 添加 extractNativeLibs 配置
packagingOptions {
jniLibs {
useLegacyPackaging = true
pickFirsts += '**/*.so'
}
}
//编译发布至Bintray时报错处理
lintOptions {
abortOnError false
}
}
//推送到Bintray配置
//publish {
// //你的账户bintray下某个组织id
// userOrg = rootProject.ext.userOrg
// //Maven仓库下库的包名,一本与包名相同
// groupId = rootProject.ext.groupId
// //开源协议
// licences = rootProject.ext.licences
// //项目名称
// artifactId = rootProject.ext.musicModule
// //版本号
// publishVersion = rootProject.ext.musicVersion
// //项目介绍,可以不写
// desc = rootProject.ext.musicDesc
// //项目主页最好写上方便add to jecenter
// website = rootProject.ext.musicWebsite
//}
// 打包源码jar
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier = 'sources'
}
//生成到本地Maven仓库的task
//uploadArchives{
// repositories.mavenDeployer{
// // 配置本地仓库路径这里是项目的根目录下的maven目录中
// repository(url: uri('../maven'))
// // 唯一标识 一般为模块包名 也可其他
// pom.groupId = "com.android.player.lib"
// // 项目名称(一般为模块名称 也可其他
// pom.artifactId = rootProject.ext.musicModule
// // 发布的版本号
// pom.version = rootProject.ext.musicVersion
// }
//}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.13.2'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
implementation 'com.google.android.material:material:1.13.0'
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation 'com.android.support:recyclerview-v7:28.0.0'
// implementation 'com.android.support:design:28.0.0'
// implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'io.reactivex:rxjava:1.0.14'
implementation 'io.reactivex:rxandroid:1.0.1'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
groupId = 'com.chuangketie.jk' // 自定义组织标识
artifactId = 'lib_iMusic' // 库名称
version = rootProject.maven_version.lib_imusic_version //版本号
artifact("$buildDir/outputs/aar/${project.name}-release.aar")// 指定 AAR 文件路径
}
}
repositories {
maven {
url = "file://${projectDir.parent}/maven" // 指向本地目录
}
}
}
}