doomemacs/modules/lang/kotlin/autoload.el
2019-03-29 03:22:23 +02:00

15 lines
515 B
EmacsLisp

;;; lang/kotlin/autoload.el -*- lexical-binding: t; -*-
;;;autoload
(defun +kotlin/locate-gradlew-file ()
"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: ")
(let ((default-directory (+kotlin/locate-gradlew-file))
(compilation-read-command nil)
(compile-command (format "sh gradlew %s" command)))
(call-interactively #'compile)))