Skip to content

Commit

Permalink
[bazel] Putting dependency versions to variables to reduce duplicatio…
Browse files Browse the repository at this point in the history
…n and simplify dependency upgrade
  • Loading branch information
barancev committed Oct 3, 2019
1 parent 01afd4a commit c141342
Show file tree
Hide file tree
Showing 49 changed files with 375 additions and 255 deletions.
8 changes: 5 additions & 3 deletions third_party/java/annotation/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "1.0"

maven_java_import(
name = "jsr250-api",
coords = "javax.annotation:jsr250-api:jar:1.0",
jar = "jsr250-api-1.0.jar",
srcjar = "jsr250-api-1.0-sources.jar",
coords = "javax.annotation:jsr250-api:jar:%s" % VERSION,
jar = "jsr250-api-%s.jar" % VERSION,
srcjar = "jsr250-api-%s-sources.jar" % VERSION,
)
14 changes: 8 additions & 6 deletions third_party/java/ant/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "1.9.9"

maven_java_import(
name = "ant",
coords = "org.apache.ant:ant:jar:1.9.9",
jar = "ant-1.9.9.jar",
srcjar = "ant-1.9.9-sources.jar",
coords = "org.apache.ant:ant:jar:%s" % VERSION,
jar = "ant-%s.jar" % VERSION,
srcjar = "ant-%s-sources.jar" % VERSION,
deps = [
":ant-launcher",
],
)

maven_java_import(
name = "ant-launcher",
coords = "org.apache.ant:ant-launcher:jar:1.9.9",
jar = "ant-launcher-1.9.9.jar",
srcjar = "ant-launcher-1.9.9-sources.jar",
coords = "org.apache.ant:ant-launcher:jar:%s" % VERSION,
jar = "ant-launcher-%s.jar" % VERSION,
srcjar = "ant-launcher-%s-sources.jar" % VERSION,
)
20 changes: 11 additions & 9 deletions third_party/java/asm/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "6.0"

maven_java_import(
name = "asm",
coords = "org.ow2.asm:asm:jar:6.0",
jar = "asm-6.0.jar",
srcjar = "asm-6.0-sources.jar",
coords = "org.ow2.asm:asm:jar:%s" % VERSION,
jar = "asm-%s.jar" % VERSION,
srcjar = "asm-%s-sources.jar" % VERSION,
)

maven_java_import(
name = "asm-commons",
coords = "org.ow2.asm:asm-commons:jar:6.0",
jar = "asm-commons-6.0.jar",
srcjar = "asm-commons-6.0-sources.jar",
coords = "org.ow2.asm:asm-commons:jar:%s" % VERSION,
jar = "asm-commons-%s.jar" % VERSION,
srcjar = "asm-commons-%s-sources.jar" % VERSION,
deps = [
":asm-tree",
],
)

