File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed
Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11
22# Kotlin scripting examples
33
4- This repository contains example projects and individual scripts, as well es links to the external examples
4+ This repository contains example projects and individual scripts, as well as links to the external examples
55demonstrating Kotlin Scripting functionality and API usage.
66
77If you know good examples of the Kotlin scripting API usage, not mentioned here, please submit an issue or a pull
88request with the link and short description.
99
1010## Examples in this repository
1111
12- The complete project could be compiled with gradle , as well as imported e.g. in IntelliJ IDEA.
12+ The complete project could be compiled with Gradle , as well as imported e.g. in IntelliJ IDEA.
1313
1414The individual example projects are mostly independent and could be copied and reused independently, but build files
1515should be adopted accordingly, mostly to supply required Kotlin version properties and setup inter-project dependencies
Original file line number Diff line number Diff line change 11
22# Kotlin Scripting Examples: Scripting Host with Kotlin Compiler Embeddable
33
4- This example demonstrates the that uses the same definition as in the
4+ This example demonstrates the usage of the same definition as in the
55[ Simple script definition example] ( ../jvm-simple-script/SimpleScript.md ) but uses the embeddable version of the
66Kotlin compiler. The necessity of using embeddable compiler may arise when the dependencies that are packed into
77the ` kotlin-compiler ` jar, could conflict with the dependencies used by the host.
Original file line number Diff line number Diff line change 22# Kotlin Scripting Examples: Script with Dynamic dependencies from Maven
33
44This example demonstrates the [ script definition] ( script/ ) and appropriate [ scripting host ] ( host/ ) that implements
5- support for dynamic dependencies from Maven repositories usage, so une can write a script:
5+ support for dynamic dependencies from Maven repositories usage, so one can write a script:
66``` kotlin
77@file:DependsOn(" junit:junit:4.11" )
88org.junit.Assert .assertTrue(true )
Original file line number Diff line number Diff line change 11
22# Kotlin Scripting Examples: Simple Script Definition
33
4- This example demonstrates creation of the [ simple script definition project] ( script/ ) and simple
4+ This example demonstrates the creation of the [ simple script definition project] ( script/ ) and simple
55[ scripting host project] ( host/ ) that uses the definition.
Original file line number Diff line number Diff line change 11
22# Kotlin Scripting Examples: ` kotlin-main-kts ` usages
33
4- Scripts demonstrating the usage of the ` kotlin-main-kts ` script definition jar, distributied with the Kotlin compiler
5- and IntelliJ plugin.
4+ Scripts demonstrating the usage of the ` kotlin-main-kts ` script definition jar, distributed with the Kotlin compiler
5+ and the IntelliJ plugin.
66
77* See also [ simplified implementation in this repository] ( ../simple-main-kts/SimpleMainKts.md ) *
88
@@ -44,7 +44,7 @@ provided that the shebang line is added to the script and works in the given OS
4444
4545### Caching
4646
47- The compiled scripts are cashed to the directory defined by an environmen variable ` KOTLIN_MAIN_KTS_COMPILED_SCRIPTS_CACHE_DIR `
47+ The compiled scripts are cashed to the directory defined by an environment variable ` KOTLIN_MAIN_KTS_COMPILED_SCRIPTS_CACHE_DIR `
4848* (` $TEMP/main.kts.compiled.cache ` by default)* , and if the script is not changed, the compiled one is executed from the cache.
4949
5050### IntelliJ support
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ The script definition implementation demonstrates many aspects of the script def
1717scripting API usage, in particular:
1818- refinement of the compilation configuration with the parameters passed to the annotations
1919- dynamic script dependencies resolved via ivy library
20- - import scripts with possibility of sharing instances (diamond-shaped import)
21- - compilation cache, where cached compiled script are saved as executable jars
20+ - import scripts with the possibility of sharing instances (diamond-shaped import)
21+ - compilation cache, where cached compiled scripts are saved as executable jars
2222- discovery file configuration, that could be used with IntelliJ IDEA and command-line compiler
2323
2424and others.
You can’t perform that action at this time.
0 commit comments