我正在努力实现以下目标 -
为实现这一目标,我做了以下工作:
class IncrementalIosBuildTask extends DefaultTask { @InputDirectory def File inputDir @TaskAction void execute(IncrementalTaskInputs inputs) { def shouldRecompile = !inputs.incremental; inputs.outOfDate { change -> shouldRecompile = true return } inputs.removed { change -> shouldRecompile = true return } if (shouldRecompile) { println("compiling...") } } } task myCompile(type: IncrementalIosBuildTask) { inputDir file("mylib") }
事先谢谢