-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
53 lines (43 loc) · 1.28 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
plugins {
`java-library`
}
val baseVersion = System.getProperty("baseVersion") ?: "0.1"
val opensearchVersion = System.getProperty("opensearchVersion") ?: "2.9.0"
group = "fi.evident.opensearch"
version = "$baseVersion-os$opensearchVersion"
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.opensearch:opensearch:$opensearchVersion")
implementation("fi.evident.raudikko:raudikko:0.1.4")
testImplementation("org.opensearch:opensearch:$opensearchVersion")
testImplementation(platform("org.junit:junit-bom:5.7.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.test {
useJUnitPlatform()
}
val distributionZip = tasks.register<Zip>("distributionZip") {
archiveBaseName.set("opensearch-analysis-raudikko")
from(file("src/main/plugin-metadata")) {
expand(
"pluginVersion" to project.version,
"javaVersion" to java.toolchain.languageVersion.get().asInt(),
"opensearchVersion" to opensearchVersion
)
}
from(tasks.jar)
from(configurations.runtimeClasspath)
}
artifacts {
add(configurations.archives.name, distributionZip)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}