feat: 初始化跨平台远程编译服务与 Android Studio 插件
This commit is contained in:
commit
9eba4556db
44 files changed
+2802
No files matched your search
@@ -0,0 +1,20 @@
|
||||
//go:build !windows
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func gradleCommand(work, task string) *exec.Cmd {
|
||||
c := exec.Command("sh", filepath.Join(work, "gradlew"), task, "--console=plain", "--no-daemon")
|
||||
c.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
return c
|
||||
}
|
||||
func killTree(c *exec.Cmd) {
|
||||
if c.Process != nil {
|
||||
_ = syscall.Kill(-c.Process.Pid, syscall.SIGKILL)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user