Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ abstract class ClojureCompileTask @Inject constructor(

execOperations.javaexec {
mainClass.set("clojure.lang.Compile")
// Prepend the destination directory so that classes generated by
// earlier-compiled namespaces (e.g. gen-class'd classes such as a
// wallpaper Engine or Worker) are resolvable via the classloader
// when a later namespace references them (via :import or a direct
// constructor call) during its own compilation. Without this, the
// output dir is only the *destination* (clojure.compile.path) and
// is not a classpath root, so a sibling namespace's generated
// classes cannot be loaded — producing ClassNotFoundException at
// AOT time.
classpath(destinationDir)
classpath(effectiveClasspath)
systemProperty("clojure.compile.path", destDir.absolutePath)
systemProperty(
Expand Down