forked from bazelbuild/intellij
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
98 lines (90 loc) · 2.56 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
licenses(["notice"]) # Apache 2.0
load(
"//build_defs:build_defs.bzl",
"intellij_plugin",
"intellij_plugin_library",
"optional_plugin_xml",
"stamped_plugin_xml",
)
load(
"//testing:test_defs.bzl",
"intellij_integration_test_suite",
"intellij_unit_test_suite",
)
java_library(
name = "kotlin",
srcs = glob(["src/**/*.java"]),
visibility = ["//java/com/google/devtools/intellij/blaze/plugin/aswb:__subpackages__"],
deps = [
"//base",
"//common/experiments",
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:kotlin",
"//intellij_platform_sdk:plugin_api",
"//java",
"//proto:proto_deps",
"//sdkcompat",
],
)
optional_plugin_xml(
name = "optional_xml",
module = "org.jetbrains.kotlin",
plugin_xml = "src/META-INF/kotlin-contents.xml",
)
intellij_plugin_library(
name = "plugin_library",
optional_plugin_xmls = [":optional_xml"],
plugin_xmls = ["src/META-INF/blaze-kotlin.xml"],
visibility = ["//visibility:public"],
deps = [":kotlin"],
)
stamped_plugin_xml(
name = "kotlin_plugin_xml",
plugin_id = "com.google.idea.blaze.kotlin",
plugin_name = "com.google.idea.blaze.kotlin",
)
intellij_plugin(
name = "kotlin_integration_test_plugin",
testonly = 1,
optional_plugin_xmls = [":optional_xml"],
plugin_xml = ":kotlin_plugin_xml",
deps = [
":plugin_library",
"//base:plugin_library",
"//java:plugin_library",
],
)
intellij_unit_test_suite(
name = "unit_tests",
srcs = glob(["tests/unittests/**/*.java"]),
test_package_root = "com.google.idea.blaze",
deps = [
":kotlin",
"//base",
"//base:unit_test_utils",
"//intellij_platform_sdk:kotlin_for_tests",
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//java",
"@junit//jar",
],
)
intellij_integration_test_suite(
name = "integration_tests",
srcs = glob(["tests/integrationtests/**/*.java"]),
required_plugins = "org.jetbrains.kotlin,com.google.idea.blaze.kotlin",
test_package_root = "com.google.idea.blaze.kotlin",
runtime_deps = [":kotlin_integration_test_plugin"],
deps = [
":kotlin",
"//base",
"//base:integration_test_utils",
"//base:unit_test_utils",
"//intellij_platform_sdk:kotlin_for_tests",
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//java",
"//sdkcompat",
"@junit//jar",
],
)