;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313&\207" [require javaimp-util custom-declare-variable javaimp-gradle-program funcall function #[0 "\300\207" [#1="gradle"] 1 #1#] "Path to the `gradle' program. Customize it if the program is\nnot on `exec-path'. If the visited project's directory contains\ngradlew program, it is used in preference." :group javaimp :type string] 8) #@68 Task body, uses syntax which can be used both in Groovy and Kotlin (defconst javaimp--gradle-task-body (byte-code "\301\302\303\"r\211q\210\304\305\"\216\306\307\310\"!\210\311 *\207" [javaimp--basedir generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents expand-file-name "gradleTaskBody.inc.kts" buffer-string] 5) (#$ . 490)) #@207 Calls gradle on FILE to get various project information. Passes specially crafted init file as -I argument to gradle and invokes task contained in it. This task returns all needed information. (fn FILE) (defalias 'javaimp--gradle-visit #[257 "\301\302\"\210\303\304\305$\306\307\310\"\"\311@\312#\207" [javaimp--gradle-task-body message "Visiting Gradle build file %s..." javaimp--gradle-call javaimp--gradle-handler "javaimpTask" mapcar make-closure #[257 "\301\300\"\207" [V0 javaimp--gradle-module-from-alist] 4 "\n\n(fn ALIST)"] javaimp--build-tree nil] 7 (#$ . 906)]) (defalias 'javaimp--gradle-handler #[0 "eb\210\301\211\211\211\302\303\301\304#\203K\305\306\307!!\262\306\310!\262\211\311\301\304\312#)\266\204\203/\301\262\313=\203A\203AB\262\301\262BB\262\202\203TB\262\237\207" [inhibit-changing-match-data nil re-search-forward "^\\([[:alnum:]-]+\\)=\\(.*\\)$" t intern match-string 1 2 "\\`[ \n ]*\\'" string-match id] 12]) #@24 (fn ALIST FILE-ORIG) (defalias 'javaimp--gradle-module-from-alist #[514 "\300\301\302\303\236A!\304\302\305\236A!\306\307\236A\310\311\312\313 \236A!\211\205.\314!\315\235\205.\211\262\316\317\320\321\322\236A!\"\323\320\312\324\236A!!\325\321\326\236A!\327\330 \331\332&\207" [make-javaimp-module :id javaimp--gradle-id-from-semi-separated id :parent-id parent-id :file file :file-orig :final-name javaimp-cygpath-convert-maybe final-name file-name-extension ("jar" "war") :source-dirs mapcar file-name-as-directory javaimp--split-native-path source-dirs :build-dir build-dir :dep-jars dep-jars :load-ts current-time :dep-jars-path-fetcher javaimp--gradle-fetch-dep-jars-path] 23 (#$ . 1891)]) #@12 (fn STR) (defalias 'javaimp--gradle-id-from-semi-separated #[257 "\211\205N\300\301\302#\303G\304U\204\305\306\"\210A@\262\211\307\232\203'\310\262\202B\311\307\312\307\313\"\203=\211G\303O\266\202\202?\262#\262\314\315@\3168$\266\202\207" [split-string ";" t nil 3 error "Invalid project id: %s" ":" "" replace-regexp-in-string "." string-prefix-p record javaimp-id 2] 11 (#$ . 2613)]) #@15 (fn MODULE) (defalias 'javaimp--gradle-fetch-dep-jars-path #[257 "\303\304!>\204\305\306\307D\"\210\310H \311\304!>\204%\305\306\307D\"\210\312H\205z\313\304\211!>\204>\305\306\307 D\"\210\314H!\n>\204c\305\306\315\304 !>\204\\\305\306\307 D\"\210\314HD\"\210\304!>\204t\305\306\307D\"\210\314H\312HP\316P$\207" [cl-struct-javaimp-module-tags javaimp--gradle-task-body cl-struct-javaimp-id-tags javaimp--gradle-call type-of signal wrong-type-argument javaimp-module 4 #[0 "\300\301!\210\302\303!\207" [re-search-forward "^dep-jars=\\(.*\\)$" match-string 1] 2] 2 ":" 1 javaimp-id ":javaimpTask"] 13 (#$ . 3037)]) #@43 (fn FILE INIT-SCRIPT-BODY HANDLER TASK) (defalias 'javaimp--gradle-call #[1028 "\301!\302\232\303\304\305\205 \306\203\307!\202\310!$\311!\312P\313\314!\203.\202/\315\316\317\f!\320\317 ! &\207" [javaimp-gradle-program file-name-extension "kts" make-temp-file "javaimp" nil ".kts" javaimp--gradle-init-script-kotlin javaimp--gradle-init-script file-name-directory "gradlew" javaimp--call-build-tool file-exists-p "-q" "-b" javaimp-cygpath-convert-maybe "-I"] 16 (#$ . 3692)]) #@13 (fn BODY) (defalias 'javaimp--gradle-init-script #[257 "\300\301Q\207" ["\nimport java.io.File\nimport java.util.stream.Collectors\nallprojects {\n task javaimpTask {" "} }"] 4 (#$ . 4201)]) #@13 (fn BODY) (defalias 'javaimp--gradle-init-script-kotlin #[257 "\300\301Q\207" ["\nimport java.io.File\nimport java.util.stream.Collectors\nallprojects {\n tasks.register(\"javaimpTask\") {" "} }"] 4 (#$ . 4402)]) (provide 'javaimp-gradle)