05cb053378
GWT only needs the rebind code for CSS and ServerLinker to be precompiled as bytecode. Save build time by passing no source files to the java_library() used by gwt_module(). For a full draft build of ui_safari this cuts the refresh time down from 32.015s to 26.158s on my MacBook. Saving 6s on each UI reload adds up during development. The common annotations need to be provided as bytecode, avoiding spurious warnings from GWT when there is a Java syntax error. Change-Id: I37826498650c65c05303e7d4d1177d05781c56f6
57 lines
1.1 KiB
Python
57 lines
1.1 KiB
Python
SRC = 'src/main/java/com/google/gerrit/'
|
|
|
|
ANNOTATIONS = [
|
|
SRC + 'common/Nullable.java',
|
|
SRC + 'common/audit/Audit.java',
|
|
SRC + 'common/auth/SignInRequired.java',
|
|
]
|
|
|
|
java_library(
|
|
name = 'annotations',
|
|
srcs = ANNOTATIONS,
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
gwt_module(
|
|
name = 'client',
|
|
srcs = glob([SRC + 'common/**/*.java']),
|
|
gwtxml = SRC + 'Common.gwt.xml',
|
|
deps = [
|
|
'//gerrit-patch-jgit:client',
|
|
'//gerrit-prettify:client',
|
|
'//gerrit-reviewdb:client',
|
|
],
|
|
compile_deps = [
|
|
':annotations',
|
|
'//lib:gwtjsonrpc',
|
|
'//lib:gwtorm',
|
|
'//lib/jgit:jgit',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_library(
|
|
name = 'server',
|
|
srcs = glob([SRC + 'common/**/*.java'], excludes = ANNOTATIONS),
|
|
deps = [
|
|
':annotations',
|
|
'//gerrit-patch-jgit:server',
|
|
'//gerrit-prettify:server',
|
|
'//gerrit-reviewdb:server',
|
|
'//lib:gwtjsonrpc',
|
|
'//lib:gwtorm',
|
|
'//lib/jgit:jgit',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_test(
|
|
name = 'client_tests',
|
|
srcs = glob(['src/test/java/**/*.java']),
|
|
deps = [
|
|
':client',
|
|
'//lib:junit',
|
|
],
|
|
source_under_test = [':client'],
|
|
)
|