@Incubating public class LegacyJavaComponentPlugin extends Object implements Plugin<Project>
LanguageBasePlugin
.
Base plugin for Java language support. Applies the LanguageBasePlugin
.
Registers the ClassDirectoryBinarySpec
element type for the BinaryContainer
.
Adds a lifecycle task named classes
for each ClassDirectoryBinarySpec
.
Adds a JavaCompile
task for each JavaSourceSet
added to a ClassDirectoryBinarySpec
.Constructor and Description |
---|
LegacyJavaComponentPlugin(org.gradle.internal.reflect.Instantiator instantiator,
JavaToolChain toolChain,
org.gradle.api.internal.project.taskfactory.ITaskFactory taskFactory,
org.gradle.platform.base.internal.toolchain.ToolResolver toolResolver) |
Modifier and Type | Method and Description |
---|---|
void |
apply(Project target)
Apply this plugin to the given target object.
|
void |
configureCompileTask(AbstractCompile compile,
JavaSourceSet sourceSet,
ClassDirectoryBinarySpec binary)
Preconfigures the specified compile task based on the specified source set and class directory binary.
|
@Inject public LegacyJavaComponentPlugin(org.gradle.internal.reflect.Instantiator instantiator, JavaToolChain toolChain, org.gradle.api.internal.project.taskfactory.ITaskFactory taskFactory, org.gradle.platform.base.internal.toolchain.ToolResolver toolResolver)
public void apply(Project target)
Plugin
public void configureCompileTask(AbstractCompile compile, JavaSourceSet sourceSet, ClassDirectoryBinarySpec binary)
compile
- the compile task to be preconfiguredsourceSet
- the source set for the compile taskbinary
- the binary for the compile task