Merge changes I4212ac32,I09d95176
* changes: Buck: Move gwt-dev transitive deps to first order dependency Buck: Trigger pack_war invocation when one of transitive deps changed
This commit is contained in:
@@ -663,6 +663,8 @@ The following tests should be executed, when Buck version is upgraded:
|
||||
* buck build release
|
||||
* buck build api_install
|
||||
* buck test
|
||||
* buck build gerrit, change some sources in gerrit-server project,
|
||||
repeat buck build gerrit and verify that gerrit.war was updated
|
||||
* install and verify new gerrit site
|
||||
* upgrade and verify existing gerrit site
|
||||
* reindex existing gerrit site
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include_defs('//gerrit-gwtui/gwt.defs')
|
||||
include_defs('//tools/gwt-constants.defs')
|
||||
|
||||
DEPS = [
|
||||
DEPS = GWT_TRANSITIVE_DEPS + [
|
||||
'//gerrit-gwtexpui:CSS',
|
||||
'//lib:gwtjsonrpc',
|
||||
'//lib/gwt:dev',
|
||||
|
||||
@@ -55,7 +55,7 @@ java_doc(
|
||||
deps = DEPS + [
|
||||
'//lib:gwtjsonrpc',
|
||||
'//lib:gwtorm_client',
|
||||
'//lib/gwt:dev__jar',
|
||||
'//lib/gwt:dev',
|
||||
'//gerrit-gwtui-common:client-lib',
|
||||
'//gerrit-common:client',
|
||||
'//gerrit-reviewdb:client',
|
||||
|
||||
13
lib/gwt/BUCK
13
lib/gwt/BUCK
@@ -15,15 +15,6 @@ maven_jar(
|
||||
id = 'com.google.gwt:gwt-dev:' + VERSION,
|
||||
sha1 = 'c2c3dd5baf648a0bb199047a818be5e560f48982',
|
||||
license = 'Apache2.0',
|
||||
exported_deps = [
|
||||
':javax-validation',
|
||||
':javax-validation_src',
|
||||
'//lib/ow2:ow2-asm',
|
||||
'//lib/ow2:ow2-asm-analysis',
|
||||
'//lib/ow2:ow2-asm-commons',
|
||||
'//lib/ow2:ow2-asm-tree',
|
||||
'//lib/ow2:ow2-asm-util',
|
||||
],
|
||||
attach_source = False,
|
||||
exclude = ['org/eclipse/jetty/*'],
|
||||
)
|
||||
@@ -34,7 +25,7 @@ maven_jar(
|
||||
bin_sha1 = 'b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e',
|
||||
src_sha1 = '7a561191db2203550fbfa40d534d4997624cd369',
|
||||
license = 'Apache2.0',
|
||||
visibility = [],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
@@ -54,5 +45,5 @@ maven_jar(
|
||||
id = 'org.javassist:javassist:3.18.1-GA',
|
||||
sha1 = 'd9a09f7732226af26bf99f19e2cffe0ae219db5b',
|
||||
license = 'Apache2.0',
|
||||
visibility = [],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
@@ -42,15 +42,13 @@ def war(
|
||||
):
|
||||
cmd = ['$(exe //tools:pack_war)', '-o', '$OUT', '--tmp', '$TMP']
|
||||
for l in libs:
|
||||
cmd.extend(['--lib', l])
|
||||
cmd.extend(['--lib', '$(classpath %s)' % l])
|
||||
for l in pgmlibs:
|
||||
cmd.extend(['--pgmlib', l])
|
||||
cmd.extend(['--pgmlib', '$(classpath %s)' % l])
|
||||
|
||||
dep = []
|
||||
if docs:
|
||||
cmd.append('$(location %s)' % DOCS_HTML)
|
||||
dep.append(DOCS_LIB)
|
||||
cmd.extend(['--lib', DOCS_LIB])
|
||||
cmd.extend(['--lib', '$(classpath %s)' % DOCS_LIB])
|
||||
if context:
|
||||
for t in context:
|
||||
cmd.append('$(location %s)' % t)
|
||||
@@ -58,7 +56,6 @@ def war(
|
||||
genrule(
|
||||
name = name,
|
||||
cmd = ' '.join(cmd),
|
||||
deps = libs + pgmlibs + dep,
|
||||
out = name + '.war',
|
||||
visibility = visibility,
|
||||
)
|
||||
|
||||
@@ -193,7 +193,7 @@ def gerrit_plugin(
|
||||
gwt_binary(
|
||||
name = name + '__gwt_application',
|
||||
modules = [gwt_module],
|
||||
deps = GWT_PLUGIN_DEPS + ['//lib/gwt:dev'],
|
||||
deps = GWT_PLUGIN_DEPS + GWT_TRANSITIVE_DEPS + ['//lib/gwt:dev'],
|
||||
module_deps = [':%s__gwt_module' % name],
|
||||
local_workers = cpu_count(),
|
||||
strict = True,
|
||||
|
||||
@@ -12,3 +12,13 @@ GWT_PLUGIN_DEPS = [
|
||||
'//gerrit-plugin-gwtui:gwtui-api-lib',
|
||||
'//lib/gwt:user',
|
||||
]
|
||||
|
||||
GWT_TRANSITIVE_DEPS = [
|
||||
'//lib/gwt:javax-validation',
|
||||
'//lib/gwt:javax-validation_src',
|
||||
'//lib/ow2:ow2-asm',
|
||||
'//lib/ow2:ow2-asm-analysis',
|
||||
'//lib/ow2:ow2-asm-commons',
|
||||
'//lib/ow2:ow2-asm-tree',
|
||||
'//lib/ow2:ow2-asm-util',
|
||||
]
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
from __future__ import print_function
|
||||
from optparse import OptionParser
|
||||
from os import chdir, makedirs, path, symlink
|
||||
from subprocess import check_call, check_output
|
||||
from subprocess import check_call
|
||||
import sys
|
||||
|
||||
opts = OptionParser()
|
||||
@@ -30,17 +30,14 @@ war = args.tmp
|
||||
root = war[:war.index('buck-out')]
|
||||
jars = set()
|
||||
|
||||
def prune(l):
|
||||
return [j[j.find('buck-out'):] for e in l for j in e.split(':')]
|
||||
|
||||
def link_jars(libs, directory):
|
||||
makedirs(directory)
|
||||
while not path.isfile('.buckconfig'):
|
||||
chdir('..')
|
||||
try:
|
||||
cp = check_output(['buck', 'audit', 'classpath'] + libs)
|
||||
except Exception as e:
|
||||
print('call to buck audit failed: %s' % e, file=sys.stderr)
|
||||
exit(1)
|
||||
for j in cp.strip().splitlines():
|
||||
for j in libs:
|
||||
if j not in jars:
|
||||
jars.add(j)
|
||||
n = path.basename(j)
|
||||
@@ -49,9 +46,9 @@ def link_jars(libs, directory):
|
||||
symlink(path.join(root, j), path.join(directory, n))
|
||||
|
||||
if args.lib:
|
||||
link_jars(args.lib, path.join(war, 'WEB-INF', 'lib'))
|
||||
link_jars(prune(args.lib), path.join(war, 'WEB-INF', 'lib'))
|
||||
if args.pgmlib:
|
||||
link_jars(args.pgmlib, path.join(war, 'WEB-INF', 'pgm-lib'))
|
||||
link_jars(prune(args.pgmlib), path.join(war, 'WEB-INF', 'pgm-lib'))
|
||||
try:
|
||||
for s in ctx:
|
||||
check_call(['unzip', '-q', '-d', war, s])
|
||||
|
||||
Reference in New Issue
Block a user