-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle.kts
53 lines (43 loc) · 1.32 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 elasticsearchVersion = System.getProperty("elasticsearchVersion") ?: "8.5.3"
group = "fi.evident.elasticsearch"
version = "$baseVersion-es$elasticsearchVersion"
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.elasticsearch:elasticsearch:$elasticsearchVersion")
implementation("fi.evident.raudikko:raudikko:0.1.4")
testImplementation("org.elasticsearch:elasticsearch:$elasticsearchVersion")
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("elasticsearch-analysis-raudikko")
from(file("src/main/plugin-metadata")) {
expand(
"pluginVersion" to project.version,
"javaVersion" to java.toolchain.languageVersion.get().asInt(),
"elasticsearchVersion" to elasticsearchVersion
)
}
from(tasks.jar)
from(configurations.runtimeClasspath)
}
artifacts {
add(configurations.archives.name, distributionZip)
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}