-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
JvmConstants.java
218 lines (186 loc) · 6.96 KB
/
JvmConstants.java
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
/*
* Copyright 2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.internal.tasks;
/**
* Common constants used across the JVM ecosystem. Many of these constants define the configuration and task
* names added by the Java plugin. Eventually, we should deprecate many of the public constants in the Java plugin
* and push users to using the corresponding methods on {@link org.gradle.api.tasks.SourceSet}.
*/
public final class JvmConstants {
/**
* The name of the task that processes resources.
*/
public static final String PROCESS_RESOURCES_TASK_NAME = "processResources";
/**
* The name of the lifecycle task which outcome is that all the classes of a component are generated.
*/
public static final String CLASSES_TASK_NAME = "classes";
/**
* The name of the task which compiles Java sources.
*/
public static final String COMPILE_JAVA_TASK_NAME = "compileJava";
/**
* The name of the task which processes the test resources.
*/
public static final String PROCESS_TEST_RESOURCES_TASK_NAME = "processTestResources";
/**
* The name of the lifecycle task which outcome is that all test classes of a component are generated.
*/
public static final String TEST_CLASSES_TASK_NAME = "testClasses";
/**
* The name of the task which compiles the test Java sources.
*/
public static final String COMPILE_TEST_JAVA_TASK_NAME = "compileTestJava";
/**
* The name of the task which triggers execution of tests.
*/
public static final String TEST_TASK_NAME = "test";
/**
* The name of the task which generates the component main jar.
*/
public static final String JAR_TASK_NAME = "jar";
/**
* The name of the task which generates the component javadoc.
*/
public static final String JAVADOC_TASK_NAME = "javadoc";
/**
* The name of the API configuration, where dependencies exported by a component at compile time should
* be declared.
*
* @since 3.4
*/
public static final String API_CONFIGURATION_NAME = "api";
/**
* The name of the implementation configuration, where dependencies that are only used internally by
* a component should be declared.
*
* @since 3.4
*/
public static final String IMPLEMENTATION_CONFIGURATION_NAME = "implementation";
/**
* The name of the configuration to define the API elements of a component.
* That is, the dependencies which are required to compile against that component.
*
* @since 3.4
*/
public static final String API_ELEMENTS_CONFIGURATION_NAME = "apiElements";
/**
* The name of the configuration that is used to declare dependencies which are only required to compile a component,
* but not at runtime.
*/
public static final String COMPILE_ONLY_CONFIGURATION_NAME = "compileOnly";
/**
* The name of the configuration to define the API elements of a component that are required to compile a component,
* but not at runtime.
*
* @since 6.7
*/
public static final String COMPILE_ONLY_API_CONFIGURATION_NAME = "compileOnlyApi";
/**
* The name of the runtime only dependencies configuration, used to declare dependencies
* that should only be found at runtime.
*
* @since 3.4
*/
public static final String RUNTIME_ONLY_CONFIGURATION_NAME = "runtimeOnly";
/**
* The name of the runtime classpath configuration, used by a component to query its own runtime classpath.
*
* @since 3.4
*/
public static final String RUNTIME_CLASSPATH_CONFIGURATION_NAME = "runtimeClasspath";
/**
* The name of the runtime elements configuration, that should be used by consumers
* to query the runtime dependencies of a component.
*
* @since 3.4
*/
public static final String RUNTIME_ELEMENTS_CONFIGURATION_NAME = "runtimeElements";
/**
* The name of the javadoc elements configuration.
*
* @since 6.0
*/
public static final String JAVADOC_ELEMENTS_CONFIGURATION_NAME = "javadocElements";
/**
* The name of the sources elements configuration.
*
* @since 6.0
*/
public static final String SOURCES_ELEMENTS_CONFIGURATION_NAME = "sourcesElements";
/**
* The name of the compile classpath configuration.
*
* @since 3.4
*/
public static final String COMPILE_CLASSPATH_CONFIGURATION_NAME = "compileClasspath";
/**
* The name of the annotation processor configuration.
*
* @since 4.6
*/
public static final String ANNOTATION_PROCESSOR_CONFIGURATION_NAME = "annotationProcessor";
/**
* The name of the test implementation dependencies configuration.
*
* @since 3.4
*/
public static final String TEST_IMPLEMENTATION_CONFIGURATION_NAME = "testImplementation";
/**
* The name of the configuration that should be used to declare dependencies which are only required
* to compile the tests, but not when running them.
*/
public static final String TEST_COMPILE_ONLY_CONFIGURATION_NAME = "testCompileOnly";
/**
* The name of the test runtime only dependencies configuration.
*
* @since 3.4
*/
public static final String TEST_RUNTIME_ONLY_CONFIGURATION_NAME = "testRuntimeOnly";
/**
* The name of the test compile classpath configuration.
*
* @since 3.4
*/
public static final String TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME = "testCompileClasspath";
/**
* The name of the test annotation processor configuration.
*
* @since 4.6
*/
public static final String TEST_ANNOTATION_PROCESSOR_CONFIGURATION_NAME = "testAnnotationProcessor";
/**
* The name of the test runtime classpath configuration.
*
* @since 3.4
*/
public static final String TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME = "testRuntimeClasspath";
/**
* The name of the component added by the Java plugin.
*/
public static final String JAVA_MAIN_COMPONENT_NAME = "java";
/**
* The name of the main feature added to the java component by the Java plugin.
*/
public static final String JAVA_MAIN_FEATURE_NAME = "main";
/**
* Task group name for documentation-related tasks.
*/
public static final String DOCUMENTATION_GROUP = "documentation";
private JvmConstants() {
// Private to prevent instantiation.
}
}