Remove Buck based build

Bug: Issue 5302
Change-Id: I6e860446ef30ff0ad1c7c49fc0e39d39d921820b
This commit is contained in:
David Ostrovsky
2016-11-15 06:35:29 -08:00
committed by Hector Oswaldo Caballero
parent b33d052c45
commit fdbfcad77d
151 changed files with 71 additions and 8296 deletions

319
lib/BUCK
View File

@@ -1,319 +0,0 @@
include_defs('//lib/maven.defs')
include_defs('//lib/GUAVA_VERSION')
define_license(name = 'antlr')
define_license(name = 'Apache1.1')
define_license(name = 'Apache2.0')
define_license(name = 'args4j')
define_license(name = 'asciidoctor')
define_license(name = 'automaton')
define_license(name = 'bouncycastle')
define_license(name = 'CC-BY3.0-unported')
define_license(name = 'clippy')
define_license(name = 'codemirror-minified')
define_license(name = 'codemirror-original')
define_license(name = 'diffy')
define_license(name = 'es6-promise')
define_license(name = 'fetch')
define_license(name = 'h2')
define_license(name = 'highlightjs')
define_license(name = 'icu4j')
define_license(name = 'jgit')
define_license(name = 'jsch')
define_license(name = 'jsoup')
define_license(name = 'MPL1.1')
define_license(name = 'moment')
define_license(name = 'OFL1.1')
define_license(name = 'ow2')
define_license(name = 'page.js')
define_license(name = 'polymer')
define_license(name = 'postgresql')
define_license(name = 'prologcafe')
define_license(name = 'promise-polyfill')
define_license(name = 'protobuf')
define_license(name = 'PublicDomain')
define_license(name = 'silk_icons')
define_license(name = 'slf4j')
define_license(name = 'xz')
define_license(name = 'DO_NOT_DISTRIBUTE')
maven_jar(
name = 'gwtorm_client',
id = 'com.google.gerrit:gwtorm:1.17',
bin_sha1 = "97bdc872f00388910c9af70771f07bbb32f1b949",
src_sha1 = "889e35d7295b1af49161a28daaea9905ffa76a63",
license = 'Apache2.0',
)
java_library(
name = 'gwtorm',
exported_deps = [':gwtorm_client'],
deps = [':protobuf'],
visibility = ['PUBLIC'],
)
maven_jar(
name = 'gwtjsonrpc',
id = 'com.google.gerrit:gwtjsonrpc:1.11',
bin_sha1 = '0990e7eec9eec3a15661edcf9232acbac4aeacec',
src_sha1 = 'a682afc46284fb58197a173cb5818770a1e7834a',
license = 'Apache2.0',
)
maven_jar(
name = 'gson',
id = 'com.google.code.gson:gson:2.7',
sha1 = '751f548c85fa49f330cecbb1875893f971b33c4e',
license = 'Apache2.0',
)
maven_jar(
name = 'guava',
id = 'com.google.guava:guava:' + GUAVA_VERSION,
sha1 = GUAVA_BIN_SHA1,
license = 'Apache2.0',
)
maven_jar(
name = 'guava-retrying',
id = 'com.github.rholder:guava-retrying:2.0.0',
sha1 = '974bc0a04a11cc4806f7c20a34703bd23c34e7f4',
license = 'Apache2.0',
deps = [':jsr305'],
)
maven_jar(
name = 'jsr305',
id = 'com.google.code.findbugs:jsr305:3.0.1',
sha1 = 'f7be08ec23c21485b9b5a1cf1654c2ec8c58168d',
license = 'Apache2.0',
attach_source = False,
# Whitelist lib targets that have jsr305 as a dependency. Generally speaking
# Gerrit core should not depend on these annotations, and instead use
# equivalent annotations in com.google.gerrit.common.
visibility = [
'//gerrit-plugin-api:lib',
'//lib:guava-retrying',
'//lib:soy',
],
)
maven_jar(
name = 'velocity',
id = 'org.apache.velocity:velocity:1.7',
sha1 = '2ceb567b8f3f21118ecdec129fe1271dbc09aa7a',
license = 'Apache2.0',
deps = [
'//lib/commons:collections',
'//lib/commons:lang',
'//lib/commons:oro',
],
exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
)
maven_jar(
name = 'jsch',
id = 'com.jcraft:jsch:0.1.54',
sha1 = 'da3584329a263616e277e15462b387addd1b208d',
license = 'jsch',
)
maven_jar(
name = 'servlet-api-3_1',
id = 'org.apache.tomcat:tomcat-servlet-api:8.0.24',
sha1 = '5d9e2e895e3111622720157d0aa540066d5fce3a',
license = 'Apache2.0',
exclude = ['META-INF/NOTICE', 'META-INF/LICENSE'],
)
maven_jar(
name = 'args4j',
id = 'args4j:args4j:2.0.26',
sha1 = '01ebb18ebb3b379a74207d5af4ea7c8338ebd78b',
license = 'args4j',
)
maven_jar(
name = 'mime-util',
id = 'eu.medsea.mimeutil:mime-util:2.1.3',
sha1 = '0c9cfae15c74f62491d4f28def0dff1dabe52a47',
license = 'Apache2.0',
exclude = ['LICENSE.txt', 'README.txt'],
attach_source = False,
)
maven_jar(
name = 'juniversalchardet',
id = 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3',
sha1 = 'cd49678784c46aa8789c060538e0154013bb421b',
license = 'MPL1.1',
)
maven_jar(
name = 'automaton',
id = 'dk.brics.automaton:automaton:1.11-8',
sha1 = '6ebfa65eb431ff4b715a23be7a750cbc4cc96d0f',
license = 'automaton',
)
maven_jar(
name = 'pegdown',
id = 'org.pegdown:pegdown:1.4.2',
sha1 = 'd96db502ed832df867ff5d918f05b51ba3879ea7',
license = 'Apache2.0',
deps = [':grappa'],
)
maven_jar(
name = 'grappa',
id = 'com.github.parboiled1:grappa:1.0.4',
sha1 = 'ad4b44b9c305dad7aa1e680d4b5c8eec9c4fd6f5',
license = 'Apache2.0',
deps = [
':jitescript',
'//lib/ow2:ow2-asm',
'//lib/ow2:ow2-asm-analysis',
'//lib/ow2:ow2-asm-tree',
'//lib/ow2:ow2-asm-util',
],
)
maven_jar(
name = 'jitescript',
id = 'me.qmx.jitescript:jitescript:0.4.0',
sha1 = '2e35862b0435c1b027a21f3d6eecbe50e6e08d54',
license = 'Apache2.0',
visibility = ['//lib:grappa'],
)
maven_jar(
name = 'derby',
id = 'org.apache.derby:derby:10.11.1.1',
sha1 = 'df4b50061e8e4c348ce243b921f53ee63ba9bbe1',
license = 'Apache2.0',
attach_source = False,
)
maven_jar(
name = 'h2',
id = 'com.h2database:h2:1.3.176',
sha1 = 'fd369423346b2f1525c413e33f8cf95b09c92cbd',
license = 'h2',
)
maven_jar(
name = 'postgresql',
id = 'org.postgresql:postgresql:9.4.1211.jre7',
sha1 = '56b01e9e667f408818a6ef06a89598dbab80687d',
license = 'postgresql',
attach_source = False,
)
maven_jar(
name = 'protobuf',
# Must match version in gwtorm/pom.xml.
id = 'com.google.protobuf:protobuf-java:2.5.0',
bin_sha1 = 'a10732c76bfacdbd633a7eb0f7968b1059a65dfa',
src_sha1 = '7a27a7fc815e481b367ead5df19b4a71ace4a419',
license = 'protobuf',
)
# Test-only dependencies below.
maven_jar(
name = 'jimfs',
id = 'com.google.jimfs:jimfs:1.1',
sha1 = '8fbd0579dc68aba6186935cc1bee21d2f3e7ec1c',
license = 'DO_NOT_DISTRIBUTE',
deps = [':guava'],
)
maven_jar(
name = 'junit',
id = 'junit:junit:4.11',
sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
license = 'DO_NOT_DISTRIBUTE',
exported_deps = [':hamcrest-core'],
)
maven_jar(
name = 'hamcrest-core',
id = 'org.hamcrest:hamcrest-core:1.3',
sha1 = '42a25dc3219429f0e5d060061f71acb49bf010a0',
license = 'DO_NOT_DISTRIBUTE',
visibility = ['//lib:junit'],
)
maven_jar(
name = 'truth',
id = 'com.google.truth:truth:0.30',
sha1 = '9d591b5a66eda81f0b88cf1c748ab8853d99b18b',
license = 'DO_NOT_DISTRIBUTE',
exported_deps = [
':guava',
':junit',
],
)
maven_jar(
name = 'tukaani-xz',
id = 'org.tukaani:xz:1.4',
sha1 = '18a9a2ce6abf32ea1b5fd31dae5210ad93f4e5e3',
license = 'xz',
attach_source = False,
visibility = ['//gerrit-server:server'],
)
maven_jar(
name = 'javassist',
id = 'org.javassist:javassist:3.20.0-GA',
sha1 = 'a9cbcdfb7e9f86fbc74d3afae65f2248bfbf82a0',
license = 'DO_NOT_DISTRIBUTE',
)
maven_jar(
name = 'blame-cache',
id = 'com/google/gitiles:blame-cache:0.1-9',
sha1 = '51d35e6f8bbc2412265066cea9653dd758c95826',
license = 'Apache2.0',
repository = GERRIT,
)
# Keep this version of Soy synchronized with the version used in Gitiles.
maven_jar(
name = 'soy',
id = 'com.google.template:soy:2016-08-09',
sha1 = '43d33651e95480d515fe26c10a662faafe3ad1e4',
license = 'Apache2.0',
deps = [
':args4j',
':guava',
':gson',
':icu4j',
':jsr305',
':protobuf',
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
'//lib/guice:multibindings',
'//lib/guice:javax-inject',
'//lib/ow2:ow2-asm',
'//lib/ow2:ow2-asm-analysis',
'//lib/ow2:ow2-asm-commons',
'//lib/ow2:ow2-asm-util',
],
)
maven_jar(
name = 'icu4j',
id = 'com.ibm.icu:icu4j:57.1',
sha1 = '198ea005f41219f038f4291f0b0e9f3259730e92',
license = 'icu4j',
)
maven_jar(
name = 'errorprone',
id = 'com.google.errorprone:error_prone_ant:2.0.15',
sha1 = '607e3866e2ee25b74708c2898f84eac2f5452d2f',
license = 'Apache2.0',
)

