gerrit/gerrit-httpd/BUCK
Dave Borowitz eba26614e5 Convert some value classes to AutoValue
These classes were found by searching for custom hashCode
implementations, and omitting some cases:

 - Classes requiring custom serialization, which is not supported[1][2].
 - Most instances with custom hashCode or equals implementations,
   where the code savings is not as significant.
 - All classes in the extension API. We may migrate these eventually,
   but let's avoid this large backwards incompatible change until
   we're more used to AutoValue elsewhere.
 - All classes in the UI package.[3]

There are likely still more value classes that were missed by this
search that do not implement equals or hashCode.

[1] https://github.com/google/auto/tree/master/value#serialization
[2] This excludes, among other things, all persistent cache keys. It
might be possible to convert persistent caches to use a key
marshalling strategy other than Java serialization, but probably not
without invalidating all existing entries.
[3] This should still be possible as generated classes are generally
GWT compatible.

Change-Id: I96796b9879b7e487b80949b63115ac4032180f8b
2015-01-22 12:15:58 -08:00

73 lines
1.7 KiB
Python

SRCS = glob(
['src/main/java/**/*.java'],
)
RESOURCES = glob(['src/main/resources/**/*'])
java_library(
name = 'httpd',
srcs = SRCS,
resources = RESOURCES,
deps = [
'//gerrit-antlr:query_exception',
'//gerrit-common:annotations',
'//gerrit-common:server',
'//gerrit-extension-api:api',
'//gerrit-gwtexpui:server',
'//gerrit-patch-jgit:server',
'//gerrit-prettify:server',
'//gerrit-reviewdb:server',
'//gerrit-server:server',
'//gerrit-util-cli:cli',
'//gerrit-util-http:http',
'//lib:args4j',
'//lib:gson',
'//lib:guava',
'//lib:gwtjsonrpc',
'//lib:gwtorm',
'//lib:jsch',
'//lib:mime-util',
'//lib/auto:auto-value',
'//lib/commons:codec',
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
'//lib/guice:guice-servlet',
'//lib/jgit:jgit',
'//lib/jgit:jgit-servlet',
'//lib/log:api',
'//lib/lucene:core',
],
provided_deps = ['//lib:servlet-api-3_1'],
visibility = ['PUBLIC'],
)
java_sources(
name = 'httpd-src',
srcs = SRCS + RESOURCES,
visibility = ['PUBLIC'],
)
java_test(
name = 'httpd_tests',
srcs = glob(['src/test/java/**/*.java']),
deps = [
':httpd',
'//gerrit-common:server',
'//gerrit-extension-api:api',
'//gerrit-reviewdb:server',
'//gerrit-server:server',
'//gerrit-util-http:http',
'//lib:junit',
'//lib:gson',
'//lib:gwtorm',
'//lib:guava',
'//lib:servlet-api-3_1',
'//lib/easymock:easymock',
'//lib/guice:guice',
'//lib/jgit:jgit',
'//lib/jgit:junit',
],
source_under_test = [':httpd'],
# TODO(sop) Remove after Buck supports Eclipse
visibility = ['//tools/eclipse:classpath'],
)