
Latest version of buck is faster than the prior version used by Gerrit. No-op updates when loading a debug version of the UI now take only 1.804s on my laptop (previously 7s) and a draft UI compile is only 24.659s (previously 39s). The slow acceptance tests must now be excluded with `--exclude slow`. Buck changed the meaning of the -e option to be --emulator, which is unfortunately useful only for Android application developers. genrule() now needs to use $(exe) to reference the binary to run, offers $(location) to make it easier to find files in the build tree. The empty srcs array is no longer required for genrule(). Buck has determined it is sufficiently powerful with $(location) and deps that requiring srcs is unnecessary. Supporting .src.zip files in the srcs array of java_library() means Gerrit no longer needs to run a separate genrule() to extract files produced by ANTLR, or call javac inside of the BuckPrologCompiler support glue. Change-Id: Ib03042921a081b867a7aad0423bd45523e42917a
43 lines
988 B
Python
43 lines
988 B
Python
include_defs('//lib/maven.defs')
|
|
|
|
VERSION = 'b05b96e030'
|
|
SHA1 = '42c541dfdeb877ad726d265e7b1e7da0d429af84'
|
|
URL = GERRIT + 'net/codemirror/codemirror-%s.zip' % VERSION
|
|
|
|
prebuilt_jar(
|
|
name = 'codemirror',
|
|
binary_jar = genfile('codemirror.jar'),
|
|
deps = [
|
|
':jar',
|
|
'//lib:LICENSE-codemirror',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
# TODO(sop) Repackage by license boundaries.
|
|
# TODO(sop) Minify with Closure JS compiler.
|
|
genrule(
|
|
name = 'jar',
|
|
cmd = ';'.join([
|
|
'cd $TMP',
|
|
'mkdir net META-INF',
|
|
'unzip -d net $SRCS',
|
|
'mv net/codemirror-%s net/codemirror' % VERSION,
|
|
'echo "Manifest-Version: 1.0" >META-INF/MANIFEST.MF',
|
|
'zip -r $OUT *'
|
|
]),
|
|
srcs = [genfile('codemirror-' + VERSION + '.zip')],
|
|
deps = [':download'],
|
|
out = 'codemirror.jar',
|
|
)
|
|
|
|
genrule(
|
|
name = 'download',
|
|
cmd = '$(exe //tools:download_file)' +
|
|
' -o $OUT' +
|
|
' -u ' + URL +
|
|
' -v ' + SHA1,
|
|
deps = ['//tools:download_file'],
|
|
out = 'codemirror-' + VERSION + '.zip',
|
|
)
|