View File

@@ -1,48 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '3.5.2'
maven_jar(
name = 'java_runtime',
id = 'org.antlr:antlr-runtime:' + VERSION,
sha1 = 'cd9cd41361c155f3af0f653009dcecb08d8b4afd',
license = 'antlr',
)
java_binary(
name = 'antlr-tool',
main_class = 'org.antlr.Tool',
deps = [':tool'],
visibility = ['PUBLIC'],
)
maven_jar(
name = 'stringtemplate',
id = 'org.antlr:stringtemplate:4.0.2',
sha1 = 'e28e09e2d44d60506a7bcb004d6c23ff35c6ac08',
license = 'antlr',
attach_source = False,
visibility = [],
)
maven_jar(
name = 'tool',
id = 'org.antlr:antlr:' + VERSION,
sha1 = 'c4a65c950bfc3e7d04309c515b2177c00baf7764',
license = 'antlr',
deps = [
':java_runtime',
':stringtemplate',
':antlr27',
],
visibility = [],
)
maven_jar(
name = 'antlr27',
id = 'antlr:antlr:2.7.7',
sha1 = '83cd2cd674a217ade95a4bb83a8a14f351f48bd0',
license = 'antlr',
attach_source = False,
visibility = [],
)

View File

@@ -1,61 +0,0 @@
include_defs('//lib/maven.defs')
java_binary(
name = 'asciidoc',
main_class = 'AsciiDoctor',
deps = [':asciidoc_lib'],
visibility = ['PUBLIC'],
)
java_library(
name = 'asciidoc_lib',
srcs = ['java/AsciiDoctor.java'],
deps = [
':asciidoctor',
':jruby',
'//lib:args4j',
'//lib:guava',
'//lib/log:api',
'//lib/log:nop',
],
visibility = ['//tools/eclipse:classpath'],
)
java_binary(
name = 'doc_indexer',
main_class = 'DocIndexer',
deps = [':doc_indexer_lib'],
visibility = ['PUBLIC'],
)
java_library(
name = 'doc_indexer_lib',
srcs = ['java/DocIndexer.java'],
deps = [
':asciidoc_lib',
'//gerrit-server:constants',
'//lib:args4j',
'//lib:guava',
'//lib/lucene:lucene-analyzers-common',
'//lib/lucene:lucene-core-and-backward-codecs',
],
visibility = ['//tools/eclipse:classpath'],
)
maven_jar(
name = 'asciidoctor',
id = 'org.asciidoctor:asciidoctorj:1.5.4.1',
sha1 = 'f7ddfb2bbed2f8da3f9ad0d1a5514f04b4274a5a',
license = 'asciidoctor',
visibility = [],
attach_source = False,
)
maven_jar(
name = 'jruby',
id = 'org.jruby:jruby-complete:9.1.5.0',
sha1 = '00d0003e99da3c4d830b12c099691ce910c84e39',
license = 'DO_NOT_DISTRIBUTE',
visibility = [],
attach_source = False,
)

View File

@@ -1,9 +0,0 @@
include_defs('//lib/maven.defs')
maven_jar(
name = 'auto-value',
id = 'com.google.auto.value:auto-value:1.4-rc1',
sha1 = '9347939002003a7a3c3af48271fc2c18734528a4',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)

View File

@@ -1,21 +0,0 @@
# NOTE: Do not use this file in your build rules; automatically supported by
# our implementation of java_library.
AUTO_VALUE_DEP = '//lib/auto:auto-value'
# Annotation processor classpath requires transitive dependencies.
# TODO(dborowitz): Clean this up when buck issue is closed and there is a
# better supported interface:
# https://github.com/facebook/buck/issues/85
AUTO_VALUE_PROCESSOR_DEPS = [
'//lib:velocity',
'//lib/auto:auto-value',
'//lib/commons:collections',
'//lib/commons:lang',
'//lib/commons:oro',
]
AUTO_VALUE_PROCESSORS = [
'com.google.auto.value.processor.AutoAnnotationProcessor',
'com.google.auto.value.processor.AutoValueProcessor',
]

View File

@@ -1,28 +0,0 @@
include_defs('//lib/maven.defs')
# This version must match the version that also appears in
# gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/libraries.config
VERSION = '1.56'
maven_jar(
name = 'bcprov',
id = 'org.bouncycastle:bcprov-jdk15on:' + VERSION,
sha1 = 'a153c6f9744a3e9dd6feab5e210e1c9861362ec7',
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
)
maven_jar(
name = 'bcpg',
id = 'org.bouncycastle:bcpg-jdk15on:' + VERSION,
sha1 = '9c3f2e7072c8cc1152079b5c25291a9f462631f1',
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
deps = [':bcprov'],
)
maven_jar(
name = 'bcpkix',
id = 'org.bouncycastle:bcpkix-jdk15on:' + VERSION,
sha1 = '4648af70268b6fdb24674fb1fd7c1fcc73db1231',
license = 'DO_NOT_DISTRIBUTE', #'bouncycastle'
deps = [':bcprov'],
)

View File

@@ -1,140 +0,0 @@
include_defs('//lib/maven.defs')
include_defs('//lib/codemirror/cm.defs')
VERSION = '5.22.0'
TOP = 'META-INF/resources/webjars/codemirror/%s' % VERSION
TOP_MINIFIED = 'META-INF/resources/webjars/codemirror-minified/%s' % VERSION
maven_jar(
name = 'codemirror-minified',
id = 'org.webjars.npm:codemirror-minified:' + VERSION,
sha1 = '3e8767c9293614968176fcf66cb873d6eb8b3051',
attach_source = False,
license = 'codemirror-minified',
visibility = [],
)
maven_jar(
name = 'codemirror-original',
id = 'org.webjars.npm:codemirror:' + VERSION,
sha1 = '879c49085a44f062554a4e4a9ac248b7083d37cf',
attach_source = False,
license = 'codemirror-original',
visibility = [],
)
DIFF_MATCH_PATCH_TOP = ('META-INF/resources/webjars/google-diff-match-patch/%s'
% DIFF_MATCH_PATCH_VERSION)
maven_jar(
name = 'diff-match-patch',
id = 'org.webjars:google-diff-match-patch:' + DIFF_MATCH_PATCH_VERSION,
sha1 = '0cf1782dbcb8359d95070da9176059a5a9d37709',
license = 'Apache2.0',
attach_source = False,
)
for archive, suffix, top in [('codemirror-original', '', TOP), ('codemirror-minified', '_r', TOP_MINIFIED)]:
# Main JavaScript and addons
genrule(
name = 'cm' + suffix,
cmd = ';'.join([
"echo '/** @license' >$OUT",
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
"echo '*/' >>$OUT",
] +
['unzip -p $(location :%s) %s/%s >>$OUT' % (archive, top, n) for n in CM_JS] +
['unzip -p $(location :%s) %s/addon/%s >>$OUT' % (archive, top, n)
for n in CM_ADDONS]
),
out = 'cm%s.js' % suffix,
)
# Main CSS
genrule(
name = 'css' + suffix,
cmd = ';'.join([
"echo '/** @license' >$OUT",
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
"echo '*/' >>$OUT",
] +
['unzip -p $(location :%s) %s/%s >>$OUT' % (archive, top, n)
for n in CM_CSS]
),
out = 'cm%s.css' % suffix,
)
# Modes
for n in CM_MODES:
genrule (
name = 'mode_%s%s' % (n, suffix),
cmd = ';'.join([
"echo '/** @license' >$OUT",
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
"echo '*/' >>$OUT",
'unzip -p $(location :%s) %s/mode/%s/%s.js >>$OUT' % (archive, top, n, n),
]
),
out = 'mode_%s%s.js' % (n, suffix),
)
# Themes
for n in CM_THEMES:
genrule(
name = 'theme_%s%s' % (n, suffix),
cmd = ';'.join([
"echo '/** @license' >$OUT",
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
"echo '*/' >>$OUT",
'unzip -p $(location :%s) %s/theme/%s.css >>$OUT' % (archive, top, n)
]
),
out = 'theme_%s%s.css' % (n, suffix),
)
# Merge Addon bundled with diff-match-patch
genrule(
name = 'addon_merge_with_diff_match_patch%s' % suffix,
cmd = ';'.join([
"echo '/** @license' >$OUT",
'unzip -p $(location :%s) %s/LICENSE >>$OUT' % (archive, top),
"echo '*/\n' >>$OUT",
"echo '// The google-diff-match-patch library is from https://repo1.maven.org/maven2/org/webjars/google-diff-match-patch/%s/google-diff-match-patch-%s.jar\n' >> $OUT" % (DIFF_MATCH_PATCH_VERSION, DIFF_MATCH_PATCH_VERSION),
"echo '/** @license' >>$OUT",
'cat $(location //lib:LICENSE-Apache2.0) >>$OUT',
"echo '*/' >>$OUT",
'unzip -p $(location :diff-match-patch) %s/diff_match_patch.js >>$OUT' % DIFF_MATCH_PATCH_TOP,
"echo ';' >> $OUT",
'unzip -p $(location :%s) %s/addon/merge/merge.js >>$OUT' % (archive, top)
]
),
out = 'addon_merge_with_diff_match_patch%s.js' % suffix,
)
# Jar packaging
genrule(
name = 'jar' + suffix,
cmd = ';'.join([
'cd $TMP',
'mkdir -p net/codemirror/{addon,lib,mode,theme}',
'cp $(location :css%s) net/codemirror/lib/cm.css' % suffix,
'cp $(location :cm%s) net/codemirror/lib/cm.js' % suffix]
+ ['cp $(location :mode_%s%s) net/codemirror/mode/%s.js' % (n, suffix, n)
for n in CM_MODES]
+ ['cp $(location :theme_%s%s) net/codemirror/theme/%s.css' % (n, suffix, n)
for n in CM_THEMES]
+ ['cp $(location :addon_merge_with_diff_match_patch%s) net/codemirror/addon/merge_bundled.js' % suffix]
+ ['zip -qr $OUT net/codemirror/{addon,lib,mode,theme}']),
out = 'codemirror%s.jar' % suffix,
)
prebuilt_jar(
name = 'codemirror' + suffix,
binary_jar = ':jar%s' % suffix,
deps = [
':jar' + suffix,
'//lib:LICENSE-' + archive,
],
visibility = ['PUBLIC'],
)

