
com.github.ksoichiro.replacer.CleanTask.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-replacer Show documentation
Show all versions of gradle-replacer Show documentation
Gradle plugin to replace text
package com.github.ksoichiro.replacer
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction
class CleanTask extends DefaultTask {
@TaskAction
def exec() {
ReplacerPluginExtension replacer = project.replacer
def outputDir = new File(project.buildDir, replacer.outputDir)
if (outputDir.exists()) {
project.delete(outputDir)
}
def archiveDir = new File(project.buildDir, replacer.archiveDir)
if (archiveDir.exists()) {
project.delete(archiveDir)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy