You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.1 KiB
63 lines
2.1 KiB
plugins {
|
|
// Android Library 插件
|
|
id("com.android.library")
|
|
// Kotlin Android 插件
|
|
id("org.jetbrains.kotlin.android")
|
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
|
kotlin("plugin.serialization") version "1.9.24"
|
|
}
|
|
|
|
android {
|
|
// 命名空间,对应你插件的包名(需与代码内包名保持一致)
|
|
namespace = "com.yunqiinnovation.open_ai_service"
|
|
|
|
// 目标 SDK 版本
|
|
compileSdk = 33
|
|
|
|
defaultConfig {
|
|
// 最低 SDK 版本
|
|
minSdk = 21
|
|
targetSdk = 33
|
|
}
|
|
|
|
// Java 语言级别兼容配置
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
|
|
// Kotlin 语言级别
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
|
|
// 添加packaging配置,排除冲突文件
|
|
packaging {
|
|
resources {
|
|
excludes.add("META-INF/DEPENDENCIES")
|
|
excludes.add("META-INF/LICENSE")
|
|
excludes.add("META-INF/LICENSE.txt")
|
|
excludes.add("META-INF/license.txt")
|
|
excludes.add("META-INF/NOTICE")
|
|
excludes.add("META-INF/NOTICE.txt")
|
|
excludes.add("META-INF/notice.txt")
|
|
excludes.add("META-INF/*.kotlin_module")
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
|
|
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
|
|
implementation("com.squareup.okhttp3:okhttp:4.9.3")
|
|
implementation("com.squareup.okhttp3:logging-interceptor:4.9.3")
|
|
implementation("com.anthropic:anthropic-java:0.8.0")
|
|
implementation("io.modelcontextprotocol:kotlin-sdk:0.4.0")
|
|
implementation("io.ktor:ktor-client-core:3.1.2")
|
|
implementation("io.ktor:ktor-client-cio:3.1.2")
|
|
implementation("io.ktor:ktor-client-okhttp:3.1.2")
|
|
implementation("io.ktor:ktor-client-logging:3.1.2")
|
|
implementation("com.google.code.gson:gson:2.10.1")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
|
|
}
|