View File

@@ -1,215 +0,0 @@
CM_CSS = [
'lib/codemirror.css',
'addon/dialog/dialog.css',
'addon/merge/merge.css',
'addon/scroll/simplescrollbars.css',
'addon/search/matchesonscrollbar.css',
'addon/lint/lint.css',
]
CM_JS = [
'lib/codemirror.js',
'mode/meta.js',
'keymap/emacs.js',
'keymap/sublime.js',
'keymap/vim.js',
]
CM_ADDONS = [
'dialog/dialog.js',
'edit/closebrackets.js',
'edit/matchbrackets.js',
'edit/trailingspace.js',
'scroll/annotatescrollbar.js',
'scroll/simplescrollbars.js',
'search/jump-to-line.js',
'search/matchesonscrollbar.js',
'search/searchcursor.js',
'search/search.js',
'selection/mark-selection.js',
'mode/multiplex.js',
'mode/overlay.js',
'mode/simple.js',
'lint/lint.js',
]
# Available themes must be enumerated here,
# in gerrit-extension-api/src/main/java/com/google/gerrit/extensions/common/Theme.java,
# in gerrit-gwtui/src/main/java/net/codemirror/theme/Themes.java
CM_THEMES = [
'3024-day',
'3024-night',
'abcdef',
'ambiance',
'base16-dark',
'base16-light',
'bespin',
'blackboard',
'cobalt',
'colorforth',
'dracula',
'duotone-dark',
'duotone-light',
'eclipse',
'elegant',
'erlang-dark',
'hopscotch',
'icecoder',
'isotope',
'lesser-dark',
'liquibyte',
'material',
'mbo',
'mdn-like',
'midnight',
'monokai',
'neat',
'neo',
'night',
'paraiso-dark',
'paraiso-light',
'pastel-on-dark',
'railscasts',
'rubyblue',
'seti',
'solarized',
'the-matrix',
'tomorrow-night-bright',
'tomorrow-night-eighties',
'ttcn',
'twilight',
'vibrant-ink',
'xq-dark',
'xq-light',
'yeti',
'zenburn',
]
# Available modes must be enumerated here,
# in gerrit-gwtui/src/main/java/net/codemirror/mode/Modes.java,
# gerrit-gwtui/src/main/java/net/codemirror/mode/ModeInfo.java,
# and in CodeMirror's own mode/meta.js script.
CM_MODES = [
'apl',
'asciiarmor',
'asn.1',
'asterisk',
'brainfuck',
'clike',
'clojure',
'cmake',
'cobol',
'coffeescript',
'commonlisp',
'crystal',
'css',
'cypher',
'd',
'dart',
'diff',
'django',
'dockerfile',
'dtd',
'dylan',
'ebnf',
'ecl',
'eiffel',
'elm',
'erlang',
'factor',
'fcl',
'forth',
'fortran',
'gas',
'gfm',
'gherkin',
'go',
'groovy',
'haml',
'handlebars',
'haskell-literate',
'haskell',
'haxe',
'htmlembedded',
'htmlmixed',
'http',
'idl',
'javascript',
'jinja2',
'jsx',
'julia',
'livescript',
'lua',
'markdown',
'mathematica',
'mbox',
'mirc',
'mllike',
'modelica',
'mscgen',
'mumps',
'nginx',
'nsis',
'ntriples',
'octave',
'oz',
'pascal',
'pegjs',
'perl',
'php',
'pig',
'powershell',
'properties',
'protobuf',
'pug',
'puppet',
'python',
'q',
'r',
'rpm',
'rst',
'ruby',
'rust',
'sas',
'sass',
'scheme',
'shell',
'sieve',
'slim',
'smalltalk',
'smarty',
'solr',
'soy',
'sparql',
'spreadsheet',
'sql',
'stex',
'stylus',
'swift',
'tcl',
'textile',
'tiddlywiki',
'tiki',
'toml',
'tornado',
'troff',
'ttcn-cfg',
'ttcn',
'turtle',
'twig',
'vb',
'vbscript',
'velocity',
'verilog',
'vhdl',
'vue',
'webidl',
'xml',
'xquery',
'yacas',
'yaml-frontmatter',
'yaml',
'z80',
]
DIFF_MATCH_PATCH_VERSION = "20121119-1"

View File

@@ -1,93 +0,0 @@
include_defs('//lib/maven.defs')
maven_jar(
name = 'codec',
id = 'commons-codec:commons-codec:1.4',
sha1 = '4216af16d38465bbab0f3dff8efa14204f7a399a',
license = 'Apache2.0',
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
)
maven_jar(
name = 'collections',
id = 'commons-collections:commons-collections:3.2.2',
sha1 = '8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5',
license = 'Apache2.0',
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
attach_source = False,
)
maven_jar(
name = 'compress',
id = 'org.apache.commons:commons-compress:1.12',
sha1 = '84caa68576e345eb5e7ae61a0e5a9229eb100d7b',
license = 'Apache2.0',
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
)
maven_jar(
name = 'dbcp',
id = 'commons-dbcp:commons-dbcp:1.4',
sha1 = '30be73c965cc990b153a100aaaaafcf239f82d39',
license = 'Apache2.0',
deps = [':pool'],
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
'testpool.jocl'
],
)
maven_jar(
name = 'lang',
id = 'commons-lang:commons-lang:2.6',
sha1 = '0ce1edb914c94ebc388f086c6827e8bdeec71ac2',
license = 'Apache2.0',
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
)
maven_jar(
name = 'lang3',
id = 'org.apache.commons:commons-lang3:3.3.2',
sha1 = '90a3822c38ec8c996e84c16a3477ef632cbc87a3',
license = 'Apache2.0',
)
maven_jar(
name = 'net',
id = 'commons-net:commons-net:3.5',
sha1 = '342fc284019f590e1308056990fdb24a08f06318',
license = 'Apache2.0',
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
)
maven_jar(
name = 'pool',
id = 'commons-pool:commons-pool:1.5.5',
sha1 = '7d8ffbdc47aa0c5a8afe5dc2aaf512f369f1d19b',
license = 'Apache2.0',
attach_source = False,
exclude = ['META-INF/LICENSE.txt', 'META-INF/NOTICE.txt'],
)
maven_jar(
name = 'oro',
id = 'oro:oro:2.0.8',
sha1 = '5592374f834645c4ae250f4c9fbb314c9369d698',
license = 'Apache1.1',
attach_source = False,
exclude = ['META-INF/LICENSE'],
)
# When updating the version of commons-validator, also update the
# list of supported TLDs in:
# gerrit-server/src/test/resources/com/google/gerrit/server/mail/tlds-alpha-by-domain.txt
# from:
# http://data.iana.org/TLD/tlds-alpha-by-domain.txt
maven_jar(
name = 'validator',
id = 'commons-validator:commons-validator:1.5.1',
sha1 = '86d05a46e8f064b300657f751b5a98c62807e2a0',
license = 'Apache2.0',
)

View File

@@ -1,8 +0,0 @@
include_defs('//lib/maven.defs')
maven_jar(
name = 'dropwizard-core',
id = 'io.dropwizard.metrics:metrics-core:3.1.2',
sha1 = '224f03afd2521c6c94632f566beb1bb5ee32cf07',
license = 'Apache2.0',
)

View File

@@ -1,31 +0,0 @@
include_defs('//lib/maven.defs')
maven_jar(
name = 'easymock',
id = 'org.easymock:easymock:3.1', # When bumping the version
# number, make sure to also move powermock to a compatible version
sha1 = '3e127311a86fc2e8f550ef8ee4abe094bbcf7e7e',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':cglib-3_2',
':objenesis',
],
)
maven_jar(
name = 'cglib-3_2',
id = 'cglib:cglib-nodep:3.2.0',
sha1 = 'cf1ca207c15b04ace918270b6cb3f5601160cdfd',
license = 'DO_NOT_DISTRIBUTE',
attach_source = False,
)
maven_jar(
name = 'objenesis',
id = 'org.objenesis:objenesis:1.3',
sha1 = 'dc13ae4faca6df981fc7aeb5a522d9db446d5d50',
license = 'DO_NOT_DISTRIBUTE',
visibility = ['//lib/powermock:powermock-reflect'],
attach_source = False,
)

View File

