Merge pull request #8941 from TeBoring/3.18.x-fix3

Addresses duplicates identified in #8925 (#8939)
pull/8943/head
Paul Yang 4 years ago committed by GitHub
commit a9d86f9811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      java/core/BUILD
  2. 21
      java/util/BUILD

@ -98,16 +98,22 @@ LITE_SRCS = [
] ]
# Should be used as `//java/lite`. # Should be used as `//java/lite`.
java_export( java_library(
name = "lite", name = "lite",
maven_coordinates = "com.google.protobuf:protobuf-javalite:%s" % PROTOBUF_VERSION,
pom_template = "//java/lite:pom_template.xml",
srcs = LITE_SRCS + [ srcs = LITE_SRCS + [
"//:gen_well_known_protos_javalite" "//:gen_well_known_protos_javalite"
], ],
visibility = [ visibility = [
"//java/lite:__pkg__", "//java/lite:__pkg__",
], ],
)
# Bazel users, don't depend on this target, use //java/lite.
java_export(
name = "lite_mvn",
maven_coordinates = "com.google.protobuf:protobuf-javalite:%s" % PROTOBUF_VERSION,
pom_template = "//java/lite:pom_template.xml",
runtime_deps = [":lite"],
resources = [ resources = [
"//:lite_well_known_protos", "//:lite_well_known_protos",
], ],
@ -118,10 +124,8 @@ java_library(
srcs = LITE_SRCS, srcs = LITE_SRCS,
) )
java_export( java_library(
name = "core", name = "core",
maven_coordinates = "com.google.protobuf:protobuf-java:%s" % PROTOBUF_VERSION,
pom_template = "pom_template.xml",
srcs = glob( srcs = glob(
[ [
"src/main/java/com/google/protobuf/*.java", "src/main/java/com/google/protobuf/*.java",
@ -137,6 +141,14 @@ java_export(
deps = [ deps = [
":lite_runtime_only", ":lite_runtime_only",
], ],
)
# Bazel users, don't depend on this target, use :core.
java_export(
name = "core_mvn",
maven_coordinates = "com.google.protobuf:protobuf-java:%s" % PROTOBUF_VERSION,
pom_template = "pom_template.xml",
runtime_deps = [":core"],
resources = [ resources = [
"//:well_known_protos", "//:well_known_protos",
], ],
@ -146,14 +158,14 @@ filegroup(
name = "release", name = "release",
visibility = ["//java:__pkg__"], visibility = ["//java:__pkg__"],
srcs = [ srcs = [
":core-pom", ":core_mvn-pom",
":core-maven-source", ":core_mvn-maven-source",
":core-docs", ":core_mvn-docs",
":core-project", ":core_mvn-project",
":lite-pom", ":lite_mvn-pom",
":lite-maven-source", ":lite_mvn-maven-source",
":lite-docs", ":lite_mvn-docs",
":lite-project", ":lite_mvn-project",
] ]
) )

@ -4,10 +4,8 @@ load("@rules_proto//proto:defs.bzl", "proto_library")
load("//:protobuf_version.bzl", "PROTOBUF_VERSION") load("//:protobuf_version.bzl", "PROTOBUF_VERSION")
load("//java/internal:testing.bzl", "junit_tests") load("//java/internal:testing.bzl", "junit_tests")
java_export( java_library(
name = "util", name = "util",
maven_coordinates = "com.google.protobuf:protobuf-java-util:%s" % PROTOBUF_VERSION,
pom_template = "pom_template.xml",
srcs = glob([ srcs = glob([
"src/main/java/com/google/protobuf/util/*.java", "src/main/java/com/google/protobuf/util/*.java",
]), ]),
@ -17,17 +15,26 @@ java_export(
"//external:gson", "//external:gson",
"//external:guava", "//external:guava",
"//java/core", "//java/core",
"//java/lite",
], ],
) )
# Bazel users, don't depend on this target, use :util.
java_export(
name = "util_mvn",
maven_coordinates = "com.google.protobuf:protobuf-java-util:%s" % PROTOBUF_VERSION,
pom_template = "pom_template.xml",
runtime_deps = [":util"],
visibility = ["//java:__pkg__"],
)
filegroup( filegroup(
name = "release", name = "release",
visibility = ["//java:__pkg__"], visibility = ["//java:__pkg__"],
srcs = [ srcs = [
":util-pom", ":util_mvn-pom",
":util-maven-source", ":util_mvn-maven-source",
":util-docs", ":util_mvn-docs",
":util-project", ":util_mvn-project",
] ]
) )

Loading…
Cancel
Save