-
Notifications
You must be signed in to change notification settings - Fork 212
/
Gradle.gradle
383 lines (362 loc) · 13.1 KB
/
Gradle.gradle
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
// 8.3 https://gradle.org/
//! api
// https://docs.gradle.org/current/dsl/index.html
// Core types
// https://docs.gradle.org/current/dsl/org.gradle.api.Project.html
class Project {
// Properties
Set<Project> allprojects
AntBuilder ant
ArtifactHandler artifacts
File buildFile
ScriptHandler buildscript
Map<String, Project> childProjects
ConfigurationContainer configurations
List<String> defaultTasks
DependencyHandler dependencies
DependencyLockingHandler dependencyLocking
String description
ExtensionContainer extensions
Gradle gradle
Object group
ProjectLayout layout
Logger logger
LoggingManager logging
String name
InputNormalizationHandler normalization
Project parent
String path
PluginManager pluginManager
PluginContainer plugins
Project project
File projectDir
Map<String, ?> properties
RepositoryHandler repositories
ResourceHandler resources
File rootDir
Project rootProject
ProjectState state
Object status
Set<Project> subprojects
TaskContainer tasks
Object version
// Methods
String absoluteProjectPath(String path)
void afterEvaluate(Closure closure)
void afterEvaluate(Action<? super Project> action)
void allprojects(Action<? super Project> action)
AntBuilder ant(Action<? super AntBuilder> configureAction)
void apply(Closure closure)
void apply(Map<String, ?> options)
void apply(Action<? super ObjectConfigurationAction> action)
void artifacts(Action<? super ArtifactHandler> configureAction)
void beforeEvaluate(Closure closure)
void beforeEvaluate(Action<? super Project> action)
Iterable<?> configure(Iterable<?> objects, Closure configureClosure)
Iterable<T> configure(Iterable<T> objects, Action<? super T> configureAction)
Object configure(Object object, Closure configureClosure)
NamedDomainObjectContainer<T> container(Class<T> type)
NamedDomainObjectContainer<T> container(Class<T> type, Closure factoryClosure)
NamedDomainObjectContainer<T> container(Class<T> type, NamedDomainObjectFactory<T> factory)
WorkResult copy(Closure closure)
WorkResult copy(Action<? super CopySpec> action)
CopySpec copySpec()
CopySpec copySpec(Closure closure)
CopySpec copySpec(Action<? super CopySpec> action)
void defaultTasks(String... defaultTasks)
boolean delete(Object... paths)
WorkResult delete(Action<? super DeleteSpec> action)
void dependencyLocking(Action<? super DependencyLockingHandler> configuration)
Project evaluationDependsOn(String path)
ExecResult exec(Closure closure)
ExecResult exec(Action<? super ExecSpec> action)
File file(Object path)
File file(Object path, PathValidation validation)
ConfigurableFileTree fileTree(Object baseDir)
ConfigurableFileTree fileTree(Object baseDir, Closure configureClosure)
ConfigurableFileTree fileTree(Object baseDir, Action<? super ConfigurableFileTree> configureAction)
ConfigurableFileTree fileTree(Map<String, ?> args)
ConfigurableFileCollection files(Object paths, Closure configureClosure)
ConfigurableFileCollection files(Object paths, Action<? super ConfigurableFileCollection> configureAction)
ConfigurableFileCollection files(Object... paths)
Project findProject(String path)
Object findProperty(String propertyName)
Map<Project, Set<Task>> getAllTasks(boolean recursive)
Set<Task> getTasksByName(String name, boolean recursive)
boolean hasProperty(String propertyName)
ExecResult javaexec(Closure closure)
ExecResult javaexec(Action<? super JavaExecSpec> action)
File mkdir(Object path)
void normalization(Action<? super InputNormalizationHandler> configuration)
Project project(String path)
Project project(String path, Closure configureClosure)
Project project(String path, Action<? super Project> configureAction)
Object property(String propertyName)
String relativePath(Object path)
String relativeProjectPath(String path)
void setProperty(String name, Object value)
void subprojects(Action<? super Project> action)
WorkResult sync(Action<? super CopySpec> action)
FileTree tarTree(Object tarPath)
Task task(String name)
Task task(String name, Closure configureClosure)
Task task(String name, Action<? super Task> configureAction)
Task task(Map<String, ?> args, String name)
Task task(Map<String, ?> args, String name, Closure configureClosure)
URI uri(Object path)
FileTree zipTree(Object zipPath)
// Methods added by the java plugin
Manifest manifest()
Manifest manifest(Closure closure)
Manifest manifest(Action<? super Manifest> action)
// Script blocks
allprojects { }
ant { }
artifacts { }
buildscript { }
configurations { }
dependencies { }
repositories { }
subprojects { }
application { }
distributions { }
reporting { }
sourceSets { }
publishing { }
signing { }
}
// https://docs.gradle.org/current/dsl/org.gradle.api.Task.html
class Task {
// Properties
List<Action<? super Task>> actions
AntBuilder ant
Set<Object> dependsOn
String description
TaskDestroyables destroyables
boolean didWork
boolean enabled
ExtensionContainer extensions
TaskDependency finalizedBy
String group
TaskInputs inputs
TaskLocalState localState
Logger logger
LoggingManager logging
TaskDependency mustRunAfter
String name
TaskOutputs outputs
String path
Project project
TaskDependency shouldRunAfter
TaskState state
TaskDependency taskDependencies
File temporaryDir
Property<Duration> timeout
// Methods
Task dependsOn(Object... paths)
Task doFirst(Closure action)
Task doFirst(String actionName, Action<? super Task> action)
Task doFirst(Action<? super Task> action)
Task doLast(Closure action)
Task doLast(String actionName, Action<? super Task> action)
Task doLast(Action<? super Task> action)
void doNotTrackState(String reasonNotToTrackState)
Task finalizedBy(Object... paths)
boolean hasProperty(String propertyName)
Task mustRunAfter(Object... paths)
void onlyIf(Closure onlyIfClosure)
void onlyIf(Spec<? super Task> onlyIfSpec)
Object property(String propertyName)
void setProperty(String name, Object value)
TaskDependency shouldRunAfter(Object... paths)
void usesService(Provider<? extends BuildService<?>> service)
}
// https://docs.gradle.org/current/dsl/org.gradle.api.invocation.Gradle.html
class Gradle {
// Properties
ExtensionContainer extensions
Gradle gradle
File gradleHomeDir
File gradleUserHomeDir
String gradleVersion
Collection<IncludedBuild> includedBuilds
Gradle parent
PluginManager pluginManager
PluginContainer plugins
Project rootProject
StartParameter startParameter
TaskExecutionGraph taskGraph
// Methods
void addBuildListener(BuildListener buildListener)
void addListener(Object listener)
ProjectEvaluationListener addProjectEvaluationListener(ProjectEvaluationListener listener)
void afterProject(Closure closure)
void afterProject(Action<? super Project> action)
void allprojects(Action<? super Project> action)
void apply(Closure closure)
void apply(Map<String, ?> options)
void apply(Action<? super ObjectConfigurationAction> action)
void beforeProject(Closure closure)
void beforeProject(Action<? super Project> action)
void buildFinished(Closure closure)
void buildFinished(Action<? super BuildResult> action)
IncludedBuild includedBuild(String name)
void projectsEvaluated(Action<? super Gradle> action)
void projectsLoaded(Closure closure)
void projectsLoaded(Action<? super Gradle> action)
void removeListener(Object listener)
void removeProjectEvaluationListener(ProjectEvaluationListener listener)
void rootProject(Action<? super Project> action)
void settingsEvaluated(Closure closure)
void settingsEvaluated(Action<? super Settings> action)
void useLogger(Object logger)
}
// https://docs.gradle.org/current/dsl/org.gradle.api.initialization.Settings.html
class Settings {
// Properties
BuildCacheConfiguration buildCache
ExtensionContainer extensions
Gradle gradle
PluginManager pluginManager
PluginContainer plugins
File rootDir
ProjectDescriptor rootProject
Settings settings
File settingsDir
StartParameter startParameter
// Methods
void apply(Closure closure)
void apply(Map<String, ?> options)
void apply(Action<? super ObjectConfigurationAction> action)
void buildCache(Action<? super BuildCacheConfiguration> action)
ProjectDescriptor findProject(File projectDir)
ProjectDescriptor findProject(String path)
void include(String... projectPaths)
void includeBuild(Object rootProject)
void includeBuild(Object rootProject, Action<ConfigurableIncludedBuild> configuration)
void includeFlat(String... projectNames)
ProjectDescriptor project(File projectDir)
ProjectDescriptor project(String path)
}
// https://docs.gradle.org/current/dsl/org.gradle.api.Script.html
class Script {
// Properties
ScriptHandler buildscript
Logger logger
LoggingManager logging
ResourceHandler resources
// Methods
void apply(Closure closure)
void apply(Map<String, ?> options)
WorkResult copy(Closure closure)
CopySpec copySpec(Closure closure)
boolean delete(Object... paths)
ExecResult exec(Closure closure)
ExecResult exec(Action<? super ExecSpec> action)
File file(Object path)
File file(Object path, PathValidation validation)
ConfigurableFileTree fileTree(Object baseDir)
ConfigurableFileTree fileTree(Object baseDir, Closure configureClosure)
ConfigurableFileTree fileTree(Map<String, ?> args)
ConfigurableFileCollection files(Object paths, Closure configureClosure)
ConfigurableFileCollection files(Object... paths)
ExecResult javaexec(Closure closure)
ExecResult javaexec(Action<? super JavaExecSpec> action)
File mkdir(Object path)
String relativePath(Object path)
FileTree tarTree(Object tarPath)
URI uri(Object path)
FileTree zipTree(Object zipPath)
// Script blocks
buildscript { }
}
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.SourceSet.html
class SourceSet {
// Properties
SourceDirectorySet allJava
SourceDirectorySet allSource
FileCollection compileClasspath
ExtensionContainer extensions
SourceDirectorySet java
String name
SourceSetOutput output
SourceDirectorySet resources
FileCollection runtimeClasspath
// Methods
SourceSet compiledBy(Object... taskPaths)
String getCompileTaskName(String language)
String getTaskName(String verb, String target)
SourceSet java(Action<? super SourceDirectorySet> configureAction)
SourceSet resources(Action<? super SourceDirectorySet> configureAction)
// Script blocks
java {}
resources {}
}
// Task types
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Copy.html
class Copy {
// Properties
boolean caseSensitive
File destinationDir
Property<ConfigurableFilePermissions> dirPermissions
DuplicatesStrategy duplicatesStrategy
Set<String> excludes
Property<ConfigurableFilePermissions> filePermissions
boolean includeEmptyDirs
Set<String> includes
FileCollection source
// Methods
AbstractCopyTask eachFile(Closure closure)
AbstractCopyTask eachFile(Action<? super FileCopyDetails> action)
AbstractCopyTask exclude(Closure excludeSpec)
AbstractCopyTask exclude(Iterable<String> excludes)
AbstractCopyTask exclude(String... excludes)
AbstractCopyTask exclude(Spec<FileTreeElement> excludeSpec)
AbstractCopyTask expand(Map<String, ?> properties)
AbstractCopyTask filesMatching(Iterable<String> patterns, Action<? super FileCopyDetails> action)
AbstractCopyTask filesMatching(String pattern, Action<? super FileCopyDetails> action)
AbstractCopyTask filesNotMatching(Iterable<String> patterns, Action<? super FileCopyDetails> action)
AbstractCopyTask filesNotMatching(String pattern, Action<? super FileCopyDetails> action)
AbstractCopyTask filter(Closure closure)
AbstractCopyTask filter(Class<? extends FilterReader> filterType)
AbstractCopyTask filter(Map<String, ?> properties, Class<? extends FilterReader> filterType)
AbstractCopyTask filter(Transformer<String, String> transformer)
AbstractCopyTask from(Object sourcePath, Closure c)
AbstractCopyTask from(Object sourcePath, Action<? super CopySpec> configureAction)
AbstractCopyTask from(Object... sourcePaths)
AbstractCopyTask include(Closure includeSpec)
AbstractCopyTask include(Iterable<String> includes)
AbstractCopyTask include(String... includes)
AbstractCopyTask include(Spec<FileTreeElement> includeSpec)
AbstractCopyTask into(Object destDir)
AbstractCopyTask into(Object destPath, Closure configureClosure)
CopySpec into(Object destPath, Action<? super CopySpec> copySpec)
AbstractCopyTask rename(Closure closure)
AbstractCopyTask rename(String sourceRegEx, String replaceWith)
AbstractCopyTask rename(Pattern sourceRegEx, String replaceWith)
AbstractCopyTask rename(Transformer<String, String> renamer)
CopySpec with(CopySpec... sourceSpecs)
}
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.compile.JavaCompile.html
class JavaCompile {
// Properties
FileCollection classpath
DirectoryProperty destinationDirectory
Set<String> excludes
Set<String> includes
Property<JavaCompiler> javaCompiler
CompileOptions options
FileTree source
String sourceCompatibility
String targetCompatibility
// Methods
SourceTask exclude(Closure excludeSpec)
SourceTask exclude(Iterable<String> excludes)
SourceTask exclude(String... excludes)
SourceTask exclude(Spec<FileTreeElement> excludeSpec)
SourceTask include(Closure includeSpec)
SourceTask include(Iterable<String> includes)
SourceTask include(String... includes)
SourceTask include(Spec<FileTreeElement> includeSpec)
SourceTask source(Object... sources)
}