Created
May 17, 2019 10:13
-
-
Save cdsap/faf0c4965925af7861e5fdc6cb6f0042 to your computer and use it in GitHub Desktop.
CreateMD5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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