Skip to content

Instantly share code, notes, and snippets.

@cdsap
Created May 17, 2019 10:13
Show Gist options
  • Save cdsap/faf0c4965925af7861e5fdc6cb6f0042 to your computer and use it in GitHub Desktop.
Save cdsap/faf0c4965925af7861e5fdc6cb6f0042 to your computer and use it in GitHub Desktop.
CreateMD5
abstract class CreateMD5 @Inject constructor(
private val workerExecutor: WorkerExecutor
) : SourceTask() {
@get:OutputDirectory
abstract val destination: RegularFileProperty
@TaskAction
fun createHashes() {
source.files.forEach {
val file = File(destination.get().asFile, "$it.md5")
workerExecutor.submit(GenerateMD5::class.java, {
isolationMode = IsolationMode.NONE;
params(it, file)
})
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment