ClojureScriptCompile

Compiles ClojureScript source to JavaScript.

Command-Line Arguments

None

Properties

Property Type Description

destinationDir

DirectoryProperty

Directory the class files will be written to

classpath

ConfigurableFileCollection

Classpath of the JVM

source

FileTree

Tree of source files (roots must be included in classpath)

options

ClojureScriptCompileOptions

Options provided to the ClojureScript compiler

javaLauncher

Property<JavaLauncher>

Overrides the Java executable to use for the task’s JVM

forkOptions

ForkOptions

Configure JVM settings

Example

Besides JVM options, all other settings are better controlled in the ClojureScriptBuild.

To configure a check task:

build.gradle
tasks.named('clojureScriptCompile')
  destinationDir = project.layout.buildDirectory.dir('mytarget')
  classpath.from(configurations.other)
  source = project.filetree('src/other')
  forkOptions {
    jvmArgs = ['-Xmx4g']
  }
  // options should be configured on the ClojureScriptBuild
}
build.gradle.kts
val clojureScriptCompile by tasks.existing {
  destinationDir = project.layout.buildDirectory.dir("mytarget")
  classpath.from(configurations.other)
  source = project.filetree("src/other")
  forkOptions {
    jvmArgs = listOf("-Xmx4g")
  }
  // options should be configured on the ClojureScriptBuild
}