ClojureBuild

Represents Clojure source code that should be checked or compiled as a unit.

Properties

Property Type Description

outputDir

DirectoryProperty

Directory compiled classes will be written to (if AOT is enabled). Defaults to build/clojure/<name>

classpath

ConfigurableFileCollection

Classpath to use when checking/compiling

sourceRoots

ConfigurableFileCollection

Directories to use as roots for source code (will be added to the classpath)

sourceTree

FileTree

READ ONLY Tree of source files (starting from sourceRoots)

checkNamespaces

SetProperty<String>

Namespaces within sourceRoots that should be included in the build’s ClojureCheck task

reflection

Property<String>

One of silent (default), warn, fail. Controls whether reflection causes warnings or failures

aotNamespaces

SetProperty<String>

Namespaces within sourceRoots that should be included in the build’s ClojureCompile task

compiler

ClojureCompileOptions

Configure the Clojure compiler for the build’s ClojureCompile task

Methods

Method Description

void checkAll()

Sets checkNamespaces to all namespaces found in sourceRoots

void aotAll()

Sets aotNamespaces to all namespaces found in sourceRoots

void compiler(Action<? super ClojureCompilerOptions> action)

Allows configuring the compiler options in a block

Example