-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD
141 lines (126 loc) · 6.42 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package(default_visibility = ["//visibility:public"])
load(
"@intellij_with_bazel//build_defs:build_defs.bzl",
"intellij_plugin",
"intellij_plugin_library",
)
load("@rules_pkg//:pkg.bzl", "pkg_tar")
intellij_plugin(
name = "idea-settings",
plugin_xml = "plugin/src/main/resources/META-INF/plugin.xml",
deps = [":plugin_library"],
)
intellij_plugin_library(
name = "plugin_library",
deps = ["//plugin/src/main/kotlin/com/github/alexandrecarlton/idea/settings/plugin"],
)
pkg_tar(
name = "plugins",
srcs = [":idea-settings"],
files = {
"@CheckStyle-IDEA//:lib/checkstyle-idea.jar": "CheckStyle-IDEA/lib/checkstyle-idea.jar",
"@Save-Actions//jar:file": "save-actions.jar",
"@SonarLint//:lib/sonarlint-intellij.jar": "SonarLint/lib/sonarlint-intellij.jar",
"@SonarLint//:lib/sonarlint-core.jar": "SonarLint/lib/sonarlint-core.jar",
"@File-Watchers//:lib/fileWatcher.jar": "fileWatcher/lib/fileWatcher.jar",
"@File-Watchers//:lib/resources_en.jar": "fileWatcher/lib/resources_en.jar",
},
)
# For some reason referencing :plugins in sh_binary doesn't work;
# however, creating a filegroup and referencing that does.
# See https://github.com/bazelbuild/bazel/pull/6352
filegroup(
name = "plugins_tar",
srcs = [":plugins"],
)
sh_binary(
name = "apply-idea-settings",
srcs = ["apply-idea-settings.sh"],
data = [
":idea.sh",
":idea64.vmoptions",
":plugins_tar",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
alias(
name = "idea.sh",
actual = select({
"intellij-idea-community": "@idea-IC//:bin/idea.sh",
"intellij-idea-ultimate": "@idea-IU//:bin/idea.sh",
}),
)
alias(
name = "idea64.vmoptions",
actual = select({
"intellij-idea-community": "@idea-IC//:bin/linux/idea64.vmoptions",
"intellij-idea-ultimate": "@idea-IU//:bin/linux/idea64.vmoptions",
}),
)
config_setting(
name = "intellij-idea-community",
values = {"define": "product=intellij-idea-community"},
)
config_setting(
name = "intellij-idea-ultimate",
values = {"define": "product=intellij-idea-ultimate"},
)
test_suite(
name = "tests",
tests = [
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/build_execution_deployment",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/build_execution_deployment/build_tools/maven",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/build_execution_deployment/compiler",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/configurations/application",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/configurations/docker",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/configurations/npm",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/configurations/remote",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/configurations/spring_boot",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/java/arrangement",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/java/blank_lines",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/java/imports",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/java/javadoc",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/java/wrapping_and_braces",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/javascript",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/kotlin/blank_lines",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/kotlin/code_generation",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/kotlin/imports",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/kotlin/tabs_and_indents",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/codestyle/kotlin/wrapping_and_braces",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/general/auto_import",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/editor/spelling",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/languages_frameworks/javascript",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/languages_frameworks/javascript/code_quality_tools/eslint",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/languages_frameworks/nodejs_and_npm",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/languages_frameworks/sql_dialects",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/other_settings/checkstyle",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/other_settings/save_actions",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/project_settings/project",
"//applier/impl/src/test/kotlin/com/github/alexandrecarlton/idea/settings/dialog/tools/file_watchers",
],
)
test_suite(
name = "integration-tests",
tests = [
"//plugin/src/test/kotlin/com/github/alexandrecarlton/idea/settings/integration",
],
)
# TODO: Use @com_google_dagger//:dagger_with_compiler once it is discovered
# how to use this with kotlin.
java_library(
name = "dagger_with_compiler",
exported_plugins = [":dagger_with_compiler_plugin"],
exports = [
"@maven//:com_google_dagger_dagger",
"@maven//:com_google_dagger_dagger_compiler",
],
)
java_plugin(
name = "dagger_with_compiler_plugin",
generates_api = True,
processor_class = "dagger.internal.codegen.ComponentProcessor",
deps = [
"@maven//:com_google_dagger_dagger",
"@maven//:com_google_dagger_dagger_compiler",
],
)