Fork me on GitHub

I know about

boot.user> (clojure.repl/doc javac)
([& {:keys [help options], :as *opts*}])
  Compile java sources.
  Keyword Args:
    :help     bool   Print this help info.
    :options  [str]  List of options passed to the java compiler.
is there a template involving javac + watch where I can point it at a /java-src directory,and have it auto recompile on any chances / somehow ireload the classes so I can use them from clojure ?

sinistral04:11:49 might be worth a look... It's been on my todo list for ages, but I haven't actually used it myself yet.


What's the point of calling require inside a function like this: The author says this function is an alternative to pulling the Stencil library but won't (require '[stencil.core]) do just that?


@cdimara: my entire knowledge of this is based on reading the comment -- I believe the trick works as follows: if you put it as a :requirein the namespace, than to even COMPILE the namespace, you have to add stencil as a PROJECT dependency and pull it in


the way the function is currently defined -- if you don't run that particular function, you do NOT have to pull in the dependency


you only have to add stencil as a project dependency if you want to actually call that function


@cdimara As the author of Boot new, I can confirm @qqq's answer: a (require ...) function call is dynamic: it tries to load the namespace at runtime, so the dependency is not required by all users of the library, only those who choose to call render-text.


Is there a template for writing a new task?


It also means that Stencil isn't automatically dragged into every project just by using Boot new.


(It's right there in the README for Boot new -- in the Getting Started paragraph, it lists the built-in templates available)


Thanks, I'll give it a try.


I have some tasks I use on most projects which I'd like to get up on clojars, even just for myself 🙂


Let me know if you encounter problems. It hasn't been widely tested -- most folks create app or default projects.


Anyone have a sample clojure + java mixed boot project I can borrow build.boot from ? I'm trying to figure out how to configure the *.java files.


@qqq We have src/clj and src/java both added to the :resource-paths in set-env! (not sure why we chose for resource-paths instead of source-paths)


@qqq and our build task looks like this: (deftask build [] (comp (javac) (aot) (pom) (jar)))

Hendrik Poernama11:11:46

hello, does anyone know how to use cljs preloads in boot? I'm trying to add re-frisk in my dev task.