@@ -1,104 +0,0 @@
include_defs('//lib/maven.defs')
# Java client library for Elasticsearch.
maven_jar(
name = 'elasticsearch',
id = 'org.elasticsearch:elasticsearch:2.4.0',
sha1 = 'aeb9704a76fa8654c348f38fcbb993a952a7ab07',
attach_source = True,
repository = MAVEN_CENTRAL,
license = 'Apache2.0',
deps = [
':jna',
':hppc',
':jsr166e',
':netty',
':t-digest',
':compress-lzf',
'//lib/joda:joda-time',
'//lib/lucene:lucene-codecs',
'//lib/lucene:lucene-highlighter',
'//lib/lucene:lucene-join',
'//lib/lucene:lucene-memory',
'//lib/lucene:lucene-sandbox',
'//lib/lucene:lucene-suggest',
'//lib/lucene:lucene-queries',
'//lib/lucene:lucene-spatial',
'//lib/jackson:jackson-core',
'//lib/jackson:jackson-dataformat-cbor',
'//lib/jackson:jackson-dataformat-smile',
]
)
# Java REST client for Elasticsearch.
VERSION = '2.0.3'
maven_jar(
name = 'jest-common',
id = 'io.searchbox:jest-common:' + VERSION,
sha1 = 'f304c66894aaf2f6c17a886bc826f09c7a161cf9',
license = 'Apache2.0',
)
maven_jar(
name = 'jest',
id = 'io.searchbox:jest:' + VERSION,
sha1 = 'b8f9ed1423489b361804e47f640515ea9f1fa08d',
license = 'Apache2.0',
deps = [
':elasticsearch',
':jest-common',
'//lib/commons:lang3',
'//lib/httpcomponents:httpasyncclient',
'//lib/httpcomponents:httpclient',
'//lib/httpcomponents:httpcore-nio',
'//lib/httpcomponents:httpcore-niossl',
],
)
maven_jar(
name = 'compress-lzf',
id = 'com.ning:compress-lzf:1.0.2',
sha1 = '62896e6fca184c79cc01a14d143f3ae2b4f4b4ae',
license = 'Apache2.0',
visibility = ['//lib/elasticsearch:elasticsearch'],
)
maven_jar(
name = 'hppc',
id = 'com.carrotsearch:hppc:0.7.1',
sha1 = '8b5057f74ea378c0150a1860874a3ebdcb713767',
license = 'Apache2.0',
visibility = ['//lib/elasticsearch:elasticsearch'],
)
maven_jar(
name = 'jsr166e',
id = 'com.twitter:jsr166e:1.1.0',
sha1 = '233098147123ee5ddcd39ffc57ff648be4b7e5b2',
license = 'Apache2.0',
visibility = ['//lib/elasticsearch:elasticsearch'],
)
maven_jar(
name = 'netty',
id = 'io.netty:netty:3.10.0.Final',
sha1 = 'ad61cd1bba067e6634ddd3e160edf0727391ac30',
license = 'Apache2.0',
visibility = ['//lib/elasticsearch:elasticsearch'],
)
maven_jar(
name = 't-digest',
id = 'com.tdunning:t-digest:3.0',
sha1 = '84ccf145ac2215e6bfa63baa3101c0af41017cfc',
license = 'Apache2.0',
visibility = ['//lib/elasticsearch:elasticsearch'],
)
maven_jar(
name = 'jna',
id = 'net.java.dev.jna:jna:4.1.0',
sha1 = '1c12d070e602efd8021891cdd7fd18bc129372d4',
license = 'Apache2.0',
)

View File

@@ -1,13 +0,0 @@
# Source Code Pro. Version 2.010 Roman / 1.030 Italics
# https://github.com/adobe-fonts/source-code-pro/releases/tag/2.010R-ro%2F1.030R-it
genrule(
name = 'sourcecodepro',
cmd = 'zip -rq $OUT .',
srcs = [
'SourceCodePro-Regular.woff',
'SourceCodePro-Regular.woff2'
],
out = 'sourcecodepro.zip',
license = 'OFL1.1',
visibility = ['PUBLIC'],
)

View File

@@ -1,13 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '1.5.2'
maven_jar(
name = 'greenmail',
id = 'com.icegreen:greenmail:' + VERSION,
sha1 = '6b4862a09f8642da58c109117b24ccc19a4a6d39',
license = 'Apache2.0',
exclude_java_sources = True,
visibility = ['PUBLIC'],
)

View File

@@ -1,79 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '4.1.0'
EXCLUDE = [
'META-INF/DEPENDENCIES',
'META-INF/LICENSE',
'META-INF/NOTICE',
]
java_library(
name = 'guice',
exported_deps = [
':guice_library',
':javax-inject',
':multibindings',
],
visibility = ['PUBLIC'],
)
maven_jar(
name = 'guice_library',
id = 'com.google.inject:guice:' + VERSION,
sha1 = 'eeb69005da379a10071aa4948c48d89250febb07',
license = 'Apache2.0',
deps = [':aopalliance'],
exclude_java_sources = True,
exclude = EXCLUDE + [
'META-INF/maven/com.google.guava/guava/pom.properties',
'META-INF/maven/com.google.guava/guava/pom.xml',
],
visibility = ['PUBLIC'],
)
maven_jar(
name = 'guice-assistedinject',
id = 'com.google.inject.extensions:guice-assistedinject:' + VERSION,
sha1 = 'af799dd7e23e6fe8c988da12314582072b07edcb',
license = 'Apache2.0',
deps = [':guice'],
exclude = EXCLUDE,
)
maven_jar(
name = 'guice-servlet',
id = 'com.google.inject.extensions:guice-servlet:' + VERSION,
sha1 = '90ac2db772d9b85e2b05417b74f7464bcc061dcb',
license = 'Apache2.0',
deps = [':guice'],
exclude = EXCLUDE,
)
maven_jar(
name = 'aopalliance',
id = 'aopalliance:aopalliance:1.0',
sha1 = '0235ba8b489512805ac13a8f9ea77a1ca5ebe3e8',
license = 'PublicDomain',
visibility = ['//lib/guice:guice'],
)
maven_jar(
name = 'javax-inject',
id = 'javax.inject:javax.inject:1',
sha1 = '6975da39a7040257bd51d21a231b76c915872d38',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)
maven_jar(
name = 'multibindings',
id = 'com.google.inject.extensions:guice-multibindings:' + VERSION,
sha1 = '3b27257997ac51b0f8d19676f1ea170427e86d51',
exclude_java_sources = True,
exclude = EXCLUDE + [
'META-INF/maven/com.google.guava/guava/pom.properties',
'META-INF/maven/com.google.guava/guava/pom.xml',
],
license = 'Apache2.0',
visibility = ['PUBLIC']
)

View File

@@ -1,73 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '2.8.0'
maven_jar(
name = 'user',
id = 'com.google.gwt:gwt-user:' + VERSION,
sha1 = '518579870499e15531f454f35dca0772d7fa31f7',
license = 'Apache2.0',
attach_source = False,
)
maven_jar(
name = 'dev',
id = 'com.google.gwt:gwt-dev:' + VERSION,
sha1 = 'f160a61272c5ebe805cd2d3d3256ed3ecf14893f',
license = 'Apache2.0',
attach_source = False,
)
maven_jar(
name = 'javax-validation',
id = 'javax.validation:validation-api:1.0.0.GA',
bin_sha1 = 'b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e',
src_sha1 = '7a561191db2203550fbfa40d534d4997624cd369',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)
maven_jar(
name = 'jsinterop-annotations',
id = 'com.google.jsinterop:jsinterop-annotations:1.0.0',
bin_sha1 = '23c3a3c060ffe4817e67673cc8294e154b0a4a95',
src_sha1 = '5d7c478efbfccc191430d7c118d7bd2635e43750',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)
maven_jar(
name = 'ant',
id = 'ant:ant:1.6.5',
bin_sha1 = '7d18faf23df1a5c3a43613952e0e8a182664564b',
src_sha1 = '9e0a847494563f35f9b02846a1c1eb4aa2ee5a9a',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)
maven_jar(
name = 'colt',
id = 'colt:colt:1.2.0',
attach_source = False,
bin_sha1 = '0abc984f3adc760684d49e0f11ddf167ba516d4f',
license = 'DO_NOT_DISTRIBUTE',
visibility = ['PUBLIC'],
)
maven_jar(
name = 'tapestry',
id = 'tapestry:tapestry:4.0.2',
attach_source = False,
bin_sha1 = 'e855a807425d522e958cbce8697f21e9d679b1f7',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)
maven_jar(
name = 'w3c-css-sac',
id = 'org.w3c.css:sac:1.3',
attach_source = False,
bin_sha1 = 'cdb2dcb4e22b83d6b32b93095f644c3462739e82',
license = 'DO_NOT_DISTRIBUTE',
visibility = ['PUBLIC'],
)

View File

@@ -1,5 +0,0 @@
export_file(
name = 'highlightjs',
src = 'highlight.min.js',
visibility = ['PUBLIC'],
)

View File

@@ -1,63 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '4.4.1'
maven_jar(
name = 'fluent-hc',
id = 'org.apache.httpcomponents:fluent-hc:' + VERSION,
bin_sha1 = '96fb842b68a44cc640c661186828b60590c71261',
src_sha1 = '702515612b2b94ce3374ed5b579d38cbd308eb4f',
license = 'Apache2.0',
deps = [':httpclient']
)
maven_jar(
name = 'httpclient',
id = 'org.apache.httpcomponents:httpclient:' + VERSION,
bin_sha1 = '016d0bc512222f1253ee6b64d389c84e22f697f0',
src_sha1 = '30cb4791019c7280227e027b01814f4964a02482',
license = 'Apache2.0',
deps = [
'//lib/commons:codec',
':httpcore',
'//lib/log:jcl-over-slf4j',
],
)
maven_jar(
name = 'httpcore',
id = 'org.apache.httpcomponents:httpcore:' + VERSION,
bin_sha1 = 'f5aa318bda4c6c8d688c9d00b90681dcd82ce636',
src_sha1 = '9700be0d0a331691654a8e901943c9a74e33c5fc',
license = 'Apache2.0',
)
maven_jar(
name = 'httpmime',
id = 'org.apache.httpcomponents:httpmime:' + VERSION,
bin_sha1 = '2f8757f5ac5e38f46c794e5229d1f3c522e9b1df',
src_sha1 = '5394d3715181a87009032335a55b0a9789f6e26f',
license = 'Apache2.0',
)
maven_jar(
name = 'httpasyncclient',
id = 'org.apache.httpcomponents:httpasyncclient:4.1.2',
sha1 = '95aa3e6fb520191a0970a73cf09f62948ee614be',
license = 'Apache2.0',
)
maven_jar(
name = 'httpcore-nio',
id = 'org.apache.httpcomponents:httpcore-nio:' + VERSION,
sha1 = 'a8c5e3c3bfea5ce23fb647c335897e415eb442e3',
license = 'Apache2.0',
)
maven_jar(
name = 'httpcore-niossl',
id = 'org.apache.httpcomponents:httpcore-niossl:4.0-alpha6',
sha1 = '9c662e7247ca8ceb1de5de629f685c9ef3e4ab58',
license = 'Apache2.0',
attach_source = False,
)

View File

@@ -1,26 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '2.6.6'
maven_jar(
name = 'jackson-core',
id = 'com.fasterxml.jackson.core:jackson-core:' + VERSION,
sha1 = '02eb801df67aacaf5b1deb4ac626e1964508e47b',
license = 'Apache2.0',
)
maven_jar(
name = 'jackson-dataformat-smile',
id = 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:' + VERSION,
sha1 = 'ccbfc948748ed2754a58c1af9e0a02b5cc1aed69',
license = 'Apache2.0',
)
maven_jar(
name = 'jackson-dataformat-cbor',
id = 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:' + VERSION,
sha1 = '34c7b7ff495fc6b049612bdc9db0900a68e112f8',
license = 'Apache2.0'
)

