fix:优化导入版本

This commit is contained in:
SL 2025-05-05 10:36:48 +08:00
parent a7984b8ed8
commit 7c8624ac0d
7 changed files with 104 additions and 45 deletions

2
.idea/kotlinc.xml generated
View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="1.9.20" />
<option name="version" value="1.9.22" />
</component>
</project>

View File

@ -28,14 +28,6 @@ allprojects {
}
```
由于sdk内使用了sqlcipher加密数据库和curve25519加密算法需将库添加到项目中
```groovy
implementation "net.zetetic:android-database-sqlcipher:4.5.3"
implementation "androidx.sqlite:sqlite-ktx:2.3.1"
implementation 'org.whispersystems:curve25519-android:0.5.0'
implementation 'org.whispersystems:signal-protocol-android:2.8.1'
```
**混淆**
```
-dontwarn com.xinbida.wukongim.**

View File

@ -33,11 +33,15 @@ android {
}
dependencies {
implementation platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version")
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation project(':wkim')
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'org.jetbrains:annotations:23.0.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'org.jetbrains:annotations:24.1.0'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.7'
implementation 'com.github.li-xiaojun:XPopup:2.9.19'
implementation('com.github.bumptech.glide:glide:4.16.0') {

View File

@ -1,14 +1,24 @@
import org.gradle.internal.jvm.Jvm
buildscript {
ext.kotlin_version = '1.9.20'
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
classpath 'com.android.tools.build:gradle:8.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
configurations.all {
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}
}

10
wkim/.idea/libraries/libs.xml generated Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="libraryTable">
<library name="libs">
<CLASSES>
<root url="jar://$PROJECT_DIR$/libs/xSocket-2.8.15.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -4,24 +4,6 @@ plugins {
id 'maven-publish'
}
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
groupId = 'com.xinbida.wukongim'
artifactId = 'WKIMLib_loca'
version = '1.0.7'
}
}
repositories {
maven {
url = uri('../repository')
}
}
}
}
android {
compileSdk 34
defaultConfig {
@ -39,20 +21,81 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
buildFeatures.buildConfig = true
namespace 'com.xinbida.wukongim'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
api files('libs/xSocket-2.8.15.jar')
implementation 'com.android.support:multidex:1.0.3'
implementation "net.zetetic:android-database-sqlcipher:4.5.3"
implementation "androidx.sqlite:sqlite-ktx:2.4.0"
implementation 'org.whispersystems:curve25519-android:0.5.0'
implementation 'org.whispersystems:signal-protocol-android:2.8.1'
configurations {
//
embedded
implementation.extendsFrom(embedded)
}
dependencies {
implementation platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version")
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// 使 embedded AAR
embedded files('libs/xSocket-2.8.15.jar')
embedded "net.zetetic:android-database-sqlcipher:4.5.4"
embedded "androidx.sqlite:sqlite-ktx:2.5.0"
embedded 'org.whispersystems:curve25519-android:0.5.0'
embedded 'org.whispersystems:signal-protocol-android:2.8.1'
// multidex implementation
implementation 'com.android.support:multidex:1.0.3'
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
// pom
pom {
name = 'WKIMLib'
description = 'WuKong IM Android Library'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
groupId = 'com.xinbida.wukongim'
artifactId = 'WKIMLib_local'
version = '1.0.7'
}
}
repositories {
maven {
name = 'localRepo'
url = uri("${project.rootDir}/repository")
}
}
}
}
android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
task("generate${name}Javadoc", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.sourceSets.collect { it.java.sourceFiles }.inject { m, i -> m + i }
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.implementation
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
}

View File

@ -18,7 +18,7 @@ import com.xinbida.wukongim.utils.CryptoUtils;
* 5/20/21 5:25 PM
*/
public class WKIM {
private final String Version = "V1.3.3";
private final String Version = "V1.4.0";
private WKIM() {