branch: scratch/javaimp-gradle commit 7a0f56a2ba5508a41613bb881c3e8cf903395d82 Author: Filipp Gunbin <fgun...@fastmail.fm> Commit: Filipp Gunbin <fgun...@fastmail.fm>
Fixes --- packages/javaimp/javaimp-gradle.el | 2 +- packages/javaimp/javaimp-util.el | 27 +++++++++++++++++++++++++++ packages/javaimp/javaimp.el | 28 +--------------------------- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/packages/javaimp/javaimp-gradle.el b/packages/javaimp/javaimp-gradle.el index 285794e..2596465 100644 --- a/packages/javaimp/javaimp-gradle.el +++ b/packages/javaimp/javaimp-gradle.el @@ -30,7 +30,7 @@ gradlew program, it is used in preference." (defconst javaimp--gradle-task-body (with-temp-buffer - (insert-file-contents "gradleTaskBody.inc.kts") + (insert-file-contents (expand-file-name "gradleTaskBody.inc.kts" javaimp--basedir)) (buffer-string)) "Task body, uses syntax which can be used both in Groovy and Kotlin") diff --git a/packages/javaimp/javaimp-util.el b/packages/javaimp/javaimp-util.el index cd5d58e..c60e9e3 100644 --- a/packages/javaimp/javaimp-util.el +++ b/packages/javaimp/javaimp-util.el @@ -23,6 +23,8 @@ ;;; Code: (require 'xml) +(require 'cl-lib) +(require 'seq) (defcustom javaimp-cygpath-program (if (eq system-type 'cygwin) "cygpath") @@ -31,6 +33,31 @@ the program is not on `exec-path'." :group 'javaimp :type 'string) +(defconst javaimp-debug-buf-name "*javaimp-debug*") + +(defconst javaimp--basedir (file-name-directory load-file-name)) + +;; Structs + +(cl-defstruct javaimp-node + parent children contents) + +(cl-defstruct javaimp-module + id parent-id + file + file-orig + final-name + source-dirs build-dir + dep-jars + load-ts + dep-jars-path-fetcher) + +(cl-defstruct javaimp-id + group artifact version) + +(cl-defstruct javaimp-cached-jar + file read-ts classes) + (defun javaimp--xml-children (xml-tree child-name) "Returns list of children of XML-TREE filtered by CHILD-NAME" diff --git a/packages/javaimp/javaimp.el b/packages/javaimp/javaimp.el index c900321..b24b243 100644 --- a/packages/javaimp/javaimp.el +++ b/packages/javaimp/javaimp.el @@ -69,9 +69,6 @@ ;;; Code: -(require 'cl-lib) -(require 'seq) -(require 'javaimp-util) (require 'javaimp-maven) (require 'javaimp-gradle) @@ -144,7 +141,7 @@ to the completion alternatives list." :type 'boolean) -;; Variables and constants +;; Variables (defvar javaimp-project-forest nil "Visited projects") @@ -153,29 +150,6 @@ to the completion alternatives list." "Alist of cached jars. Each element is of the form (FILE . CACHED-JAR).") -(defconst javaimp-debug-buf-name "*javaimp-debug*") - -;; Structs - -(cl-defstruct javaimp-node - parent children contents) - -(cl-defstruct javaimp-module - id parent-id - file - file-orig - final-name - source-dirs build-dir - dep-jars - load-ts - dep-jars-path-fetcher) - -(cl-defstruct javaimp-id - group artifact version) - -(cl-defstruct javaimp-cached-jar - file read-ts classes) - ;;;###autoload