View File

@@ -1,95 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '9.3.11.v20160721'
EXCLUDE = ['about.html']
maven_jar(
name = 'servlet',
id = 'org.eclipse.jetty:jetty-servlet:' + VERSION,
sha1 = 'd550147b85c73ea81084a4ac7915ba7f609021c5',
license = 'Apache2.0',
deps = [':security'],
exclude = EXCLUDE,
)
maven_jar(
name = 'security',
id = 'org.eclipse.jetty:jetty-security:' + VERSION,
sha1 = '1cbefc5d1196b9e1ca6f4cc36738998a6ebde8bf',
license = 'Apache2.0',
deps = [':server'],
exclude = EXCLUDE,
visibility = [],
)
maven_jar(
name = 'servlets',
id = 'org.eclipse.jetty:jetty-servlets:' + VERSION,
sha1 = 'a9f7a43977151a463aa21a9b0e882aa3d25452ef',
license = 'Apache2.0',
exclude = EXCLUDE,
visibility = [
'//tools/eclipse:classpath',
'//gerrit-gwtdebug:gwtdebug',
],
)
maven_jar(
name = 'server',
id = 'org.eclipse.jetty:jetty-server:' + VERSION,
sha1 = 'd932e0dc1e9bd4839ae446754615163d60271a66',
license = 'Apache2.0',
exported_deps = [
':continuation',
':http',
],
exclude = EXCLUDE,
)
maven_jar(
name = 'jmx',
id = 'org.eclipse.jetty:jetty-jmx:' + VERSION,
sha1 = '21a658d2f5eb87c23eef4911966625ea95f66d32',
license = 'Apache2.0',
exported_deps = [
':continuation',
':http',
],
exclude = EXCLUDE,
)
maven_jar(
name = 'continuation',
id = 'org.eclipse.jetty:jetty-continuation:' + VERSION,
sha1 = '92a91c0dcc5f5d779a1c9f94038332be3f46c9df',
license = 'Apache2.0',
exclude = EXCLUDE,
)
maven_jar(
name = 'http',
id = 'org.eclipse.jetty:jetty-http:' + VERSION,
sha1 = 'dcfb95e5b886a981bb76467b911c5b706117f9cf',
license = 'Apache2.0',
exported_deps = [':io'],
exclude = EXCLUDE,
)
maven_jar(
name = 'io',
id = 'org.eclipse.jetty:jetty-io:' + VERSION,
sha1 = 'db5f4f481159894a4b670072a34917b5414d0c98',
license = 'Apache2.0',
exported_deps = [':util'],
exclude = EXCLUDE,
visibility = [],
)
maven_jar(
name = 'util',
id = 'org.eclipse.jetty:jetty-util:' + VERSION,
sha1 = '1812ffd5a04698051180d582c146ca807760c808',
license = 'Apache2.0',
exclude = EXCLUDE,
visibility = [],
)

View File

@@ -1,16 +0,0 @@
include_defs('//lib/maven.defs')
include_defs('//lib/JGIT_VERSION')
maven_jar(
name = 'jgit-archive',
id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + JGIT_VERS,
sha1 = 'a728cf277396f1227c5a8dffcf5dee0188fc0821',
license = 'jgit',
repository = REPO,
deps = ['//lib/jgit/org.eclipse.jgit:jgit'],
unsign = True,
exclude = [
'about.html',
'plugin.properties',
],
)

View File

@@ -1,16 +0,0 @@
include_defs('//lib/maven.defs')
include_defs('//lib/JGIT_VERSION')
maven_jar(
name = 'jgit-servlet',
id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + JGIT_VERS,
sha1 = 'd3aa54bd610db9a5c246aa8fef13989982c98628',
license = 'jgit',
repository = REPO,
deps = ['//lib/jgit/org.eclipse.jgit:jgit'],
unsign = True,
exclude = [
'about.html',
'plugin.properties',
],
)

View File

@@ -1,12 +0,0 @@
include_defs('//lib/maven.defs')
include_defs('//lib/JGIT_VERSION')
maven_jar(
name = 'junit',
id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + JGIT_VERS,
sha1 = '6c2b2f192c95d25a2e1576aee5d1169dd8bd2266',
license = 'DO_NOT_DISTRIBUTE',
repository = REPO,
unsign = True,
deps = ['//lib/jgit/org.eclipse.jgit:jgit'],
)

View File

@@ -1,25 +0,0 @@
include_defs('//lib/maven.defs')
include_defs('//lib/JGIT_VERSION')
maven_jar(
name = 'jgit',
id = 'org.eclipse.jgit:org.eclipse.jgit:' + JGIT_VERS,
bin_sha1 = 'a2b5970b853f8fee64589fc1103c0ceb7677ba63',
src_sha1 = '765f955774c36c226aa41fba7c20119451de2db7',
license = 'jgit',
repository = REPO,
unsign = True,
deps = [':javaewah'],
exclude = [
'META-INF/eclipse.inf',
'about.html',
'plugin.properties',
],
)
maven_jar(
name = 'javaewah',
id = 'com.googlecode.javaewah:JavaEWAH:1.1.6',
sha1 = '94ad16d728b374d65bd897625f3fbb3da223a2b6',
license = 'Apache2.0',
)

View File

@@ -1,25 +0,0 @@
include_defs('//lib/maven.defs')
EXCLUDE = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
]
maven_jar(
name = 'joda-time',
id = 'joda-time:joda-time:2.9.4',
sha1 = '1c295b462f16702ebe720bbb08f62e1ba80da41b',
deps = [':joda-convert'],
license = 'Apache2.0',
exclude = EXCLUDE,
visibility = ['PUBLIC'],
)
maven_jar(
name = 'joda-convert',
id = 'org.joda:joda-convert:1.8.1',
sha1 = '675642ac208e0b741bc9118dcbcae44c271b992a',
license = 'Apache2.0',
exclude = EXCLUDE,
visibility = ['//lib/joda:joda-time'],
)

View File

@@ -1,172 +0,0 @@
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
NPMJS = 'NPMJS'
GERRIT = 'GERRIT'
# NOTE: npm_binary rules do not get their licenses checked by gen_licenses.py,
# as we would have to cut too many edges. DO NOT include these binaries in
# build outputs. Using them in the build _process_ is ok.
def npm_binary(
name,
version,
sha1 = '',
repository = NPMJS,
visibility = ['PUBLIC']):
dir = '%s-%s' % (name, version)
filename = '%s.tgz' % dir
dest = '%s@%s.npm_binary.tgz' % (name, version)
if repository == GERRIT:
url = 'http://gerrit-maven.storage.googleapis.com/npm-packages/%s' % filename
elif repository == NPMJS:
url = 'http://registry.npmjs.org/%s/-/%s' % (name, filename)
else:
raise ValueError('invalid repository: %s' % repository)
cmd = ['$(exe //tools:download_file)', '-o', '$OUT', '-u', url]
if sha1:
cmd.extend(['-v', sha1])
genrule(
name = name,
cmd = ' '.join(cmd),
out = dest,
visibility = visibility,
)
def run_npm_binary(target):
return '$(location //tools/js:run_npm_binary) $(location %s)' % target
def bower_component(
name,
package,
version,
license,
deps = [],
semver = None,
sha1 = '',
visibility = ['PUBLIC']):
download_name = '%s__download_bower' % name
genrule(
name = download_name,
cmd = ' '.join([
'$(exe //tools/js:download_bower)',
'-b', '"%s"' % run_npm_binary('//lib/js:bower'),
'-n', name,
'-p', package,
'-v', version,
'-s', sha1,
'-o', '$OUT',
]),
out = '%s.zip' % download_name,
license = license,
visibility = [],
)
renamed_name = '%s__renamed' % name
genrule(
name = renamed_name,
cmd = ' && '.join([
'cd $TMP',
'mkdir bower_components',
'cd bower_components',
'unzip $(location :%s)' % download_name,
'cd ..',
'zip -r $OUT bower_components',
]),
out = '%s.zip' % renamed_name,
visibility = [],
)
genrule(
name = name,
cmd = _combine_components([':%s' % renamed_name] + deps),
out = '%s-%s.zip' % (name, version),
visibility = visibility,
)
version_name = '%s__bower_version' % name
dep_version = semver if semver is not None else version
deps_json = '{"%s": "%s#%s"}' % (name, package, dep_version)
genrule(
name = version_name,
cmd = "echo '%s' > $OUT" % deps_json,
out = version_name,
visibility = visibility,
)
def bower_components(
name,
deps,
visibility = ['PUBLIC']):
genrule(
name = name,
cmd = _combine_components(deps),
out = '%s.bower_components.zip' % name,
visibility = visibility,
)
def _combine_components(deps):
cmds = ['cd $TMP']
for d in deps:
cmds.append('unzip -qo $(location %s)' % d)
cmds.append("find bower_components -exec touch -t 198001010000 '{}' ';'")
cmds.append('zip -r $OUT bower_components/*')
return ' && '.join(cmds)
VULCANIZE_FLAGS = [
'--inline-scripts',
'--inline-css',
'--strip-comments',
]
def vulcanize(
name,
app,
srcs,
components,
extra_flags = [],
visibility = ['PUBLIC']):
genrule(
name = '%s__vulcanized' % name,
cmd = ' '.join([
'unzip', '-qd', '$TMP', '$(location %s)' % components,
'&&', 'rm', '-rf', '$SRCDIR/bower_components',
'&&', 'ln', '-s', '-f', '$TMP/bower_components', '.',
'&&', run_npm_binary('//lib/js:vulcanize')
] + VULCANIZE_FLAGS + extra_flags + [
'--out-html', '$OUT',
'$SRCDIR/%s' % app,
]),
srcs = srcs,
out = '%s.vulcanized.html' % name,
visibility = visibility,
)
genrule(
name = name,
cmd = ' '.join([
'cd', '$TMP',
'&&', run_npm_binary('//lib/js:crisper'), '--always-write-script',
'--source', '$(location :%s__vulcanized)' % name,
'--html', '%s.html' % name,
'--js', '%s.js' % name,
'&&', 'zip', '$OUT', '%s.html' % name, '%s.js' % name,
]),
out = '%s.vulcanized.zip' % name,
)

