添加aar包本地依赖方式说明
This commit is contained in:
parent
d0a4530314
commit
02202051e1
@ -1,6 +1,19 @@
|
|||||||
group 'io.openim.flutter_openim_sdk'
|
group 'io.openim.flutter_openim_sdk'
|
||||||
version '1.0'
|
version '1.0'
|
||||||
|
|
||||||
|
def dir = getCurrentProjectDir()
|
||||||
|
|
||||||
|
// 将aar放到libs,本地仓库替换远程仓库
|
||||||
|
def getCurrentProjectDir() {
|
||||||
|
String result = ""
|
||||||
|
rootProject.allprojects { project ->
|
||||||
|
if (project.properties.get("name").toString() == "flutter_openim_sdk") {
|
||||||
|
result = project.properties.get("projectDir").toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@ -14,6 +27,8 @@ buildscript {
|
|||||||
|
|
||||||
rootProject.allprojects {
|
rootProject.allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
|
// 将aar放到libs,本地仓库替换远程仓库
|
||||||
|
// maven { url "$dir/libs" }
|
||||||
maven { url 'https://open-im-online.rentsoft.cn:51000/repository/maven2/' }
|
maven { url 'https://open-im-online.rentsoft.cn:51000/repository/maven2/' }
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -33,6 +48,9 @@ android {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api 'io.openim:core-sdk:2.3.5-t30@aar'
|
// 本地依赖,现将aar复制到libs/io/openim/core-sdk/0.0.1/ 下,命名core-sdk-0.0.1.aar
|
||||||
|
// implementation 'io.openim:core-sdk:0.0.1@aar'
|
||||||
|
api 'io.openim:core-sdk:2.3.5-t32@aar'
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user