// ĠCopyright Ġ 2 0 0 0 - 2 0 2 0 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġcom . intellij . space . plugins . pipelines . services . execution Ċ Ċ import Ġcom . intellij . execution . process . Process Handler Ċ import Ġcom . intellij . openapi . components . Service Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġlibraries . io . random . Random Ċ import Ġlibraries . k logging . K Logging Ċ import Ġjava . io . OutputStream Ċ Ċ @ Service Ċ class ĠSpace Task Runner ( val Ġproject : ĠProject ) Ġ{ ĊĠ Ġcompanion Ġobject Ġ: ĠK Logging () ĊĊĠ Ġprivate Ġval Ġidea Local Runner Label Ġ= Ġ" Space Task Runner _${ Random . next String ( 1 0 )}" ĊĊĠ Ġfun Ġrun ( task Name : ĠString ): ĠProcess Handler Ġ{ ĊĠĠĠ Ġ// Ġtodo : Ġimplement Ġusing Ġlocal Ġrun Ġfrom Ġthe ĠSDK . ĊĠĠĠ Ġreturn ĠTask Process Handler ( task Name ) ĊĠ Ġ} ĊĊĠ Ġprivate Ġval Ġnew Line : ĠString Ġ= ĠSystem . getProperty (" line . separator ", Ġ"\ n ") Ċ } Ċ Ċ class ĠTask Process Handler ( private Ġval Ġtask Name : ĠString ) Ġ: ĠProcess Handler () Ġ{ ĊĊĠ Ġcompanion Ġobject Ġ: ĠK Logging () ĊĊĠ Ġoverride Ġfun Ġget Process Input (): ĠOutputStream ? Ġ{ ĊĠĠĠ Ġreturn Ġnull ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġdetach Is Default (): ĠBoolean Ġ{ ĊĠĠĠ Ġreturn Ġfalse ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġdetach Process Impl () Ġ{ ĊĠĠĠ Ġlogger . info (" detach Process Impl Ġfor Ġtask Ġ$ task Name ") ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġdestroy Process Impl () Ġ{ ĊĠĠĠ Ġlogger . info (" destroy Process Impl Ġfor Ġtask Ġ$ task Name ") ĊĠĠĠ Ġnotify Process Terminated ( 0 ) ĊĠ Ġ} ĊĊĠ Ġfun Ġdispose () Ġ{ ĊĠĠĠ Ġnotify Process Terminated ( 0 ) ĊĠ Ġ} ĊĊ Ċ } Ċ