9a4efd3fff
Both of these jars provide a provider-configuration file in META-INF/services/org.apache.lucene.codecs.Codec registering their respective implementations as providers of this codec. The proper way to merge these files is to concatenate them, but the normal Buck build process would otherwise choose one arbitrarily. Add a new custom rule merge_maven_jars to merge multiple Maven jars together using a simple Python script. The script concatenates all the entries in two zip files, preferring the entry found in the first file on the command line, which is still arbitrary but at least deterministic. It specially handles files in the META-INF/services directory by concatenating them. Use this new rule to merge the old :core and :backward-codecs rules into a single :core-and-backward-codecs rule. Change-Id: I42fd1a130e42cb0eebf7bee61cfdf8545397cd09
42 lines
1001 B
Python
42 lines
1001 B
Python
QUERY_BUILDER = [
|
|
'src/main/java/com/google/gerrit/lucene/QueryBuilder.java',
|
|
]
|
|
|
|
java_library(
|
|
name = 'query_builder',
|
|
srcs = QUERY_BUILDER,
|
|
deps = [
|
|
'//gerrit-antlr:query_exception',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:server',
|
|
'//lib:gwtorm',
|
|
'//lib:guava',
|
|
'//lib/lucene:core-and-backward-codecs',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'lucene',
|
|
srcs = glob(['src/main/java/**/*.java'], excludes = QUERY_BUILDER),
|
|
deps = [
|
|
':query_builder',
|
|
'//gerrit-antlr:query_exception',
|
|
'//gerrit-common:annotations',
|
|
'//gerrit-common:server',
|
|
'//gerrit-extension-api:api',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:server',
|
|
'//lib:guava',
|
|
'//lib:gwtorm',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
'//lib/jgit:jgit',
|
|
'//lib/log:api',
|
|
'//lib/lucene:analyzers-common',
|
|
'//lib/lucene:core-and-backward-codecs',
|
|
'//lib/lucene:misc',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|