refactor(build): cleanup ktfmt code

This commit is contained in:
Harsh Shandilya 2023-07-06 13:05:26 +05:30
parent f583939635
commit c9a2bd4e40
No known key found for this signature in database
2 changed files with 1 additions and 11 deletions

View file

@ -16,16 +16,12 @@ constructor(
private val projectLayout: ProjectLayout, private val projectLayout: ProjectLayout,
) : SourceTask() { ) : SourceTask() {
init {
outputs.upToDateWhen { false }
}
@TaskAction @TaskAction
fun execute() { fun execute() {
val result = val result =
with(workerExecutor.noIsolation()) { with(workerExecutor.noIsolation()) {
submit(KtfmtWorkerAction::class.java) { submit(KtfmtWorkerAction::class.java) {
name.set("foofoo") name.set("ktfmt-worker")
files.from(source) files.from(source)
projectDirectory.set(projectLayout.projectDirectory.asFile) projectDirectory.set(projectLayout.projectDirectory.asFile)
} }
@ -49,9 +45,4 @@ constructor(
} }
.filterNotNull() .filterNotNull()
} }
companion object {
private const val PARALLEL_TASK_LIMIT = 4
}
} }

View file

@ -9,5 +9,4 @@ interface KtfmtWorkerParameters : WorkParameters {
val name: Property<String> val name: Property<String>
val files: ConfigurableFileCollection val files: ConfigurableFileCollection
val projectDirectory: RegularFileProperty val projectDirectory: RegularFileProperty
val output: RegularFileProperty
} }