Allow to share guava definitions between buck and bazel builds
Move the definitions of GUAVA_VERSION and GUAVA_DOC_URL into a separate .bzl file, and add GUAVA_BIN_SHA1. Modify the existing GUAVA_VERSION file to include the new .bzl file. This allows to reuse the same values in both the buck and bazel builds, and when we update Guava we only need to modify one file. Update the bazel build of the extension API to include the Guava Javadoc URL in the javadoc rule. Change-Id: I7895ceb761d609d79d3b80a271e6bd7425c17e2b
This commit is contained in:
parent
bc1062f2b6
commit
5eaed62346
@ -221,10 +221,12 @@ maven_jar(
|
|||||||
sha1 = '675642ac208e0b741bc9118dcbcae44c271b992a',
|
sha1 = '675642ac208e0b741bc9118dcbcae44c271b992a',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
load('//lib:guava.bzl', 'GUAVA_VERSION', 'GUAVA_BIN_SHA1')
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = 'guava',
|
name = 'guava',
|
||||||
artifact = 'com.google.guava:guava:20.0-rc1',
|
artifact = 'com.google.guava:guava:' + GUAVA_VERSION,
|
||||||
sha1 = '4c2a4581b69b16a57968da32fcadb8e362b639b2',
|
sha1 = GUAVA_BIN_SHA1,
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
load('//lib:guava.bzl', 'GUAVA_DOC_URL')
|
||||||
load('//lib/jgit:jgit.bzl', 'JGIT_DOC_URL')
|
load('//lib/jgit:jgit.bzl', 'JGIT_DOC_URL')
|
||||||
load('//tools/bzl:gwt.bzl', 'gwt_module')
|
load('//tools/bzl:gwt.bzl', 'gwt_module')
|
||||||
|
|
||||||
@ -53,5 +54,5 @@ java_doc(
|
|||||||
title = 'Gerrit Review Extension API Documentation',
|
title = 'Gerrit Review Extension API Documentation',
|
||||||
libs = [':api'],
|
libs = [':api'],
|
||||||
pkgs = ['com.google.gerrit.extensions'],
|
pkgs = ['com.google.gerrit.extensions'],
|
||||||
external_docs = [JGIT_DOC_URL],
|
external_docs = [JGIT_DOC_URL, GUAVA_DOC_URL],
|
||||||
)
|
)
|
||||||
|
2
lib/BUCK
2
lib/BUCK
@ -70,7 +70,7 @@ maven_jar(
|
|||||||
maven_jar(
|
maven_jar(
|
||||||
name = 'guava',
|
name = 'guava',
|
||||||
id = 'com.google.guava:guava:' + GUAVA_VERSION,
|
id = 'com.google.guava:guava:' + GUAVA_VERSION,
|
||||||
sha1 = '4c2a4581b69b16a57968da32fcadb8e362b639b2',
|
sha1 = GUAVA_BIN_SHA1,
|
||||||
license = 'Apache2.0',
|
license = 'Apache2.0',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,2 +1 @@
|
|||||||
GUAVA_VERSION = '20.0-rc1'
|
include_defs('//lib/guava.bzl')
|
||||||
GUAVA_DOC_URL = 'https://google.github.io/guava/releases/' + GUAVA_VERSION + '/api/docs/'
|
|
||||||
|
3
lib/guava.bzl
Normal file
3
lib/guava.bzl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
GUAVA_VERSION = '20.0-rc1'
|
||||||
|
GUAVA_BIN_SHA1 = '4c2a4581b69b16a57968da32fcadb8e362b639b2'
|
||||||
|
GUAVA_DOC_URL = 'https://google.github.io/guava/releases/' + GUAVA_VERSION + '/api/docs/'
|
Loading…
Reference in New Issue
Block a user