Java Code Examples for org.gradle.api.tasks.Delete#delete()
The following examples show how to use
org.gradle.api.tasks.Delete#delete() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CleanRule.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public void apply(String taskName) { if (!taskName.startsWith(PREFIX)) { return; } String targetTaskName = taskName.substring(PREFIX.length()); if (Character.isLowerCase(targetTaskName.charAt(0))) { return; } Task task = tasks.findByName(StringUtils.uncapitalize(targetTaskName)); if (task == null) { return; } Delete clean = tasks.create(taskName, Delete.class); clean.delete(task.getOutputs().getFiles()); }
Example 2
Source File: CleanRule.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public void apply(String taskName) { if (!taskName.startsWith(PREFIX)) { return; } String targetTaskName = taskName.substring(PREFIX.length()); if (Character.isLowerCase(targetTaskName.charAt(0))) { return; } Task task = tasks.findByName(StringUtils.uncapitalize(targetTaskName)); if (task == null) { return; } Delete clean = tasks.create(taskName, Delete.class); clean.delete(task.getOutputs().getFiles()); }
Example 3
Source File: CleanRule.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public void apply(String taskName) { if (!taskName.startsWith(PREFIX)) { return; } String targetTaskName = taskName.substring(PREFIX.length()); if (Character.isLowerCase(targetTaskName.charAt(0))) { return; } Task task = tasks.findByName(StringUtils.uncapitalize(targetTaskName)); if (task == null) { return; } Delete clean = tasks.create(taskName, Delete.class); clean.delete(task.getOutputs().getFiles()); }
Example 4
Source File: CleanRule.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public void apply(String taskName) { if (!taskName.startsWith(PREFIX)) { return; } String targetTaskName = taskName.substring(PREFIX.length()); if (Character.isLowerCase(targetTaskName.charAt(0))) { return; } Task task = tasks.findByName(StringUtils.uncapitalize(targetTaskName)); if (task == null) { return; } Delete clean = tasks.create(taskName, Delete.class); clean.delete(task.getOutputs().getFiles()); }
Example 5
Source File: LifecycleBasePlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void addClean(final Project project) { Delete clean = project.getTasks().create(CLEAN_TASK_NAME, Delete.class); clean.setDescription("Deletes the build directory."); clean.setGroup(BUILD_GROUP); clean.delete(new Callable<File>() { public File call() throws Exception { return project.getBuildDir(); } }); }
Example 6
Source File: BasePlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void addClean(final Project project) { Delete clean = project.getTasks().create(CLEAN_TASK_NAME, Delete.class); clean.setDescription("Deletes the build directory."); clean.setGroup(BUILD_GROUP); clean.delete(new Callable<File>() { public File call() throws Exception { return project.getBuildDir(); } }); }
Example 7
Source File: LifecycleBasePlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void addClean(final Project project) { Delete clean = project.getTasks().create(CLEAN_TASK_NAME, Delete.class); clean.setDescription("Deletes the build directory."); clean.setGroup(BUILD_GROUP); clean.delete(new Callable<File>() { public File call() throws Exception { return project.getBuildDir(); } }); }
Example 8
Source File: BasePlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void addClean(final Project project) { Delete clean = project.getTasks().create(CLEAN_TASK_NAME, Delete.class); clean.setDescription("Deletes the build directory."); clean.setGroup(BUILD_GROUP); clean.delete(new Callable<File>() { public File call() throws Exception { return project.getBuildDir(); } }); }