https://github.com/anatawa12/kotlinscriptrunner
The Gradle plugin to execute some Kotlin Script as a Gradle task.
https://github.com/anatawa12/kotlinscriptrunner
gradle-plugin kotlin kotlin-script
Last synced: 3 months ago
JSON representation
The Gradle plugin to execute some Kotlin Script as a Gradle task.
- Host: GitHub
- URL: https://github.com/anatawa12/kotlinscriptrunner
- Owner: anatawa12
- License: apache-2.0
- Created: 2018-08-14T05:34:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-17T08:21:34.000Z (over 4 years ago)
- Last Synced: 2025-02-12T17:51:48.127Z (4 months ago)
- Topics: gradle-plugin, kotlin, kotlin-script
- Language: Kotlin
- Homepage:
- Size: 149 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Kotlin Script Runner
====The gradle plugin to run Kotlin Script as a task.
## Demo
see [example project](./example).
## 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
```groovy
plugins {
id("com.anatawa12.kotlinScriptRunner") version "2.0.0"
}
```## Contribution
1. Fork it ([http://github.com/anatawa12/KotlinScriptRunner/fork](http://github.com/anatawa12/KotlinScriptRunner/fork))
1. Create your feature branch (git checkout -b my-new-feature)
1. Commit your changes (git commit -am 'Add some feature')
1. Push to the branch (git push origin my-new-feature)
1. Create new Pull Request## Licence
[Apache2.0](https://github.com/anatawa12/KotlinScriptRunner/blob/master/LICENSE)
## Author
[@anatawa12](https://github.com/anatawa12)