Skip to content

Commit c6812c0

Browse files
Googlerbrendandouglas
Googler
authored andcommitted
Import of bazel plugin using copybara
PiperOrigin-RevId: 167132715
1 parent e6b919a commit c6812c0

File tree

504 files changed

+21166
-4583
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

504 files changed

+21166
-4583
lines changed

BUILD

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ test_suite(
3030
],
3131
)
3232

33+
# UE-specific IJwB tests
34+
test_suite(
35+
name = "ijwb_ue_tests",
36+
tests = [
37+
"//golang:integration_tests",
38+
],
39+
)
40+
3341
# ASwB tests, run with an Android Studio plugin SDK
3442
test_suite(
3543
name = "aswb_tests",
@@ -38,6 +46,8 @@ test_suite(
3846
"//aswb:unit_tests",
3947
"//base:integration_tests",
4048
"//base:unit_tests",
49+
"//cpp:integration_tests",
50+
"//cpp:unit_tests",
4151
"//java:integration_tests",
4252
"//java:unit_tests",
4353
],

CHANGELOG

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
v2017.08.28
2+
===========
3+
* CLion test output: make URLs and bazel targets clickable
4+
* Retrieve Javadocs for unattached sources
5+
* CLion: incremental sync retains more caches. Prefill caches on project reload.
6+
7+
v2017.08.14
8+
===========
9+
* Fix spurious 'unused' warnings for AutoFactory-annotated classes
10+
* Python: Test UI support for paramaterized python tests
11+
* Python: Linkify stack traces in Bazel Console view
12+
* Test UI: fix timeouts not being marked as failures
13+
* Go: migrate Go code to the latest JetBrains plugin
14+
15+
v2017.08.01
16+
===========
17+
* Add a user setting to suppress the Bazel console during sync
18+
* Add support for IntelliJ 2017.1.5
19+
* ASwB: fix generated resources not resolving
20+
* Fix unresolved references when targets are built with multiple Bazel configurations
21+
* Python: fix 'argument list too long' errors when debugging
22+
23+
v2017.07.17
24+
===========
25+
* Explicitly deprioritize older android/gwt-specific versions of libraries during sync
26+
* Improve test finder heuristics when creating run configurations
27+
28+
v2017.07.05
29+
===========
30+
* CLwB: Show "unsynced" diagnostic file status for C++ files
31+
32+
v2017.06.19
33+
===========
34+
* Improve performance when indexing proto_library targets in the working set.
35+
* Fix incorrectly reusing existing, but different, run configurations.
36+
* Order BUILD file structure view by target name, not rule type.
37+
38+
v2017.06.05
39+
===========
40+
* Add Scala support to IntelliJ.
41+
* Add 'sync_flags' .blazeproject section, for flags only applied during sync.
42+
* Android Studio: NDK plugins are now optional.
43+
* CLion: Improve performance by prefetching required genfiles during sync.
44+
45+
v2017.05.22
46+
===========
47+
* TypeScript: Support multiple ts_config rules in .bazelproject
48+
* Android Studio: Index javac jar for javax.lang classes
49+
* Show failed test targets in test result UI
50+
151
v2017.05.08
252
===========
353
* Add Python support to CLion

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# An IntelliJ plugin for [Bazel](http://bazel.build) projects
22

3-
This is an early-access version of our Blaze plugins for IntelliJ,
3+
This is an early-access version of our Bazel plugins for IntelliJ,
44
Android Studio, and CLion.
55

66
This code drop is for educational purposes only and is currently
@@ -13,8 +13,7 @@ with live, working code and we will start accepting contributions.
1313
## Installation
1414

1515
You can find our plugin in the Jetbrains plugin repository by going to
16-
`Settings -> Browse Repositories`, and searching for `IntelliJ with Bazel`,
17-
`Android Studio with Bazel`, or `CLion with Bazel`.
16+
`Settings -> Browse Repositories`, and searching for `Bazel`.
1817

1918
## Usage
2019

WORKSPACE

Lines changed: 113 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,58 @@ workspace(name = "intellij_with_bazel")
22

33
# Long-lived download links available at: https://www.jetbrains.com/intellij-repository/releases
44

5-
# The plugin api for IntelliJ 2017.1.1. This is required to build IJwB,
5+
# The plugin api for IntelliJ 2017.2. This is required to build IJwB,
66
# and run integration tests.
77
new_http_archive(
8-
name = "intellij_ce_2017_1_1",
8+
name = "intellij_ce_2017_2_2",
99
build_file = "intellij_platform_sdk/BUILD.idea",
10-
url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2017.1.1/ideaIC-2017.1.1.zip",
10+
url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2017.2.2/ideaIC-2017.2.2.zip",
11+
sha256 = "4e14343ecaab00a3a02f2e51995a46cdbea90e20d336f806a1ec40892bbd7e53",
1112
)
1213

13-
# The plugin api for IntelliJ 2016.3.1. This is required to build IJwB,
14+
# The plugin api for IntelliJ 2017.1. This is required to build IJwB,
1415
# and run integration tests.
1516
new_http_archive(
16-
name = "intellij_ce_2016_3_1",
17+
name = "intellij_ce_2017_1_5",
1718
build_file = "intellij_platform_sdk/BUILD.idea",
18-
url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2016.3.1/ideaIC-2016.3.1.zip",
19+
url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2017.1.5/ideaIC-2017.1.5.zip",
20+
sha256 = "d11beb116f500ecbf75b0a1098dfaad696bc8a15edceae163f53bc511ab79445"
1921
)
2022

21-
# The plugin api for IntelliJ 2016.2.4. This is required to build IJwB,
22-
# and run integration tests.
23+
# The plugin api for IntelliJ UE 2017.2. This is required to run UE-specific
24+
# integration tests.
2325
new_http_archive(
24-
name = "IC_162_2032_8",
26+
name = "intellij_ue_2017_2_2",
2527
build_file = "intellij_platform_sdk/BUILD.idea",
26-
url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIC/2016.2.4/ideaIC-2016.2.4.zip",
28+
url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2017.2.2/ideaIU-2017.2.2.zip",
29+
sha256 = "b5a07d41b255799b2cdf2aa8b1c154aa35bf88deac4ae3718b2bae257b68d47d",
2730
)
2831

29-
# The plugin api for CLion 2016.2.2. This is required to build CLwB,
30-
# and run integration tests.
32+
# The plugin api for IntelliJ UE 2017.1. This is required to run UE-specific
33+
# integration tests.
3134
new_http_archive(
32-
name = "CL_162_1967_7",
33-
build_file = "intellij_platform_sdk/BUILD.clion",
34-
url = "https://download.jetbrains.com/cpp/CLion-2016.2.2.tar.gz",
35+
name = "intellij_ue_2017_1_5",
36+
build_file = "intellij_platform_sdk/BUILD.idea",
37+
url = "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/2017.1.5/ideaIU-2017.1.5.zip",
38+
sha256 = "6d887f79ca7853923060499cac7778b30fc82414f112deb8245d59179892bbad"
3539
)
3640

37-
# The plugin api for CLion 2016.3.2. This is required to build CLwB,
41+
# The plugin api for CLion 2017.1.1. This is required to build CLwB,
3842
# and run integration tests.
3943
new_http_archive(
40-
name = "clion_2016_3_2",
44+
name = "clion_2017_1_1",
4145
build_file = "intellij_platform_sdk/BUILD.clion",
42-
url = "https://download.jetbrains.com/cpp/CLion-2016.3.2.tar.gz",
46+
url = "https://download.jetbrains.com/cpp/CLion-2017.1.1.tar.gz",
47+
sha256 = "9abd6bd38801ae6cf29db2cd133c700e8da11841093de872312fe33ed51309ae",
4348
)
4449

45-
# The plugin api for CLion 2017.1.1. This is required to build CLwB,
50+
# The plugin api for CLion 2017.2.0. This is required to build CLwB,
4651
# and run integration tests.
4752
new_http_archive(
48-
name = "clion_2017_1_1",
53+
name = "clion_2017_2_1",
4954
build_file = "intellij_platform_sdk/BUILD.clion",
50-
url = "https://download.jetbrains.com/cpp/CLion-2017.1.1.tar.gz",
55+
url = "https://download.jetbrains.com/cpp/CLion-2017.2.1.tar.gz",
56+
sha256 = "acd3d09a37a3fa922a85a48635d1b230d559ea68917e2e7895caf16460d50c13",
5157
)
5258

5359
# The plugin api for Android Studio 2.3.1. This is required to build ASwB,
@@ -56,48 +62,106 @@ new_http_archive(
5662
name = "android_studio_2_3_1_0",
5763
build_file = "intellij_platform_sdk/BUILD.android_studio",
5864
url = "https://dl.google.com/dl/android/studio/ide-zips/2.3.1.0/android-studio-ide-162.3871768-linux.zip",
65+
sha256 = "36520f21678f80298b5df5fe5956db17a5984576f895fdcaa36ab0dbfb408433",
66+
)
67+
68+
# The plugin api for Android Studio 3.0 Beta 1. This is required to build ASwB,
69+
# and run integration tests.
70+
new_http_archive(
71+
name = "android_studio_3_0_0_9",
72+
build_file = "intellij_platform_sdk/BUILD.android_studio",
73+
url = "https://dl.google.com/dl/android/studio/ide-zips/3.0.0.9/android-studio-ide-171.4243858-linux.zip",
74+
sha256 = "422cc6c85ee62186bdb81facd970c0058575dc45ba39f6fd8b326b430269f28c",
5975
)
6076

61-
# Python plugin for IntelliJ CE 2016.3. Required at compile-time for python-specific features.
77+
# Python plugin for IntelliJ CE 2017.1. Required at compile-time for python-specific features.
6278
new_http_archive(
63-
name = "python_2016_3",
79+
name = "python_2017_1",
6480
build_file_content = "\n".join([
6581
"java_import(",
6682
" name = 'python',",
67-
" jars = ['python/lib/python.jar'],",
83+
" jars = ['python-ce/lib/python-ce.jar'],",
6884
" visibility = ['//visibility:public'],",
6985
")"]),
70-
url = "https://plugins.jetbrains.com/files/7322/32326/python-community-163.298.zip",
86+
url = "https://download.plugins.jetbrains.com/7322/35756/python-ce-2017.1.171.4694.26.zip",
87+
sha256 = "640d116ff01bcc2f87c75d20da642f17fcd86ed69929e4e0247ffc0df8aa780f",
7188
)
7289

73-
# Python plugin for IntelliJ CE 2017.1. Required at compile-time for python-specific features.
90+
# Python plugin for IntelliJ CE 2017.2. Required at compile-time for python-specific features.
7491
new_http_archive(
75-
name = "python_2017_1",
92+
name = "python_2017_2",
7693
build_file_content = "\n".join([
7794
"java_import(",
7895
" name = 'python',",
7996
" jars = ['python-ce/lib/python-ce.jar'],",
8097
" visibility = ['//visibility:public'],",
8198
")"]),
82-
url = "https://plugins.jetbrains.com/files/7322/33704/python-ce-2017.1.171.3780.116.zip",
99+
url = "https://download.plugins.jetbrains.com/7322/37356/python-ce-2017.2.172.3544.31.zip",
100+
sha256 = "c7ee48c0bafb29f4a18eaac804b113c4dcdfeaaae174d9003c9ad96e44df6fe0",
101+
)
102+
103+
# Go plugin for IntelliJ UE and CLion 2017.2.1. Required at compile-time for Bazel integration.
104+
new_http_archive(
105+
name = "go_2017_2",
106+
build_file_content = "\n".join([
107+
"java_import(",
108+
" name = 'go',",
109+
" jars = glob(['intellij-go/lib/*.jar']),",
110+
" visibility = ['//visibility:public'],",
111+
")"]),
112+
url = "https://download.plugins.jetbrains.com/9568/37740/intellij-go-172.3757.46.zip",
113+
sha256 = "3e5eb5415a05e6c30e79c263135c2937cc05e310e553889bd69eefa819705f9c",
114+
)
115+
116+
# Go plugin for IntelliJ UE and CLion 2017.1.5. Required at compile-time for Bazel integration.
117+
new_http_archive(
118+
name = "go_2017_1",
119+
build_file_content = "\n".join([
120+
"java_import(",
121+
" name = 'go',",
122+
" jars = glob(['intellij-go/lib/*.jar']),",
123+
" visibility = ['//visibility:public'],",
124+
")"]),
125+
url = "https://download.plugins.jetbrains.com/9568/36389/intellij-go-171.4694.61.zip",
126+
sha256 = "16bf70045360c1c2a056c9ae540626dffa3680b8283cb89febaff3a9499b7101",
127+
)
128+
129+
# Scala plugin for IntelliJ CE 2017.2 EAP. Required at compile-time for scala-specific features.
130+
new_http_archive(
131+
name = "scala_2017_2",
132+
build_file_content = "\n".join([
133+
"java_import(",
134+
" name = 'scala',",
135+
" jars = [",
136+
" 'Scala/lib/scala-plugin.jar',",
137+
" 'Scala/lib/compiler-settings.jar',",
138+
" 'Scala/lib/scala-library.jar',",
139+
" 'Scala/lib/scalameta120.jar',",
140+
" 'Scala/lib/scalatest-finders-patched.jar',",
141+
" ],",
142+
" visibility = ['//visibility:public'],",
143+
")"]),
144+
url = "https://download.plugins.jetbrains.com/1347/35283/scala-intellij-bin-2017.2.2.zip",
145+
sha256 = "1f0eef98da44dbc3f4f22b399a9175897aca448fd80405eca77fd61bd5fb7219",
83146
)
84147

85148
# Scala plugin for IntelliJ CE 2017.1. Required at compile-time for scala-specific features.
86149
new_http_archive(
87150
name = "scala_2017_1",
88151
build_file_content = "\n".join([
89-
"java_import(",
90-
" name = 'scala-library',",
91-
" jars = ['Scala/lib/scala-library.jar'],",
92-
")",
93-
"",
94152
"java_import(",
95153
" name = 'scala',",
96-
" jars = ['Scala/lib/scala-plugin.jar'],",
97-
" runtime_deps = [':scala-library'],",
154+
" jars = [",
155+
" 'Scala/lib/scala-plugin.jar',",
156+
" 'Scala/lib/compiler-settings.jar',",
157+
" 'Scala/lib/scala-library.jar',",
158+
" 'Scala/lib/scalameta120.jar',",
159+
" 'Scala/lib/scalatest-finders-patched.jar',",
160+
" ],",
98161
" visibility = ['//visibility:public'],",
99162
")"]),
100163
url = "https://plugins.jetbrains.com/files/1347/33637/scala-intellij-bin-2017.1.15.zip",
164+
sha256 = "b58670a3b52584effc6dd3d014e77fe80e2795b5e5e58716548ecc1452eca6cf",
101165
)
102166

103167
# LICENSE: Common Public License 1.0
@@ -141,3 +205,17 @@ maven_jar(
141205
artifact = "com.googlecode.jarjar:jarjar:1.3",
142206
sha1 = "b81c2719c63fa8e6f3eca5b11b8e9b5ad79463db",
143207
)
208+
209+
# LICENSE: The Apache Software License, Version 2.0
210+
maven_jar(
211+
name = "auto_value",
212+
artifact = "com.google.auto.value:auto-value:1.3",
213+
sha1 = "4961194f62915eb45e21940537d60ac53912c57d",
214+
)
215+
216+
# LICENSE: The Apache Software License, Version 2.0
217+
maven_jar(
218+
name = "error_prone_annotations",
219+
artifact = "com.google.errorprone:error_prone_annotations:2.0.15",
220+
sha1 = "822652ed7196d119b35d2e22eb9cd4ffda11e640",
221+
)

aspect/BUILD

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Description: Bazel aspect bundled with the Bazel IntelliJ plugin.
3+
#
4+
5+
licenses(["notice"]) # Apache 2.0
6+
7+
# the aspect files that will be bundled with the final plugin zip
8+
filegroup(
9+
name = "aspect_files",
10+
srcs = [
11+
"WORKSPACE",
12+
"intellij_info.bzl",
13+
"intellij_info_impl.bzl",
14+
":BUILD.bazel",
15+
"//aspect/tools:JarFilter_deploy.jar",
16+
"//aspect/tools:PackageParser_deploy.jar",
17+
],
18+
visibility = ["//visibility:public"],
19+
)
20+
21+
# BUILD file bundled with the aspect must not override the BUILD file
22+
# used for development. So we name it BUILD.aspect, and rename prior
23+
# to bundling with the plugin.
24+
genrule(
25+
name = "rename_files",
26+
srcs = ["BUILD.aspect"],
27+
outs = ["BUILD.bazel"],
28+
cmd = "cp $< $@",
29+
)

aspect/BUILD.aspect

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Description:
3+
# The final form of the BUILD file accessed at runtime as an external WORKSPACE.
4+
#
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
java_binary(
9+
name = "JarFilter_bin",
10+
main_class = "com.google.idea.blaze.aspect.JarFilter",
11+
runtime_deps = [":jar_filter_lib"],
12+
visibility = ["//visibility:public"],
13+
)
14+
15+
java_import(
16+
name = "jar_filter_lib",
17+
jars = ["JarFilter_deploy.jar"],
18+
)
19+
20+
java_binary(
21+
name = "PackageParser_bin",
22+
main_class = "com.google.idea.blaze.aspect.PackageParser",
23+
runtime_deps = [":package_parser_lib"],
24+
visibility = ["//visibility:public"],
25+
)
26+
27+
java_import(
28+
name = "package_parser_lib",
29+
jars = ["PackageParser_deploy.jar"],
30+
)

aspect/WORKSPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
workspace(name = "intellij_aspect")

0 commit comments

Comments
 (0)