Skip to content

Commit 75a2fc3

Browse files
authored
Make entries for dependencies from server/build.gradle to gradle version catalog (opensearch-project#16707)
* Make entries for dependencies from server/build.gradle to gradle version catalog Signed-off-by: Craig Perkins <cwperx@amazon.com> * Handle NodeList Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Use wildcard Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add roaringbitmap Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
1 parent 42dc22e commit 75a2fc3

File tree

4 files changed

+69
-32
lines changed

4 files changed

+69
-32
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4444

4545
### Changed
4646
- Indexed IP field supports `terms_query` with more than 1025 IP masks [#16391](https://github.com/opensearch-project/OpenSearch/pull/16391)
47+
- Make entries for dependencies from server/build.gradle to gradle version catalog ([#16707](https://github.com/opensearch-project/OpenSearch/pull/16707))
4748

4849
### Deprecated
4950
- Performing update operation with default pipeline or final pipeline is deprecated ([#16712](https://github.com/opensearch-project/OpenSearch/pull/16712))

buildSrc/src/main/groovy/org/opensearch/gradle/plugin/OptionalDependenciesPlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class OptionalDependenciesPlugin implements Plugin<Project> {
7979

8080
if (foundDep) {
8181
if (foundDep.optional) {
82-
foundDep.optional.value = 'true'
82+
foundDep.optional*.value = 'true'
8383
} else {
8484
foundDep.appendNode(OPTIONAL_IDENTIFIER, 'true')
8585
}

gradle/libs.versions.toml

+50
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jna = "5.13.0"
3434

3535
netty = "4.1.115.Final"
3636
joda = "2.12.7"
37+
roaringbitmap = "1.3.0"
3738

3839
# project reactor
3940
reactor_netty = "1.1.23"
@@ -83,3 +84,52 @@ opentelemetrysemconv = "1.27.0-alpha"
8384
# arrow dependencies
8485
arrow = "17.0.0"
8586
flatbuffers = "2.0.0"
87+
88+
[libraries]
89+
hdrhistogram = { group = "org.hdrhistogram", name = "HdrHistogram", version.ref = "hdrhistogram" }
90+
jakartaannotation = { group = "jakarta.annotation", name = "jakarta.annotation-api", version.ref = "jakarta_annotation" }
91+
jodatime = { group = "joda-time", name = "joda-time", version.ref = "joda" }
92+
jna = { group = "net.java.dev.jna", name = "jna", version.ref = "jna" }
93+
jtscore = { group = "org.locationtech.jts", name = "jts-core", version.ref = "jts" }
94+
jzlib = { group = "com.jcraft", name = "jzlib", version.ref = "jzlib" }
95+
log4japi = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref = "log4j" }
96+
log4jjul = { group = "org.apache.logging.log4j", name = "log4j-jul", version.ref = "log4j" }
97+
log4jcore = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" }
98+
lucene-core = { group = "org.apache.lucene", name = "lucene-core", version.ref = "lucene" }
99+
lucene-analysis-common = { group = "org.apache.lucene", name = "lucene-analysis-common", version.ref = "lucene" }
100+
lucene-backward-codecs = { group = "org.apache.lucene", name = "lucene-backward-codecs", version.ref = "lucene" }
101+
lucene-grouping = { group = "org.apache.lucene", name = "lucene-grouping", version.ref = "lucene" }
102+
lucene-highlighter = { group = "org.apache.lucene", name = "lucene-highlighter", version.ref = "lucene" }
103+
lucene-join = { group = "org.apache.lucene", name = "lucene-join", version.ref = "lucene" }
104+
lucene-memory = { group = "org.apache.lucene", name = "lucene-memory", version.ref = "lucene" }
105+
lucene-misc = { group = "org.apache.lucene", name = "lucene-misc", version.ref = "lucene" }
106+
lucene-queries = { group = "org.apache.lucene", name = "lucene-queries", version.ref = "lucene" }
107+
lucene-queryparser = { group = "org.apache.lucene", name = "lucene-queryparser", version.ref = "lucene" }
108+
lucene-sandbox = { group = "org.apache.lucene", name = "lucene-sandbox", version.ref = "lucene" }
109+
lucene-spatial-extras = { group = "org.apache.lucene", name = "lucene-spatial-extras", version.ref = "lucene" }
110+
lucene-spatial3d = { group = "org.apache.lucene", name = "lucene-spatial3d", version.ref = "lucene" }
111+
lucene-suggest = { group = "org.apache.lucene", name = "lucene-suggest", version.ref = "lucene" }
112+
protobuf = { group = "com.google.protobuf", name = "protobuf-java", version.ref = "protobuf" }
113+
reactivestreams = { group = "io.projectreactor", name = "reactor-core", version.ref = "reactor" }
114+
reactorcore = { group = "org.reactivestreams", name = "reactive-streams", version.ref = "reactivestreams" }
115+
roaringbitmap = { group = "org.roaringbitmap", name = "RoaringBitmap", version.ref = "roaringbitmap" }
116+
spatial4j = { group = "org.locationtech.spatial4j", name = "spatial4j", version.ref = "spatial4j" }
117+
tdigest = { group = "com.tdunning", name = "t-digest", version.ref = "tdigest" }
118+
119+
[bundles]
120+
lucene = [
121+
"lucene-core",
122+
"lucene-analysis-common",
123+
"lucene-backward-codecs",
124+
"lucene-grouping",
125+
"lucene-highlighter",
126+
"lucene-join",
127+
"lucene-memory",
128+
"lucene-misc",
129+
"lucene-queries",
130+
"lucene-queryparser",
131+
"lucene-sandbox",
132+
"lucene-spatial-extras",
133+
"lucene-spatial3d",
134+
"lucene-suggest"
135+
]

server/build.gradle

+17-31
Original file line numberDiff line numberDiff line change
@@ -74,60 +74,46 @@ dependencies {
7474
compileOnly project(':libs:opensearch-plugin-classloader')
7575
testRuntimeOnly project(':libs:opensearch-plugin-classloader')
7676

77-
// lucene
78-
api "org.apache.lucene:lucene-core:${versions.lucene}"
79-
api "org.apache.lucene:lucene-analysis-common:${versions.lucene}"
80-
api "org.apache.lucene:lucene-backward-codecs:${versions.lucene}"
81-
api "org.apache.lucene:lucene-grouping:${versions.lucene}"
82-
api "org.apache.lucene:lucene-highlighter:${versions.lucene}"
83-
api "org.apache.lucene:lucene-join:${versions.lucene}"
84-
api "org.apache.lucene:lucene-memory:${versions.lucene}"
85-
api "org.apache.lucene:lucene-misc:${versions.lucene}"
86-
api "org.apache.lucene:lucene-queries:${versions.lucene}"
87-
api "org.apache.lucene:lucene-queryparser:${versions.lucene}"
88-
api "org.apache.lucene:lucene-sandbox:${versions.lucene}"
89-
api "org.apache.lucene:lucene-spatial-extras:${versions.lucene}"
90-
api "org.apache.lucene:lucene-spatial3d:${versions.lucene}"
91-
api "org.apache.lucene:lucene-suggest:${versions.lucene}"
77+
api libs.bundles.lucene
9278

9379
// utilities
9480
api project(":libs:opensearch-cli")
9581

9682
// time handling, remove with java 8 time
97-
api "joda-time:joda-time:${versions.joda}"
83+
api libs.jodatime
9884

9985
// percentiles aggregation
100-
api "com.tdunning:t-digest:${versions.tdigest}"
86+
api libs.tdigest
10187
// percentile ranks aggregation
102-
api "org.hdrhistogram:HdrHistogram:${versions.hdrhistogram}"
88+
api libs.hdrhistogram
10389

10490
// lucene spatial
105-
api "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}", optional
106-
api "org.locationtech.jts:jts-core:${versions.jts}", optional
91+
api libs.spatial4j, optional
92+
api libs.jtscore, optional
10793

10894
// logging
109-
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
110-
api "org.apache.logging.log4j:log4j-jul:${versions.log4j}"
111-
api "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional
112-
annotationProcessor "org.apache.logging.log4j:log4j-core:${versions.log4j}"
95+
api libs.log4japi
96+
api libs.log4jjul
97+
api libs.log4jcore, optional
98+
annotationProcessor libs.log4jcore
11399
annotationProcessor project(':libs:opensearch-common')
114100

115101
// jna
116-
api "net.java.dev.jna:jna:${versions.jna}"
102+
api libs.jna
117103

118104
// jcraft
119-
api "com.jcraft:jzlib:${versions.jzlib}"
105+
api libs.jzlib
120106

121107
// reactor
122-
api "io.projectreactor:reactor-core:${versions.reactor}"
123-
api "org.reactivestreams:reactive-streams:${versions.reactivestreams}"
108+
api libs.reactorcore
109+
api libs.reactivestreams
124110

125111
// protobuf
126-
api "com.google.protobuf:protobuf-java:${versions.protobuf}"
127-
api "jakarta.annotation:jakarta.annotation-api:${versions.jakarta_annotation}"
112+
api libs.protobuf
113+
api libs.jakartaannotation
128114

129115
// https://mvnrepository.com/artifact/org.roaringbitmap/RoaringBitmap
130-
implementation 'org.roaringbitmap:RoaringBitmap:1.3.0'
116+
api libs.roaringbitmap
131117

132118
testImplementation(project(":test:framework")) {
133119
// tests use the locally compiled version of server

0 commit comments

Comments
 (0)