View File

@@ -1,427 +0,0 @@
include_defs('//lib/js.defs')
# WHEN REVIEWING NEW NPM_BINARY RULES:
#
# You must check licenses in the transitive closure of dependencies to ensure
# they can be used by Gerrit. (npm binaries are not distributed with Gerrit
# releases, so we are less restrictive in our selection of licenses, but we
# still need to do a sanity check.)
#
# To do this:
# npm install -g license-checker
# mkdir /tmp/npmtmp
# cd /tmp/npmtmp
# npm install <package>@<version>
# license-checker
# (Piping to grep -o 'licenses:.*' and/or sort -u may make the output saner.)
npm_binary(
name = 'bower',
version = '1.7.9',
sha1 = 'b7296c2393e0d75edaa6ca39648132dd255812b0',
)
npm_binary(
name = 'crisper',
version = '2.0.2',
sha1 = '7183c58cea33632fb036c91cefd1b43e390d22a2',
repository = GERRIT,
)
npm_binary(
name = 'vulcanize',
version = '1.14.8',
sha1 = '679107f251c19ab7539529b1e3fdd40829e6fc63',
repository = GERRIT,
)
# ## Adding Bower component dependencies
#
# 1. Add a dummy bower_component rule to this file, specifying the semantic
# version you want to use. The actual version will be filled in by Bower,
# after evaluating the full dependency tree.
#
# bower_component(
# name = 'somepackage',
# package = 'someauthor/somepackage',
# version = 'TODO',
# semver = '~1.0.0',
# license = 'DO_NOT_DISTRIBUTE'
# )
#
# 2. Add your bower_component as a dep to a bower_components rule.
#
# bower_components(
# name = 'polygerrit_components',
# deps = [
# '//lib/js:foo',
# '//lib/js:somepackage', # NEW
# ],
# )
#
# 3. Run bower2buck.py.
#
# buck run //tools/js:bower2buck -- -o /tmp/newbuck
#
# 4. Use your favorite diff tool to merge the output in newbuck with this file.
# bower2buck reevaluates semantic versions and may upgrade some packages, so
# you may need to make changes beyond the new component that was added.
#
# meld /tmp/newbuck lib/js/BUCK
#
#
# ## Updating Bower component dependencies
#
# Use the same procedure as for adding dependencies, except just change the
# version number of the existing bower_component rather than adding a new rule.
bower_component(
name = 'accessibility-developer-tools',
package = 'accessibility-developer-tools',
version = '2.10.0',
license = 'DO_NOT_DISTRIBUTE',
sha1 = 'bc1a5e56ff1bed7a7a6ef22a4b4e8300e4822aa5',
)
bower_component(
name = 'async',
package = 'async',
version = '1.5.2',
license = 'DO_NOT_DISTRIBUTE',
sha1 = '1ec975d3b3834646a7e3d4b7e68118b90ed72508',
)
bower_component(
name = 'chai',
package = 'chai',
version = '3.5.0',
license = 'DO_NOT_DISTRIBUTE',
sha1 = '849ad3ee7c77506548b7b5db603a4e150b9431aa',
)
bower_component(
name = 'es6-promise',
package = 'stefanpenner/es6-promise',
version = '3.3.0',
license = 'es6-promise',
sha1 = 'a3a797bb22132f1ef75f9a2556173f81870c2e53',
)
bower_component(
name = 'fetch',
package = 'fetch',
version = '1.0.0',
license = 'fetch',
sha1 = '1b05a2bb40c73232c2909dc196de7519fe4db7a9',
)
bower_component(
name = 'iron-a11y-announcer',
package = 'polymerelements/iron-a11y-announcer',
version = '1.0.4',
deps = [':polymer'],
license = 'polymer',
sha1 = '9a915711b35092fa2f86ff6e904c4f3e43aa5234',
)
bower_component(
name = 'iron-a11y-keys-behavior',
package = 'polymerelements/iron-a11y-keys-behavior',
version = '1.1.2',
deps = [':polymer'],
license = 'polymer',
sha1 = '57fd39ee153ce37ed719ba3f7a405afb987d54f9',
)
bower_component(
name = 'iron-autogrow-textarea',
package = 'polymerelements/iron-autogrow-textarea',
version = '1.0.12',
deps = [
':iron-behaviors',
':iron-flex-layout',
':iron-form-element-behavior',
':iron-validatable-behavior',
':polymer',
],
license = 'polymer',
sha1 = 'b9b6874c9a2b5be435557a827ff8bd6661672ee3',
)
bower_component(
name = 'iron-behaviors',
package = 'polymerelements/iron-behaviors',
version = '1.0.16',
deps = [
':iron-a11y-keys-behavior',
':polymer',
],
license = 'polymer',
sha1 = 'bd70636a2c0a78c50d1a76f9b8ca1ffd815478a3',
)
bower_component(
name = 'iron-dropdown',
package = 'polymerelements/iron-dropdown',
version = '1.4.0',
deps = [
':iron-a11y-keys-behavior',
':iron-behaviors',
':iron-overlay-behavior',
':iron-resizable-behavior',
':neon-animation',
':polymer',
],
license = 'polymer',
sha1 = '63e3d669a09edaa31c4f05afc76b53b919ef0595',
)
bower_component(
name = 'iron-fit-behavior',
package = 'polymerelements/iron-fit-behavior',
version = '1.2.2',
deps = [':polymer'],
license = 'polymer',
sha1 = 'bc53e9bab36b21f086ab8fac8c53cc7214aa1890',
)
bower_component(
name = 'iron-flex-layout',
package = 'polymerelements/iron-flex-layout',
version = '1.3.1',
deps = [':polymer'],
license = 'polymer',
sha1 = 'ba696394abff5e799fc06eb11bff4720129a1b52',
)
bower_component(
name = 'iron-form-element-behavior',
package = 'polymerelements/iron-form-element-behavior',
version = '1.0.6',
deps = [':polymer'],
license = 'polymer',
sha1 = '8d9e6530edc1b99bec1a5c34853911fba3701220',
)
bower_component(
name = 'iron-input',
package = 'polymerelements/iron-input',
version = '1.0.10',
deps = [
':iron-a11y-announcer',
':iron-validatable-behavior',
':polymer',
],
license = 'polymer',
sha1 = '9bc0c8e81de2527125383cbcf74dd9f27e7fa9ac',
)
bower_component(
name = 'iron-meta',
package = 'polymerelements/iron-meta',
version = '1.1.1',
deps = [':polymer'],
license = 'polymer',
sha1 = 'e06281b6ddb3355ceca44975a167381b1fd72ce5',
)
bower_component(
name = 'iron-overlay-behavior',
package = 'polymerelements/iron-overlay-behavior',
version = '1.7.6',
deps = [
':iron-a11y-keys-behavior',
':iron-fit-behavior',
':iron-resizable-behavior',
':polymer',
],
license = 'polymer',
sha1 = '83181085fda59446ce74fd0d5ca30c223f38ee4a',
)
bower_component(
name = 'iron-resizable-behavior',
package = 'polymerelements/iron-resizable-behavior',
version = '1.0.3',
deps = [':polymer'],
license = 'polymer',
sha1 = '5982a3e19af7ed3e3de276a9b7bd266b3a144002',
)
bower_component(
name = 'iron-selector',
package = 'polymerelements/iron-selector',
version = '1.5.2',
deps = [':polymer'],
license = 'polymer',
sha1 = 'c57235dfda7fbb987c20ad0e97aac70babf1a1bf',
)
bower_component(
name = 'iron-test-helpers',
package = 'polymerelements/iron-test-helpers',
version = '1.2.5',
deps = [':polymer'],
license = 'DO_NOT_DISTRIBUTE',
sha1 = '433b03b106f5ff32049b84150cd70938e18b67ac',
)
bower_component(
name = 'iron-validatable-behavior',
package = 'polymerelements/iron-validatable-behavior',
version = '1.1.1',
deps = [
':iron-meta',
':polymer',
],
license = 'polymer',
sha1 = '480423380be0536f948735d91bc472f6e7ced5b4',
)
bower_component(
name = 'lodash',
package = 'lodash',
version = '3.10.1',
license = 'DO_NOT_DISTRIBUTE',
sha1 = '2f207a8293c4c554bf6cf071241f7a00dc513d3a',
)
bower_component(
name = 'mocha',
package = 'mocha',
version = '2.5.1',
license = 'DO_NOT_DISTRIBUTE',
sha1 = 'cb29bdd1047cfd9304659ecf10ec263f9c888c99',
)
bower_component(
name = 'moment',
package = 'moment/moment',
version = '2.13.0',
license = 'moment',
sha1 = 'fc8ce2c799bab21f6ced7aff928244f4ca8880aa',
)
bower_component(
name = 'neon-animation',
package = 'polymerelements/neon-animation',
version = '1.2.3',
deps = [
':iron-meta',
':iron-resizable-behavior',
':iron-selector',
':polymer',
':web-animations-js',
],
license = 'polymer',
sha1 = '71cc0d3e0afdf8b8563e87d2ff03a6fa19183bd9',
)
bower_component(
name = 'page',
package = 'visionmedia/page.js',
version = '1.7.1',
license = 'page.js',
sha1 = '51a05428dd4f68fae1df5f12d0e2b61ba67f7757',
)
bower_component(
name = 'polymer',
package = 'polymer/polymer',
version = '1.7.0',
deps = [':webcomponentsjs'],
license = 'polymer',
sha1 = 'e70caa58fdee0ce51c805d548f544f74cc27d143',
)
bower_component(
name = 'promise-polyfill',
package = 'polymerlabs/promise-polyfill',
version = '1.0.0',
deps = [':polymer'],
license = 'promise-polyfill',
sha1 = 'a3b598c06cbd7f441402e666ff748326030905d6',
)
bower_component(
name = 'sinon-chai',
package = 'sinon-chai',
version = '2.8.0',
license = 'DO_NOT_DISTRIBUTE',
sha1 = '0464b5d944fdf8116bb23e0b02ecfbac945b3517',
)
bower_component(
name = 'sinonjs',
package = 'sinonjs',
version = '1.17.1',
license = 'DO_NOT_DISTRIBUTE',
sha1 = 'a26a6aab7358807de52ba738770f6ac709afd240',
)
bower_component(
name = 'stacky',
package = 'stacky',
version = '1.3.2',
license = 'DO_NOT_DISTRIBUTE',
sha1 = 'd6c07a0112ab2e9677fe085933744466a89232fb',
)
bower_component(
name = 'test-fixture',
package = 'polymerelements/test-fixture',
version = '1.1.1',
license = 'DO_NOT_DISTRIBUTE',
sha1 = 'e373bd21c069163c3a754e234d52c07c77b20d3c',
)
bower_component(
name = 'web-animations-js',
package = 'web-animations/web-animations-js',
version = '2.2.1',
license = 'Apache2.0',
sha1 = '0e73b263a86aa6764ad35c273eb12055f83d7eda',
)
bower_component(
name = 'web-component-tester',
package = 'web-component-tester',
version = '4.2.2',
deps = [
':accessibility-developer-tools',
':async',
':chai',
':lodash',
':mocha',
':sinon-chai',
':sinonjs',
':stacky',
':test-fixture',
],
license = 'DO_NOT_DISTRIBUTE',
sha1 = '54556000c33d9ed7949aa546c1b4a1531491a5f0',
)
bower_component(
name = 'webcomponentsjs',
package = 'webcomponentsjs',
version = '0.7.22',
license = 'polymer',
sha1 = '8ba97a4a279ec6973a19b171c462a7b5cf454fb9',
)
# Zip highlightjs so that it can be imported as though it were a
# bower_component and also attach the library license to the Buck dependency
# graph.
HLJS_DIR = 'bower_components/highlightjs'
genrule(
name = 'highlightjs',
cmd = ' && '.join([
'mkdir -p %s' % HLJS_DIR,
'cp $(location //lib/highlightjs:highlightjs) %s/highlight.min.js' % HLJS_DIR,
'zip -r $OUT bower_components',
]),
out = 'highlightjs.zip',
license = 'highlightjs',
visibility = ['PUBLIC'],
)

