File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
kfc/kfc-gradle-plugin/src/main/kotlin/io/github/turansky/kfc/gradle/plugin Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,12 @@ import org.gradle.internal.service.ServiceRegistry
44import org.gradle.process.ExecOperations
55
66internal data class BundlerRunConfiguration (
7- val bundler : Bundler ,
7+ private val bundler : Bundler ,
88 val options : ExecOptions ,
99 val execOperations : ExecOperations ,
1010 val services : ServiceRegistry ,
1111 val continuous : Boolean = false ,
12- )
12+ ) {
13+ val id: String
14+ get() = bundler.toolName
15+ }
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ internal data class SimpleBundlerRunner(
1212 private val execOperations: ExecOperations
1313 get() = configuration.execOperations
1414
15- private val bundler: Bundler
16- get() = configuration.bundler
17-
1815 fun run () {
1916 if (configuration.continuous) {
2017 startNonBlocking()
@@ -24,17 +21,17 @@ internal data class SimpleBundlerRunner(
2421 }
2522
2623 override fun start (): ExecAsyncHandle {
27- return execOperations.execAsync(bundler.toolName ) { execSpec ->
24+ return execOperations.execAsync(configuration.id ) { execSpec ->
2825 configureExec(execSpec)
2926 }.start()
3027 }
3128
3229 private fun startNonBlocking () {
3330 val deploymentRegistry = configuration.services.get(DeploymentRegistry ::class .java)
34- val deploymentHandle = deploymentRegistry.get(bundler.toolName , BundlerHandle ::class .java)
31+ val deploymentHandle = deploymentRegistry.get(configuration.id , BundlerHandle ::class .java)
3532 if (deploymentHandle == null ) {
3633 deploymentRegistry.start(
37- bundler.toolName ,
34+ configuration.id ,
3835 DeploymentRegistry .ChangeBehavior .BLOCK ,
3936 BundlerHandle ::class .java,
4037 this ,
You can’t perform that action at this time.
0 commit comments