Buck: Tweak Eclipse project generation to include sources again
Ib3f22e70b7 upgraded to new Buck version but broke sources download during Eclipse project creation. That's because the namespacing of genrule() artifact. To rectify and to avoid querying the actual location of source artifact from Buck for every source library with: $ buck targets --show_output //lib:foo__download_src | awk '{print $2}' switch from using genrule() to prebuilt_jar() to induce the source from binary artifact, because the location is stable for this rule. Change-Id: I153d3e31b4f7098ddd5157b7b1bba17529c83b32
This commit is contained in:
@@ -123,7 +123,7 @@ def maven_jar(
|
||||
else:
|
||||
srcjar = None
|
||||
genrule(
|
||||
name = '%s__download_src' % name,
|
||||
name = '%s_src' % name,
|
||||
cmd = ':>$OUT',
|
||||
out = '__%s__no_src' % name,
|
||||
)
|
||||
|
@@ -32,7 +32,7 @@ for line in p.stdout:
|
||||
if m:
|
||||
n = m.group(1)
|
||||
if args.src and n.endswith('__download_bin'):
|
||||
n = n[:-4] + '_src'
|
||||
n = n[:-13] + 'src'
|
||||
targets.add(n)
|
||||
r = p.wait()
|
||||
if r != 0:
|
||||
|
@@ -169,7 +169,7 @@ def gen_classpath():
|
||||
for j in sorted(libs):
|
||||
s = None
|
||||
if j.endswith('.jar'):
|
||||
s = j[:-4] + '-src.jar'
|
||||
s = j[:-4] + '_src.jar'
|
||||
if not path.exists(s):
|
||||
s = None
|
||||
if args.plugins:
|
||||
|
Reference in New Issue
Block a user