Update buck build for strict dependencies
java_library() targets must now list every dependency they need for an import. This permits buck to run more targets in parallel as it has a better view of the dependency graph, and opens the door for buck to make even more optimizations in the future. Change-Id: I132bf47a725e44ba5950ba6ca76bfa72c3876906
This commit is contained in:
committed by
Gerrit Code Review
parent
be0e5c698f
commit
bd5629718f
1
lib/BUCK
1
lib/BUCK
@@ -169,7 +169,6 @@ maven_jar(
|
||||
sha1 = '3fc3013adf98701efcc594a1ea99a3f841dc81bb',
|
||||
license = 'Apache2.0',
|
||||
attach_source = False,
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
|
||||
@@ -7,16 +7,24 @@ EXCLUDE = [
|
||||
'META-INF/NOTICE',
|
||||
]
|
||||
|
||||
maven_jar(
|
||||
java_library(
|
||||
name = 'guice',
|
||||
deps = [
|
||||
':guice_library',
|
||||
':javax-inject',
|
||||
],
|
||||
export_deps = True,
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = 'guice_library',
|
||||
id = 'com.google.inject:guice:' + VERSION,
|
||||
sha1 = '9d84f15fe35e2c716a02979fb62f50a29f38aefa',
|
||||
license = 'Apache2.0',
|
||||
deps = [
|
||||
':javax-inject',
|
||||
':aopalliance',
|
||||
],
|
||||
deps = [':aopalliance'],
|
||||
exclude = EXCLUDE,
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
@@ -37,7 +45,6 @@ maven_jar(
|
||||
exclude = EXCLUDE,
|
||||
)
|
||||
|
||||
|
||||
maven_jar(
|
||||
name = 'aopalliance',
|
||||
id = 'aopalliance:aopalliance:1.0',
|
||||
|
||||
@@ -34,8 +34,8 @@ maven_jar(
|
||||
':continuation',
|
||||
':http',
|
||||
],
|
||||
export_deps = True,
|
||||
exclude = EXCLUDE,
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
@@ -44,7 +44,6 @@ maven_jar(
|
||||
sha1 = 'f60cfe6267038000b459508529c88737601081e4',
|
||||
license = 'Apache2.0',
|
||||
exclude = EXCLUDE,
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
@@ -54,7 +53,6 @@ maven_jar(
|
||||
license = 'Apache2.0',
|
||||
deps = [':io'],
|
||||
exclude = EXCLUDE,
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
|
||||
@@ -35,6 +35,7 @@ def maven_jar(
|
||||
sha1 = '', bin_sha1 = '', src_sha1 = '',
|
||||
repository = MAVEN_CENTRAL,
|
||||
attach_source = True,
|
||||
export_deps = False,
|
||||
visibility = ['PUBLIC']):
|
||||
from os import path
|
||||
|
||||
@@ -101,10 +102,24 @@ def maven_jar(
|
||||
out = '__' + name + '__no_src',
|
||||
)
|
||||
|
||||
prebuilt_jar(
|
||||
name = name,
|
||||
deps = deps + license + [':' + name + '__download_bin'],
|
||||
binary_jar = genfile(binjar),
|
||||
source_jar = genfile(srcjar) if srcjar else None,
|
||||
visibility = visibility,
|
||||
)
|
||||
if export_deps:
|
||||
prebuilt_jar(
|
||||
name = name + '__jar',
|
||||
deps = deps + license + [':' + name + '__download_bin'],
|
||||
binary_jar = genfile(binjar),
|
||||
source_jar = genfile(srcjar) if srcjar else None,
|
||||
)
|
||||
java_library(
|
||||
name = name,
|
||||
deps = [':' + name + '__jar'],
|
||||
export_deps = True,
|
||||
visibility = visibility,
|
||||
)
|
||||
else:
|
||||
prebuilt_jar(
|
||||
name = name,
|
||||
deps = deps + license + [':' + name + '__download_bin'],
|
||||
binary_jar = genfile(binjar),
|
||||
source_jar = genfile(srcjar) if srcjar else None,
|
||||
visibility = visibility,
|
||||
)
|
||||
|
||||
@@ -60,5 +60,4 @@ maven_jar(
|
||||
'META-INF/LICENSE.txt',
|
||||
'META-INF/NOTICE.txt',
|
||||
],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user