Package com.rivancic.gradle.plugin.files
Class FilesPlugin
java.lang.Object
com.rivancic.gradle.plugin.files.FilesPlugin
- All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>
public class FilesPlugin
extends java.lang.Object
implements org.gradle.api.Plugin<org.gradle.api.Project>
Implementation of Plugin Gradle API interface. In the
Plugin.apply(Object) method we configure base plugin logic.
First its logged to the console so that we know plugin is being applied.
Next extension for parametrizing tasks is registered. Example of the extension:
sortFilesExtension {
sortType = ...
directoryLocation = ...
}
Then we register new tasks so that they are configured once they need to be invoked.
We have to check first before adding CleanTask task as it might already be added to the project if you would apply "java" plugin to the main project.
As the last part we register SortFilesTask task.
-
Constructor Summary
Constructors Constructor Description FilesPlugin() -
Method Summary
Modifier and Type Method Description voidapply(org.gradle.api.Project project)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FilesPlugin
public FilesPlugin()
-
-
Method Details
-
apply
public void apply(org.gradle.api.Project project)- Specified by:
applyin interfaceorg.gradle.api.Plugin<org.gradle.api.Project>
-