View File

@@ -1,56 +0,0 @@
include_defs('//lib/maven.defs')
VER = '1.7.7'
maven_jar(
name = 'api',
id = 'org.slf4j:slf4j-api:' + VER,
sha1 = '2b8019b6249bb05d81d3a3094e468753e2b21311',
license = 'slf4j',
)
maven_jar(
name = 'nop',
id = 'org.slf4j:slf4j-nop:' + VER,
sha1 = '6cca9a3b999ff28b7a35ca762b3197cd7e4c2ad1',
license = 'slf4j',
deps = [':api'],
)
maven_jar(
name = 'impl_log4j',
id = 'org.slf4j:slf4j-log4j12:' + VER,
sha1 = '58f588119ffd1702c77ccab6acb54bfb41bed8bd',
license = 'slf4j',
deps = [':log4j'],
)
maven_jar(
name = 'jcl-over-slf4j',
id = 'org.slf4j:jcl-over-slf4j:' + VER,
sha1 = '56003dcd0a31deea6391b9e2ef2f2dc90b205a92',
license = 'slf4j',
)
maven_jar(
name = 'log4j',
id = 'log4j:log4j:1.2.17',
sha1 = '5af35056b4d257e4b64b9e8069c0746e8b08629f',
license = 'Apache2.0',
exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
)
maven_jar(
name = 'jsonevent-layout',
id = 'net.logstash.log4j:jsonevent-layout:1.7',
sha1 = '507713504f0ddb75ba512f62763519c43cf46fde',
license = 'Apache2.0',
deps = [':json-smart', '//lib/commons:lang']
)
maven_jar(
name = 'json-smart',
id = 'net.minidev:json-smart:1.1.1',
sha1 = '24a2f903d25e004de30ac602c5b47f2d4e420a59',
license = 'Apache2.0',
)

View File

@@ -1,163 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '5.5.2'
# core and backward-codecs both provide
# META-INF/services/org.apache.lucene.codecs.Codec, so they must be merged.
merge_maven_jars(
name = 'lucene-core-and-backward-codecs',
srcs = [
':backward-codecs_jar',
':lucene-core',
],
visibility = ['PUBLIC'],
)
maven_jar(
name = 'lucene-codecs',
id = 'org.apache.lucene:lucene-codecs:' + VERSION,
sha1 = 'e01fe463d9490bb1b4a6a168e771f7b7255a50b1',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-core',
id = 'org.apache.lucene:lucene-core:' + VERSION,
sha1 = 'de5e5c3161ea01e89f2a09a14391f9b7ed66cdbb',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
visibility = ['//gerrit-elasticsearch:elasticsearch'],
)
maven_jar(
name = 'lucene-analyzers-common',
id = 'org.apache.lucene:lucene-analyzers-common:' + VERSION,
sha1 = 'f0bc3114a6b43f8e64a33c471d5b9e8ddc51564d',
license = 'Apache2.0',
deps = [':lucene-core-and-backward-codecs'],
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'backward-codecs_jar',
id = 'org.apache.lucene:lucene-backward-codecs:' + VERSION,
sha1 = 'c5cfcd7a8cf48a0144b61fb991c8e50a0bf868d5',
license = 'Apache2.0',
deps = [':lucene-core'],
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
visibility = [],
)
maven_jar(
name = 'lucene-highlighter',
id = 'org.apache.lucene:lucene-highlighter:' + VERSION,
sha1 = 'd127ac514e9df965ab0b57d92bbe0c68d3d145b8',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-join',
id = 'org.apache.lucene:lucene-join:'+ VERSION,
sha1 = 'dac1b322508f3f2696ecc49a97311d34d8382054',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-memory',
id = 'org.apache.lucene:lucene-memory:' + VERSION,
sha1 = '7409db9863d8fbc265c27793c6cc7511304182c2',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-misc',
id = 'org.apache.lucene:lucene-misc:' + VERSION,
sha1 = '37bbe5a2fb429499dfbe75d750d1778881fff45d',
license = 'Apache2.0',
deps = [':lucene-core-and-backward-codecs'],
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-sandbox',
id = 'org.apache.lucene:lucene-sandbox:' + VERSION,
sha1 = '30a91f120706ba66732d5a974b56c6971b3c8a16',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-spatial',
id = 'org.apache.lucene:lucene-spatial:' + VERSION,
sha1 = '8ed7a9a43d78222038573dd1c295a61f3c0bb0db',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-suggest',
id = 'org.apache.lucene:lucene-suggest:' + VERSION,
sha1 = 'e8316b37dddcf2092a54dab2ce6aad0d5ad78585',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-queries',
id = 'org.apache.lucene:lucene-queries:' + VERSION,
sha1 = '692f1ad887cf4e006a23f45019e6de30f3312d3f',
license = 'Apache2.0',
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)
maven_jar(
name = 'lucene-queryparser',
id = 'org.apache.lucene:lucene-queryparser:' + VERSION,
sha1 = '8ac921563e744463605284c6d9d2d95e1be5b87c',
license = 'Apache2.0',
deps = [':lucene-core-and-backward-codecs'],
exclude = [
'META-INF/LICENSE.txt',
'META-INF/NOTICE.txt',
],
)

View File

@@ -1,13 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '1.5.6'
maven_jar(
name = 'mail',
id = 'com.sun.mail:javax.mail:' + VERSION,
sha1 = 'ab5daef2f881c42c8e280cbe918ec4d7fdfd7efe',
license = 'DO_NOT_DISTRIBUTE',
exclude_java_sources = True,
visibility = ['PUBLIC'],
)

View File

@@ -1,188 +0,0 @@
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
GERRIT = 'GERRIT:'
GERRIT_API = 'GERRIT_API:'
MAVEN_CENTRAL = 'MAVEN_CENTRAL:'
MAVEN_LOCAL = 'MAVEN_LOCAL:'
MAVEN_SNAPSHOT = 'MAVEN_SNAPSHOT:'
def define_license(name):
n = 'LICENSE-' + name
genrule(
name = n,
cmd = 'ln -s $SRCS $OUT',
srcs = [n],
out = n,
visibility = ['PUBLIC'],
)
def maven_jar(
name,
id,
license,
exclude = [],
exclude_java_sources = False,
unsign = False,
deps = [],
exported_deps = [],
sha1 = '', bin_sha1 = '', src_sha1 = '',
repository = MAVEN_CENTRAL,
attach_source = True,
visibility = ['PUBLIC'],
local_license = False):
from os import path
def maven_snapshot(parts):
if len(parts) != 4:
raise NameError('%s:\nexpected id="groupId:artifactId:version:snapshot]"'
% id)
group, artifact, version, snapshot = parts
jar = path.join(name,
version + '-SNAPSHOT',
'-'.join([artifact.lower(), version, snapshot]))
url = '/'.join([
repository,
group.replace('.', '/'),
artifact,
version + '-SNAPSHOT',
'-'.join([artifact.lower(), version, snapshot])])
return jar, url
def maven_release(parts):
if len(parts) not in [3, 4]:
raise NameError('%s:\nexpected id="groupId:artifactId:version[:classifier]"'
% id)
if len(parts) == 4:
group, artifact, version, classifier = parts
file_version = version + '-' + classifier
else:
group, artifact, version = parts
file_version = version
jar = path.join(name, artifact.lower() + '-' + file_version)
url = '/'.join([
repository,
group.replace('.', '/'),
artifact,
version,
artifact + '-' + file_version])
return jar, url
parts = id.split(':')
if repository.startswith(MAVEN_SNAPSHOT):
jar, url = maven_snapshot(parts)
else:
jar, url = maven_release(parts)
binjar = jar + '.jar'
binurl = url + '.jar'
srcjar = jar + '-src.jar'
srcurl = url + '-sources.jar'
cmd = ['$(exe //tools:download_file)', '-o', '$OUT', '-u', binurl]
if sha1:
cmd.extend(['-v', sha1])
elif bin_sha1:
cmd.extend(['-v', bin_sha1])
for x in exclude:
cmd.extend(['-x', x])
if exclude_java_sources:
cmd.append('--exclude_java_sources')
if unsign:
cmd.append('--unsign')
genrule(
name = '%s__download_bin' % name,
cmd = ' '.join(cmd),
out = binjar,
)
license = ':LICENSE-' + license
if not local_license:
license = '//lib' + license
license = [license]
if src_sha1 or attach_source:
cmd = ['$(exe //tools:download_file)', '-o', '$OUT', '-u', srcurl]
if src_sha1:
cmd.extend(['-v', src_sha1])
genrule(
name = '%s__download_src' % name,
cmd = ' '.join(cmd),
out = srcjar,
)
prebuilt_jar(
name = '%s_src' % name,
binary_jar = ':%s__download_src' % name,
deps = license,
visibility = visibility,
)
else:
srcjar = None
genrule(
name = '%s_src' % name,
cmd = ':>$OUT',
out = '__%s__no_src' % name,
)
if exported_deps:
prebuilt_jar(
name = '%s__jar' % name,
deps = deps + license,
binary_jar = ':%s__download_bin' % name,
source_jar = ':%s__download_src' % name if srcjar else None,
)
java_library(
name = name,
exported_deps = exported_deps + [':' + name + '__jar'],
visibility = visibility,
)
else:
prebuilt_jar(
name = name,
deps = deps + license,
binary_jar = ':%s__download_bin' % name,
source_jar = ':%s__download_src' % name if srcjar else None,
visibility = visibility,
)
def merge_maven_jars(
name,
srcs,
visibility = []):
def cmd(jars):
return ('$(location //tools:merge_jars) $OUT '
+ ' '.join(['$(location %s)' % j for j in jars]))
genrule(
name = '%s__merged_bin' % name,
cmd = cmd(['%s__download_bin' % s for s in srcs]),
out = '%s__merged.jar' % name,
)
genrule(
name = '%s__merged_src' % name,
cmd = cmd(['%s__download_src' % s for s in srcs]),
# tools/eclipse/project.py requires -src.jar suffix.
out = '%s__merged-src.jar' % name,
)
prebuilt_jar(
name = name,
binary_jar = ':%s__merged_bin' % name,
source_jar = ':%s__merged_src' % name,
visibility = visibility,
)

