| SRCS = 'src/main/java/com/google/gerrit/pgm/' |
| |
| INIT_API_SRCS = [SRCS + n for n in [ |
| 'init/InitFlags.java', |
| 'init/InitStep.java', |
| 'init/InitStep.java', |
| 'init/InstallPlugins.java', |
| 'init/Section.java', |
| 'util/ConsoleUI.java', |
| 'util/Die.java', |
| ]] |
| |
| java_library( |
| name = 'init-api', |
| srcs = INIT_API_SRCS, |
| deps = [ |
| '//gerrit-common:server', |
| '//gerrit-server:server', |
| '//lib/guice:guice', |
| '//lib/guice:guice-assistedinject', |
| '//lib/jgit:jgit', |
| ], |
| visibility = ['PUBLIC'], |
| ) |
| |
| java_sources( |
| name = 'init-api-src', |
| srcs = INIT_API_SRCS, |
| visibility = ['PUBLIC'], |
| ) |
| |
| INIT_BASE_SRCS = [SRCS + 'BaseInit.java'] + glob( |
| [SRCS + n for n in [ |
| 'init/**/*.java', |
| 'util/**/*.java', |
| ]], |
| excludes = INIT_API_SRCS + |
| [SRCS + n for n in [ |
| 'init/Browser.java', |
| 'util/ErrorLogFile.java', |
| 'util/GarbageCollectionLogFile.java', |
| 'util/LogFileCompressor.java', |
| 'util/RuntimeShutdown.java', |
| ]] |
| ) |
| |
| INIT_BASE_RSRCS = ['src/main/resources/com/google/gerrit/pgm/libraries.config'] |
| |
| java_library2( |
| name = 'init-base', |
| srcs = INIT_BASE_SRCS, |
| resources = INIT_BASE_RSRCS, |
| deps = [ |
| ':init-api', |
| '//gerrit-common:server', |
| '//gerrit-extension-api:api', |
| '//gerrit-reviewdb:server', |
| '//gerrit-server:server', |
| '//gerrit-util-cli:cli', |
| '//lib/commons:dbcp', |
| '//lib/guice:guice', |
| '//lib/guice:guice-assistedinject', |
| '//lib/jgit:jgit', |
| '//lib/mina:sshd', |
| '//lib:args4j', |
| '//lib:guava', |
| '//lib:gwtjsonrpc', |
| '//lib:gwtorm', |
| ], |
| compile_deps = ['//gerrit-launcher:launcher'], |
| visibility = ['//gerrit-war:'], |
| ) |
| |
| java_library2( |
| name = 'pgm', |
| srcs = glob( |
| ['src/main/java/**/*.java'], |
| excludes = INIT_API_SRCS + INIT_BASE_SRCS |
| ), |
| resources = glob( |
| ['src/main/resources/**/*'], |
| excludes = INIT_BASE_RSRCS), |
| deps = [ |
| ':init-api', |
| ':init-base', |
| '//gerrit-cache-h2:cache-h2', |
| '//gerrit-common:server', |
| '//gerrit-extension-api:api', |
| '//gerrit-gwtexpui:server', |
| '//gerrit-httpd:httpd', |
| '//gerrit-lucene:lucene', |
| '//gerrit-openid:openid', |
| '//gerrit-reviewdb:server', |
| '//gerrit-server:server', |
| '//gerrit-server/src/main/prolog:common', |
| '//gerrit-solr:solr', |
| '//gerrit-sshd:sshd', |
| '//gerrit-util-cli:cli', |
| '//lib:args4j', |
| '//lib:guava', |
| '//lib:gwtorm', |
| '//lib:h2', |
| '//lib:servlet-api-3_0', |
| '//lib/guice:guice', |
| '//lib/guice:guice-servlet', |
| '//lib/jetty:server', |
| '//lib/jetty:servlet', |
| '//lib/jgit:jgit', |
| '//lib/log:api', |
| '//lib/log:log4j', |
| '//lib/lucene:core', |
| '//lib/prolog:prolog-cafe', |
| ], |
| compile_deps = ['//gerrit-launcher:launcher'], |
| visibility = [ |
| '//:', |
| '//gerrit-acceptance-tests/...', |
| '//tools/eclipse:classpath', |
| '//Documentation:licenses.txt', |
| ], |
| ) |
| |
| java_test( |
| name = 'pgm_tests', |
| srcs = glob(['src/test/java/**/*.java']), |
| deps = [ |
| ':init-api', |
| ':init-base', |
| ':pgm', |
| '//gerrit-server:server', |
| '//lib:junit', |
| '//lib:easymock', |
| '//lib/guice:guice', |
| '//lib/jgit:jgit', |
| '//lib/jgit:junit', |
| ], |
| source_under_test = [':pgm'], |
| ) |