89 lines
2.7 KiB
Plaintext
89 lines
2.7 KiB
Plaintext
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
import org.springframework.boot.gradle.dsl.SpringBootExtension
|
|
import java.net.URI
|
|
|
|
plugins {
|
|
kotlin("jvm")
|
|
kotlin("plugin.spring")
|
|
id("org.springframework.boot")
|
|
id("io.spring.dependency-management")
|
|
id("org.asciidoctor.jvm.convert")
|
|
id("org.jlleitschuh.gradle.ktlint")
|
|
id("org.graalvm.buildtools.native")
|
|
}
|
|
|
|
val projectGroup: String by project
|
|
val applicationVersion: String by project
|
|
val javaVersion: String by project
|
|
val graalSdkVersion: String by project
|
|
val graalPythonVersion: String by project
|
|
val luceneVersion: String by project
|
|
|
|
|
|
group = projectGroup
|
|
version = applicationVersion
|
|
|
|
repositories {
|
|
maven { url = URI.create("https://maven.aliyun.com/repository/public") }
|
|
maven { url = URI.create("https://maven.aliyun.com/repository/google") }
|
|
maven { url = URI.create("https://maven.aliyun.com/repository/gradle-plugin") }
|
|
maven { url = URI.create("https://maven.aliyun.com/repository/spring") }
|
|
maven { url = URI.create("https://maven.aliyun.com/repository/grails-core") }
|
|
maven { url = URI.create("https://maven.aliyun.com/repository/apache-snapshots") }
|
|
mavenLocal()
|
|
mavenCentral()
|
|
flatDir {
|
|
dirs("lib")
|
|
}
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(javaVersion.toInt())
|
|
}
|
|
}
|
|
|
|
configure<SpringBootExtension> {
|
|
mainClass.set("com.makebk.ars.ArsApplication")
|
|
buildInfo()
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.springframework.boot:spring-boot-starter")
|
|
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive")
|
|
implementation("org.springframework.boot:spring-boot-starter-webflux")
|
|
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
implementation(files("lib/sherpa-onnx-v1.12.15.jar"))
|
|
implementation("org.graalvm.polyglot:python:$graalPythonVersion")
|
|
implementation("org.apache.lucene:lucene-core:$luceneVersion")
|
|
compileOnly("org.graalvm.sdk:graal-sdk:$graalSdkVersion")
|
|
}
|
|
|
|
tasks.getByName("bootJar") {
|
|
enabled = true
|
|
}
|
|
|
|
tasks.getByName("jar") {
|
|
enabled = true
|
|
}
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
compilerOptions {
|
|
freeCompilerArgs.set(listOf("-Xjsr305=strict"))
|
|
jvmTarget.set(JvmTarget.fromTarget(javaVersion))
|
|
}
|
|
}
|
|
|
|
|
|
tasks.withType<Test> {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
java.sourceCompatibility = JavaVersion.toVersion(javaVersion) |