Skip to content

Commit

Permalink
Export bazel protos directly through copybara.
Browse files Browse the repository at this point in the history
Removes dependency on bazel in github repo.

PiperOrigin-RevId: 350780741
  • Loading branch information
Googler authored and copybara-github committed Jan 8, 2021
1 parent 094e384 commit 63a5456
Show file tree
Hide file tree
Showing 35 changed files with 5,920 additions and 15 deletions.
7 changes: 0 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
workspace(name = "intellij_with_bazel")

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")

Expand Down Expand Up @@ -294,12 +293,6 @@ jvm_maven_import_external(
server_urls = ["https://repo1.maven.org/maven2"],
)

git_repository(
name = "bazel",
branch = "master",
remote = "https://github.com/bazelbuild/bazel",
)

http_archive(
name = "bazel_skylib",
sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
Expand Down
1 change: 1 addition & 0 deletions aspect/testing/rules/intellij_aspect_test_fixture.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import "proto/intellij_ide_info.proto";
package blaze;

option java_package = "com.google.devtools.intellij";
// option java_api_version = 2;

message IntellijAspectTestFixture {
repeated TargetIdeInfo targets = 1;
Expand Down
14 changes: 7 additions & 7 deletions proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ proto_library(
deps = [
":common_proto",
":intellij_ide_info_proto",
"@bazel//src/main/protobuf:build_proto",
"//third_party/bazel/src/main/protobuf:build_proto",
],
)

Expand All @@ -76,7 +76,7 @@ java_proto_library(
deps = [":intellij_plugin_target_deploy_info_proto"],
)

# Required for bazel.
# Used in GitHub only.
java_binary(
name = "jarjar_runner",
main_class = "org.pantsbuild.jarjar.Main",
Expand Down Expand Up @@ -108,10 +108,10 @@ java_binary(
":intellij_ide_info_java_proto",
":intellij_plugin_target_deploy_info_java_proto",
":project_data_java_proto",
"@bazel//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"@bazel//src/main/java/com/google/devtools/build/lib/starlarkdebug/proto:starlark_debugging_java_proto",
"@bazel//src/main/protobuf:android_deploy_info_java_proto",
"@bazel//src/main/protobuf:build_java_proto",
"@bazel//src/main/protobuf:deps_java_proto",
"//third_party/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//third_party/bazel/src/main/java/com/google/devtools/build/lib/starlarkdebug/proto:starlark_debugging_java_proto",
"//third_party/bazel/src/main/protobuf:android_deploy_info_java_proto",
"//third_party/bazel/src/main/protobuf:build_java_proto",
"//third_party/bazel/src/main/protobuf:deps_java_proto",
],
)
1 change: 1 addition & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ syntax = "proto3";

package blaze;

// option java_api_version = 2;

option java_package = "com.google.devtools.intellij.aspect";

Expand Down
1 change: 1 addition & 0 deletions proto/intellij_ide_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package blaze;

import "proto/common.proto";

// option java_api_version = 2;
option java_package = "com.google.devtools.intellij.ideinfo";

message JavaSourcePackage {
Expand Down
1 change: 1 addition & 0 deletions proto/intellij_plugin_target_deploy_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ syntax = "proto3";

package intellij;

// option java_api_version = 2;

option java_package = "com.google.devtools.intellij.plugin";

Expand Down
3 changes: 2 additions & 1 deletion proto/project_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ syntax = "proto3";

package blaze;

import "src/main/protobuf/build.proto";
import "third_party/bazel/src/main/protobuf/build.proto";
import "proto/common.proto";
import "proto/intellij_ide_info.proto";

// option java_api_version = 2;
option java_package = "com.google.devtools.intellij.model";

message TargetMap {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//third_party/bazel/src/main/java/com/google/devtools/build/lib:__pkg__"],
)

java_proto_library(
name = "build_event_stream_java_proto",
# The Bazel IntelliJ plugin uses this.
visibility = ["//visibility:public"],
deps = ["build_event_stream_proto"],
)

proto_library(
name = "build_event_stream_proto",
srcs = ["build_event_stream.proto"],
deps = [
"//third_party/bazel/src/main/protobuf:command_line_proto",
"//third_party/bazel/src/main/protobuf:failure_details_proto",
"//third_party/bazel/src/main/protobuf:invocation_policy_proto",
],
)
Loading

0 comments on commit 63a5456

Please sign in to comment.