forked from MarathonLabs/marathon
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sergey Chelombitko
committed
Sep 11, 2024
1 parent
c33274a
commit 8393618
Showing
3 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/MarathonFlowAction.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.malinskiy.marathon | ||
|
||
import org.gradle.api.flow.BuildWorkResult | ||
import org.gradle.api.flow.FlowAction | ||
import org.gradle.api.flow.FlowParameters | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.services.ServiceReference | ||
import org.gradle.api.tasks.Input | ||
|
||
@Suppress("UnstableApiUsage") | ||
abstract class MarathonFlowAction : FlowAction<MarathonFlowAction.Params> { | ||
override fun execute(parameters: Params) { | ||
// Consume build result | ||
parameters.buildWorkResult.get() | ||
|
||
parameters.buildService.get().await() | ||
} | ||
|
||
interface Params : FlowParameters { | ||
@get:Input | ||
val buildWorkResult: Property<BuildWorkResult> | ||
|
||
@get:ServiceReference | ||
val buildService: Property<MarathonBuildService> | ||
} | ||
} |
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
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