View File

@@ -1,19 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '0.8.0'
maven_jar(
name = 'core',
id = 'org.apache.james:apache-mime4j-core:' + VERSION,
sha1 = 'd54f45fca44a2f210569656b4ca3574b42911c95',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)
maven_jar(
name = 'dom',
id = 'org.apache.james:apache-mime4j-dom:' + VERSION,
sha1 = '6720c93d14225c3e12c4a69768a0370c80e376a3',
license = 'Apache2.0',
visibility = ['PUBLIC'],
)

View File

@@ -1,26 +0,0 @@
include_defs('//lib/maven.defs')
EXCLUDE = [
'META-INF/DEPENDENCIES',
'META-INF/LICENSE',
'META-INF/NOTICE',
]
maven_jar(
name = 'sshd',
id = 'org.apache.sshd:sshd-core:1.2.0',
sha1 = '4bc24a8228ba83dac832680366cf219da71dae8e',
src_sha1 = '490e3f03d7628ecf1cbb8317563fdbf06e68e29f',
license = 'Apache2.0',
deps = [':core'],
exclude = EXCLUDE,
)
maven_jar(
name = 'core',
id = 'org.apache.mina:mina-core:2.0.10',
sha1 = 'a1cb1136b104219d6238de886bf5a3ea4554eb58',
src_sha1 = 'b70ff94ba379b4e825caca1af4ec83193fac4b10',
license = 'Apache2.0',
exclude = EXCLUDE,
)

View File

@@ -1,35 +0,0 @@
include_defs('//lib/maven.defs')
maven_jar(
name = 'consumer',
id = 'org.openid4java:openid4java:0.9.8',
sha1 = 'de4f1b33d3b0f0b2ab1d32834ec1190b39db4160',
license = 'Apache2.0',
deps = [
':nekohtml',
':xerces',
'//lib/httpcomponents:httpclient',
'//lib/log:jcl-over-slf4j',
'//lib/guice:guice',
],
visibility = ['PUBLIC'],
)
maven_jar(
name = 'nekohtml',
id = 'net.sourceforge.nekohtml:nekohtml:1.9.10',
sha1 = '14052461031a7054aa094f5573792feb6686d3de',
license = 'Apache2.0',
deps = [':xerces'],
attach_source = False,
visibility = [],
)
maven_jar(
name = 'xerces',
id = 'xerces:xercesImpl:2.8.1',
sha1 = '25101e37ec0c907db6f0612cbf106ee519c1aef1',
license = 'Apache2.0',
attach_source = False,
visibility = [],
)

View File

@@ -1,39 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '5.1'
maven_jar(
name = 'ow2-asm',
id = 'org.ow2.asm:asm:' + VERSION,
sha1 = '5ef31c4fe953b1fd00b8a88fa1d6820e8785bb45',
license = 'ow2',
)
maven_jar(
name = 'ow2-asm-analysis',
id = 'org.ow2.asm:asm-analysis:' + VERSION,
sha1 = '6d1bf8989fc7901f868bee3863c44f21aa63d110',
license = 'ow2',
)
maven_jar(
name = 'ow2-asm-commons',
id = 'org.ow2.asm:asm-commons:' + VERSION,
sha1 = '25d8a575034dd9cfcb375a39b5334f0ba9c8474e',
deps = [':ow2-asm-tree'],
license = 'ow2',
)
maven_jar(
name = 'ow2-asm-tree',
id = 'org.ow2.asm:asm-tree:' + VERSION,
sha1 = '87b38c12a0ea645791ead9d3e74ae5268d1d6c34',
license = 'ow2',
)
maven_jar(
name = 'ow2-asm-util',
id = 'org.ow2.asm:asm-util:' + VERSION,
sha1 = 'b60e33a6bd0d71831e0c249816d01e6c1dd90a47',
license = 'ow2',
)

View File

@@ -1,73 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '1.6.1' # When bumping VERSION, make sure to also move
# easymock to a compatible version
maven_jar(
name = 'powermock-module-junit4',
id = 'org.powermock:powermock-module-junit4:' + VERSION,
sha1 = 'ea8530b2848542624f110a393513af397b37b9cf',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-module-junit4-common',
'//lib:junit',
],
)
maven_jar(
name = 'powermock-module-junit4-common',
id = 'org.powermock:powermock-module-junit4-common:' + VERSION,
sha1 = '7222ced54dabc310895d02e45c5428ca05193cda',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-reflect',
'//lib:junit',
],
)
maven_jar(
name = 'powermock-reflect',
id = 'org.powermock:powermock-reflect:' + VERSION,
sha1 = '97d25eda8275c11161bcddda6ef8beabd534c878',
license = 'DO_NOT_DISTRIBUTE',
deps = [
'//lib:junit',
'//lib/easymock:objenesis',
],
)
maven_jar(
name = 'powermock-api-easymock',
id = 'org.powermock:powermock-api-easymock:' + VERSION,
sha1 = 'aa740ecf89a2f64d410b3d93ef8cd6833009ef00',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-api-support',
'//lib/easymock:easymock',
],
)
maven_jar(
name = 'powermock-api-support',
id = 'org.powermock:powermock-api-support:' + VERSION,
sha1 = '592ee6d929c324109d3469501222e0c76ccf0869',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-core',
':powermock-reflect',
'//lib:junit',
],
)
maven_jar(
name = 'powermock-core',
id = 'org.powermock:powermock-core:' + VERSION,
sha1 = '5afc1efce8d44ed76b30af939657bd598e45d962',
license = 'DO_NOT_DISTRIBUTE',
deps = [
':powermock-reflect',
'//lib:javassist',
'//lib:junit',
],
)

View File

@@ -1,64 +0,0 @@
include_defs('//lib/maven.defs')
VERSION = '1.4.2'
REPO = GERRIT
maven_jar(
name = 'runtime',
id = 'com.googlecode.prolog-cafe:prolog-runtime:' + VERSION,
sha1 = '4421b4806b6e3a318680f6ab1d57569e857169c6',
license = 'prologcafe',
repository = REPO,
)
maven_jar(
name = 'compiler',
id = 'com.googlecode.prolog-cafe:prolog-compiler:' + VERSION,
sha1 = '7e5a7ca5efe7db7f69e015cf492f8f04665244d8',
license = 'prologcafe',
repository = REPO,
deps = [
':io',
':runtime',
],
)
maven_jar(
name = 'io',
id = 'com.googlecode.prolog-cafe:prolog-io:' + VERSION,
sha1 = 'd177f6211d1013e0f31a507127f5c87a7f6941f3',
license = 'prologcafe',
repository = REPO,
deps = [':runtime'],
visibility = [],
)
maven_jar(
name = 'cafeteria',
id = 'com.googlecode.prolog-cafe:prolog-cafeteria:' + VERSION,
sha1 = '11f396cb2588b65e6a78070488aaa58d12bf000e',
license = 'prologcafe',
repository = REPO,
deps = [
':io',
':runtime',
],
visibility = ['//gerrit-pgm:'],
)
java_binary(
name = 'compiler_bin',
main_class = 'BuckPrologCompiler',
deps = [':compiler_lib'],
visibility = ['PUBLIC'],
)
java_library(
name = 'compiler_lib',
srcs = ['java/BuckPrologCompiler.java'],
deps = [
':compiler',
':runtime',
],
visibility = ['//tools/eclipse:classpath'],
)

View File

@@ -1,42 +0,0 @@
# Copyright (C) 2013 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
def prolog_cafe_library(
name,
srcs,
deps = [],
visibility = []):
genrule(
name = name + '__pl2j',
cmd = '$(exe //lib/prolog:compiler_bin)' +
' $TMP $OUT ' +
' '.join(srcs),
srcs = srcs,
out = name + '.src.zip',
)
java_library(
name = name + '__lib',
srcs = [':' + name + '__pl2j'],
deps = ['//lib/prolog:runtime'] + deps,
)
genrule(
name = name + '__ln',
cmd = 'ln -s $(location :%s__lib) $OUT' % name,
out = name + '.jar',
)
prebuilt_jar(
name = name,
binary_jar = ':%s__ln' % name,
visibility = visibility,
)