refactor(build): cleanup ktfmt code
This commit is contained in:
parent
f583939635
commit
c9a2bd4e40
2 changed files with 1 additions and 11 deletions
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue