-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
85 lines (74 loc) · 2.74 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
plugins {
id 'java-library'
id "com.diffplug.spotless" version "6.25.0"
}
sourceCompatibility = 17
targetCompatibility = 17
apply plugin: 'distribution'
def ElasticsearchVersion = '8.15.2'
def LuceneVersion = '9.11.1'
version = '0.0.1'
dependencies {
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation group: 'org.apache.lucene', name: 'lucene-analysis-common', version: LuceneVersion
implementation group: 'org.elasticsearch', name: 'elasticsearch', version: ElasticsearchVersion
// Use JUnit test framework
def junitJupiterVersion = '5.10.3'
testImplementation group: 'org.junit.jupiter', name :'junit-jupiter-api', version: junitJupiterVersion
testImplementation group: 'org.junit.jupiter', name :'junit-jupiter-engine', version: junitJupiterVersion
testImplementation group: 'org.junit.vintage', name :'junit-vintage-engine', version: junitJupiterVersion
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.26.0'
testImplementation group: 'org.apache.lucene', name: 'lucene-test-framework', version: LuceneVersion
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.26.0'
// https://github.com/elastic/elasticsearch/issues/96360
configurations.all {
exclude group: 'org.elasticsearch', module: 'elasticsearch-preallocate'
}
}
test {
useJUnitPlatform {
includeEngines 'junit-vintage'
}
testLogging {
events "passed", "skipped", "failed"
}
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
task zipPlugin(type: Zip) {
dependsOn jar
archiveFileName = "${project.name}-${version}-es-${ElasticsearchVersion}.zip"
from 'src/main/dist', "$buildDir/libs"
destinationDirectory = file("$buildDir/dist")
}
spotless {
java {
importOrder('' /** All Other imports */,
'\n',
'java',
'\n',
'net',
'\n',
'javax',
'\n',
'junit',
'lombok',
'mockit',
'\n',
'org',
'\n',
'au',
'\n',
'com',
'\n',
'static '/** All Other static imports */)
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
eclipse().configFile 'etc/eclipse-formatter-config.xml'
}
}