maven_java_import(
name = "asm-tree",
coords = "org.ow2.asm:asm-tree:jar:6.0",
jar = "asm-tree-6.0.jar",
srcjar = "asm-tree-6.0-sources.jar",
coords = "org.ow2.asm:asm-tree:jar:%s" % VERSION,
jar = "asm-tree-%s.jar" % VERSION,
srcjar = "asm-tree-%s-sources.jar" % VERSION,
deps = [
":asm",
],
Expand Down
8 changes: 5 additions & 3 deletions third_party/java/assertj/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "3.13.2"

maven_java_import(
name = "assertj",
coords = "org.assertj:assertj-core:jar:3.13.2",
jar = "assertj-core-3.13.2.jar",
srcjar = "assertj-core-3.13.2-sources.jar",
coords = "org.assertj:assertj-core:jar:%s" % VERSION,
jar = "assertj-core-%s.jar" % VERSION,
srcjar = "assertj-core-%s-sources.jar" % VERSION,
)
8 changes: 5 additions & 3 deletions third_party/java/auto/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION= "0.8"

maven_java_import(
name = "auto-common",
coords = "com.google.auto:auto-common:jar:0.8",
jar = "auto-common-0.8.jar",
srcjar = "auto-common-0.8-sources.jar",
coords = "com.google.auto:auto-common:jar:%s" % VERSION,
jar = "auto-common-%s.jar" % VERSION,
srcjar = "auto-common-%s-sources.jar" % VERSION,
tags = [
"maven:compile_only",
],
Expand Down
8 changes: 5 additions & 3 deletions third_party/java/beust/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "1.72"

maven_java_import(
name = "jcommander",
coords = "com.beust:jcommander:jar:1.72",
jar = "jcommander-1.72.jar",
srcjar = "jcommander-1.72-sources.jar",
coords = "com.beust:jcommander:jar:%s" % VERSION,
jar = "jcommander-%s.jar" % VERSION,
srcjar = "jcommander-%s-sources.jar" % VERSION,
)
8 changes: 5 additions & 3 deletions third_party/java/brotli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "0.1.2"

maven_java_import(
name = "dec",
coords = "org.brotli:dec:0.1.2",
jar = "dec-0.1.2.jar",
srcjar = "dec-0.1.2-sources.jar",
coords = "org.brotli:dec:%s" % VERSION,
jar = "dec-%s.jar" % VERSION,
srcjar = "dec-%s-sources.jar" % VERSION,
)
14 changes: 8 additions & 6 deletions third_party/java/bytebuddy/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "1.10.1"

maven_java_import(
name = "byte-buddy",
coords = "net.bytebuddy:byte-buddy:jar:1.10.1",
jar = "byte-buddy-1.10.1.jar",
srcjar = "byte-buddy-1.10.1-sources.jar",
coords = "net.bytebuddy:byte-buddy:jar:%s" % VERSION,
jar = "byte-buddy-%s.jar" % VERSION,
srcjar = "byte-buddy-%s-sources.jar" % VERSION,
)

maven_java_import(
name = "byte-buddy-agent",
coords = "net.bytebuddy:byte-buddy-agent:jar:1.10.1",
jar = "byte-buddy-agent-1.10.1.jar",
srcjar = "byte-buddy-agent-1.10.1-sources.jar",
coords = "net.bytebuddy:byte-buddy-agent:jar:%s" % VERSION,
jar = "byte-buddy-agent-%s.jar" % VERSION,
srcjar = "byte-buddy-agent-%s-sources.jar" % VERSION,
)
8 changes: 5 additions & 3 deletions third_party/java/commons-codec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "1.12"

maven_java_import(
name = "commons-codec",
coords = "commons-codec:commons-codec:jar:1.12",
jar = "commons-codec-1.12.jar",
srcjar = "commons-codec-1.12-sources.jar",
coords = "commons-codec:commons-codec:jar:%s" % VERSION,
jar = "commons-codec-%s.jar" % VERSION,
srcjar = "commons-codec-%s-sources.jar" % VERSION,
)
8 changes: 5 additions & 3 deletions third_party/java/commons-io/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "2.6"

maven_java_import(
name = "commons-io",
coords = "commons-io:commons-io:jar:2.6",
jar = "commons-io-2.6.jar",
srcjar = "commons-io-2.6-sources.jar",
coords = "commons-io:commons-io:jar:%s" % VERSION,
jar = "commons-io-%s.jar" % VERSION,
srcjar = "commons-io-%s-sources.jar" % VERSION,
)
8 changes: 5 additions & 3 deletions third_party/java/commons-logging/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "1.2"

maven_java_import(
name = "commons-logging",
coords = "commons-logging:commons-logging:jar:1.2",
jar = "commons-logging-1.2.jar",
srcjar = "commons-logging-1.2-sources.jar",
coords = "commons-logging:commons-logging:jar:%s" % VERSION,
jar = "commons-logging-%s.jar" % VERSION,
srcjar = "commons-logging-%s-sources.jar" % VERSION,
)
8 changes: 5 additions & 3 deletions third_party/java/commons-net/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "3.6"

maven_java_import(
name = "commons-net",
coords = "commons-net:commons-net:jar:3.6",
jar = "commons-net-3.6.jar",
srcjar = "commons-net-3.6-sources.jar",
coords = "commons-net:commons-net:jar:%s" % VERSION,
jar = "commons-net-%s.jar" % VERSION,
srcjar = "commons-net-%s-sources.jar" % VERSION,
)
24 changes: 15 additions & 9 deletions third_party/java/commons/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,31 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

CE_VERSION = "1.3"

maven_java_import(
name = "commons-exec",
coords = "org.apache.commons:commons-exec:1.3",
jar = "commons-exec-1.3.jar",
srcjar = "commons-exec-1.3-sources.jar",
coords = "org.apache.commons:commons-exec:%s" % CE_VERSION,
jar = "commons-exec-%s.jar" % CE_VERSION,
srcjar = "commons-exec-%s-sources.jar" % CE_VERSION,
)

CL_VERSION = "3.8.1"

maven_java_import(
name = "commons-lang3",
coords = "org.apache.commons:commons-lang3:3.8.1",
jar = "commons-lang3-3.8.1.jar",
srcjar = "commons-lang3-3.8.1-sources.jar",
coords = "org.apache.commons:commons-lang3:%s" % CL_VERSION,
jar = "commons-lang3-%s.jar" % CL_VERSION,
srcjar = "commons-lang3-%s-sources.jar" % CL_VERSION,
)

CT_VERSION = "1.6"

maven_java_import(
name = "commons-text",
coords = "org.apache.commons:commons-text:1.6",
jar = "commons-text-1.6.jar",
srcjar = "commons-text-1.6-sources.jar",
coords = "org.apache.commons:commons-text:%s" % CT_VERSION,
jar = "commons-text-%s.jar" % CT_VERSION,
srcjar = "commons-text-%s-sources.jar" % CT_VERSION,
deps = [
":commons-lang3",
],
Expand Down
24 changes: 15 additions & 9 deletions third_party/java/contrib/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

CONCUR_VERSION = "0.4.0"

maven_java_import(
name = "opentracing-concurrent",
coords = "io.opentracing.contrib:opentracing-concurrent:jar:0.4.0",
jar = "opentracing-concurrent-0.4.0.jar",
srcjar = "opentracing-concurrent-0.4.0-sources.jar",
coords = "io.opentracing.contrib:opentracing-concurrent:jar:%s" % CONCUR_VERSION,
jar = "opentracing-concurrent-%s.jar" % CONCUR_VERSION,
srcjar = "opentracing-concurrent-%s-sources.jar" % CONCUR_VERSION,
deps = [
"//third_party/java/opentracing:opentracing-api",
"//third_party/java/opentracing:opentracing-noop",
],
)

OK_VERSION = "2.0.1"

maven_java_import(
name = "opentracing-okhttp3",
coords = "io.opentracing.contrib:opentracing-okhttp3:jar:2.0.1",
jar = "opentracing-okhttp3-2.0.1.jar",
srcjar = "opentracing-okhttp3-2.0.1-sources.jar",
coords = "io.opentracing.contrib:opentracing-okhttp3:jar:%s" % OK_VERSION,
jar = "opentracing-okhttp3-%s.jar" % OK_VERSION,
srcjar = "opentracing-okhttp3-%s-sources.jar" % OK_VERSION,
deps = [
":opentracing-concurrent",
"//third_party/java/okhttp3:okhttp",
Expand All @@ -28,11 +32,13 @@ maven_java_import(
],
)

TR_VERSION = "0.1.7"

maven_java_import(
name = "opentracing-tracerresolver",
coords = "io.opentracing.contrib:opentracing-tracerresolver:jar:0.1.7",
jar = "opentracing-tracerresolver-0.1.7.jar",
srcjar = "opentracing-tracerresolver-0.1.7-sources.jar",
coords = "io.opentracing.contrib:opentracing-tracerresolver:jar:%s" % TR_VERSION,
jar = "opentracing-tracerresolver-%s.jar" % TR_VERSION,
srcjar = "opentracing-tracerresolver-%s-sources.jar" % TR_VERSION,
deps = [
"//third_party/java/opentracing:opentracing-api",
"//third_party/java/opentracing:opentracing-util",
Expand Down
8 changes: 5 additions & 3 deletions third_party/java/enterprise/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "1.0"

maven_java_import(
name = "cdi-api",
coords = "javax.enterprise:cdi-api:jar:1.0",
jar = "cdi-api-1.0.jar",
srcjar = "cdi-api-1.0-sources.jar",
coords = "javax.enterprise:cdi-api:jar:%s" % VERSION,
jar = "cdi-api-%s.jar" % VERSION,
srcjar = "cdi-api-%s-sources.jar" % VERSION,
deps = [
"//third_party/java/annotation:jsr250-api",
"//third_party/java/inject:javax.inject",
Expand Down
8 changes: 5 additions & 3 deletions third_party/java/github/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "2.1.5"

maven_java_import(
name = "org.eclipse.egit.github.core",
coords = "org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:2.1.5",
jar = "org.eclipse.egit.github.core-2.1.5.jar",
srcjar = "org.eclipse.egit.github.core-2.1.5-sources.jar",
coords = "org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:%s" % VERSION,
jar = "org.eclipse.egit.github.core-%s.jar" % VERSION,
srcjar = "org.eclipse.egit.github.core-%s-sources.jar" % VERSION,
deps = [
"//third_party/java/gson",
],
Expand Down
8 changes: 5 additions & 3 deletions third_party/java/gson/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ licenses(["notice"])

package(default_visibility = ["//visibility:public"])

VERSION = "2.8.5"

maven_java_import(
name = "gson",
coords = "com.google.code.gson:gson:jar:2.8.5",
jar = "gson-2.8.5.jar",
srcjar = "gson-2.8.5-sources.jar",
coords = "com.google.code.gson:gson:jar:%s" % VERSION,
jar = "gson-%s.jar" % VERSION,
srcjar = "gson-%s-sources.jar" % VERSION,
)
Loading

0 comments on commit c141342

Please sign in to comment.