Files
JChatGPT/build.gradle.kts
T

68 lines
1.8 KiB
Kotlin

import org.gradle.api.tasks.testing.Test
plugins {
val kotlinVersion = "2.0.20"
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
id("net.mamoe.mirai-console") version "2.16.0"
}
group = "top.jie65535.mirai"
version = "1.15.0"
mirai {
jvmTarget = JavaVersion.VERSION_11
noTestCore = true
setupConsoleTestRuntime {
// 移除 mirai-core 依赖
classpath = classpath.filter {
!it.nameWithoutExtension.startsWith("mirai-core-jvm")
}
}
}
repositories {
maven("https://maven.aliyun.com/repository/public")
mavenCentral()
}
val openaiClientVersion = "4.1.0"
val ktorVersion = "3.0.3"
val jLatexMathVersion = "1.0.7"
val commonTextVersion = "1.13.0"
val sqliteVersion = "3.46.1.0"
val overflowVersion = "1.0.7"
val eddsaVersion = "0.3.0"
dependencies {
implementation("com.aallam.openai:openai-client:$openaiClientVersion")
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
implementation("net.i2p.crypto:eddsa:$eddsaVersion")
implementation("org.scilab.forge:jlatexmath:$jLatexMathVersion")
implementation("org.apache.commons:commons-text:$commonTextVersion")
implementation("org.xerial:sqlite-jdbc:$sqliteVersion")
compileOnly("top.mrxiaom.mirai:overflow-core-api:$overflowVersion")
testImplementation(kotlin("test-junit5"))
testConsoleRuntime("top.mrxiaom.mirai:overflow-core:$overflowVersion")
}
tasks.test {
useJUnitPlatform {
excludeTags("live")
}
}
tasks.register<Test>("liveProfileTest") {
group = "verification"
description = "Runs the opt-in profile experiment against a configured live model."
testClassesDirs = tasks.test.get().testClassesDirs
classpath = tasks.test.get().classpath
useJUnitPlatform {
includeTags("live")
}
shouldRunAfter(tasks.test)
}