2019-03-29 03:19:11 +02:00
|
|
|
;;; lang/kotlin/autoload.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;;;autoload
|
2019-04-11 10:16:53 +03:00
|
|
|
(defun +kotlin-locate-gradlew-file ()
|
2019-03-29 03:19:11 +02:00
|
|
|
"Gradlew file location for this project."
|
|
|
|
(locate-dominating-file buffer-file-name "gradlew"))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +kotlin/run-gradlew (command)
|
|
|
|
"Run gradlew in this project."
|
|
|
|
(interactive "sCommand: ")
|
2019-04-11 10:16:53 +03:00
|
|
|
(let ((default-directory (+kotlin-locate-gradlew-file))
|
2019-03-29 03:19:11 +02:00
|
|
|
(compilation-read-command nil)
|
|
|
|
(compile-command (format "sh gradlew %s" command)))
|
|
|
|
(call-interactively #'compile)))
|