From c9a2bd4e4062a03fcc2059bcf4c76eec6d473ef5 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 6 Jul 2023 13:05:26 +0530 Subject: refactor(build): cleanup ktfmt code --- .../kotlin/app/passwordstore/gradle/ktfmt/KtfmtFormatTask.kt | 11 +---------- .../app/passwordstore/gradle/ktfmt/KtfmtWorkerParameters.kt | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtFormatTask.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtFormatTask.kt index 934d6171..505e7462 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtFormatTask.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtFormatTask.kt @@ -16,16 +16,12 @@ constructor( private val projectLayout: ProjectLayout, ) : SourceTask() { - init { - outputs.upToDateWhen { false } - } - @TaskAction fun execute() { val result = with(workerExecutor.noIsolation()) { submit(KtfmtWorkerAction::class.java) { - name.set("foofoo") + name.set("ktfmt-worker") files.from(source) projectDirectory.set(projectLayout.projectDirectory.asFile) } @@ -49,9 +45,4 @@ constructor( } .filterNotNull() } - - companion object { - - private const val PARALLEL_TASK_LIMIT = 4 - } } diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerParameters.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerParameters.kt index 9d4a3e92..1c550de8 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerParameters.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/ktfmt/KtfmtWorkerParameters.kt @@ -9,5 +9,4 @@ interface KtfmtWorkerParameters : WorkParameters { val name: Property val files: ConfigurableFileCollection val projectDirectory: RegularFileProperty - val output: RegularFileProperty } -- cgit v1.2.3