diff --git a/android/build.gradle b/android/build.gradle index f15fedd..312cb61 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,7 +21,9 @@ rootProject.allprojects { apply plugin: "com.android.library" -def localAar = file("libs/open_im_sdk.aar") +def localCoreRepo = file("repo") +def localCoreVersion = "3.8.3-patch10" +def localCorePom = file("repo/io/openim/core-sdk/${localCoreVersion}/core-sdk-${localCoreVersion}.pom") android { namespace = "io.openim.flutter_openim_sdk" @@ -37,16 +39,6 @@ android { minSdk = 21 } - dependencies { - if (localAar.exists()) { - implementation files("libs/open_im_sdk.aar") - } else { - implementation 'io.openim:core-sdk:3.8.3-patch10@aar' - } - testImplementation("junit:junit:4.13.2") - testImplementation("org.mockito:mockito-core:5.0.0") - } - testOptions { unitTests.all { testLogging { @@ -57,3 +49,23 @@ android { } } } + +repositories { + google() + mavenCentral() + if (localCorePom.exists()) { + maven { + url uri(localCoreRepo) + } + } +} + +dependencies { + if (localCorePom.exists()) { + implementation "io.openim:core-sdk:${localCoreVersion}" + } else { + implementation "io.openim:core-sdk:${localCoreVersion}@aar" + } + testImplementation("junit:junit:4.13.2") + testImplementation("org.mockito:mockito-core:5.0.0") +} diff --git a/android/repo/io/openim/core-sdk/3.8.3-patch10/core-sdk-3.8.3-patch10.aar b/android/repo/io/openim/core-sdk/3.8.3-patch10/core-sdk-3.8.3-patch10.aar new file mode 100644 index 0000000..fb39219 Binary files /dev/null and b/android/repo/io/openim/core-sdk/3.8.3-patch10/core-sdk-3.8.3-patch10.aar differ diff --git a/android/repo/io/openim/core-sdk/3.8.3-patch10/core-sdk-3.8.3-patch10.pom b/android/repo/io/openim/core-sdk/3.8.3-patch10/core-sdk-3.8.3-patch10.pom new file mode 100644 index 0000000..b5fc32b --- /dev/null +++ b/android/repo/io/openim/core-sdk/3.8.3-patch10/core-sdk-3.8.3-patch10.pom @@ -0,0 +1,11 @@ + + + 4.0.0 + io.openim + core-sdk + 3.8.3-patch10 + aar + core-sdk +