Skip to content

The Gradle plugin to execute some Kotlin Script as a Gradle task.

License

Notifications You must be signed in to change notification settings

anatawa12/KotlinScriptRunner

Repository files navigation

Kotlin Script Runner

The gradle plugin to run Kotlin Script as a task.

Demo

see example project.

Usage

apply plugin com.anatawa12.kotlinScriptRunner and create task with type com.anatawa12.kotlinScriptRunner.KotlinScriptExec

Options

KotlinScriptExec

This class implements JavaExecSpec to configure classpath, system properties or else. You can configure classpath, system properties and else like JavaExec task.

Other properties are shown below:

property type description default value
kotlinVersion String the version to execute kotlin script required
script String the path to kotlin script required
noJdk boolean adds -no-jdk-reflect to options of compiler false
noReflect boolean adds -no-reflect to options of compiler false
noStdlib boolean adds -no-stdlib to options of compiler false
nowarn boolean adds -nowarn to options of compiler false

Install

plugins {
    id("com.anatawa12.kotlinScriptRunner") version "2.0.0"
}

Contribution

  1. Fork it (http://github.com/anatawa12/KotlinScriptRunner/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Licence

Apache2.0

Author

@anatawa12