-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
67 lines (57 loc) · 1.86 KB
/
build.gradle
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
plugins {
id 'java-library'
id 'org.sonarqube' version '3.3'
id 'jacoco'
}
group = 'com.worksap.nlp'
archivesBaseName = 'analysis-chikkar'
version = '2.0.25-SNAPSHOT'
tasks.withType(JavaCompile) {
options.release = 11
}
repositories {
mavenCentral()
maven {
url "https://maven.codelibs.org"
content {
includeGroup "org.codelibs.elasticsearch.module"
}
}
}
dependencies {
implementation 'com.worksap.nlp:sudachi:0.7.4', 'com.github.takawitter:trie4j:0.9.8', 'com.google.guava:guava:27.0.1-jre'
compileOnly "org.elasticsearch:elasticsearch:${elasticsearchVersion}"
testImplementation "org.elasticsearch:elasticsearch:${elasticsearchVersion}", "org.elasticsearch.test:framework:${elasticsearchVersion}", 'org.mockito:mockito-core:2.27.0', "org.apache.logging.log4j:log4j-core:2.17.1"
}
def embedVersion = tasks.register('embedVersion', Copy) {
from 'src/main/extras/plugin-descriptor.properties'
into 'build/descriptor'
expand([version: version, elasticsearchVersion: elasticsearchVersion, javaVersion: 11])
}
def copyDependencies = tasks.register('copyDependencies', Copy) {
def excludelibs = ['elasticsearch']
from configurations.compileClasspath.files { dep -> !excludelibs.contains(dep.name)}
into 'build/libs'
}
def distZip = tasks.register('distZip', Zip) {
dependsOn 'jar', embedVersion, copyDependencies
archiveBaseName = archivesBaseName
archiveAppendix = elasticsearchVersion
from 'build/libs/', 'build/descriptor', 'LICENSE', 'README.md'
}
artifacts {
archives distZip
}
sonarqube {
properties {
property "sonar.projectKey", "com.worksap.nlp:analysis-chikkar"
property "sonar.organization", "worksapplications"
property "sonar.host.url", "https://sonarcloud.io"
}
}
jacocoTestReport {
reports {
xml.required = true
}
dependsOn test
}