File tree 6 files changed +10
-10
lines changed
6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
2
2
# Kotlin scripting examples
3
3
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
5
5
demonstrating Kotlin Scripting functionality and API usage.
6
6
7
7
If you know good examples of the Kotlin scripting API usage, not mentioned here, please submit an issue or a pull
8
8
request with the link and short description.
9
9
10
10
## Examples in this repository
11
11
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.
13
13
14
14
The individual example projects are mostly independent and could be copied and reused independently, but build files
15
15
should 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 1
1
2
2
# Kotlin Scripting Examples: Scripting Host with Kotlin Compiler Embeddable
3
3
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
5
5
[ Simple script definition example] ( ../jvm-simple-script/SimpleScript.md ) but uses the embeddable version of the
6
6
Kotlin compiler. The necessity of using embeddable compiler may arise when the dependencies that are packed into
7
7
the ` kotlin-compiler ` jar, could conflict with the dependencies used by the host.
Original file line number Diff line number Diff line change 2
2
# Kotlin Scripting Examples: Script with Dynamic dependencies from Maven
3
3
4
4
This 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:
6
6
``` kotlin
7
7
@file:DependsOn(" junit:junit:4.11" )
8
8
org.junit.Assert .assertTrue(true )
Original file line number Diff line number Diff line change 1
1
2
2
# Kotlin Scripting Examples: Simple Script Definition
3
3
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
5
5
[ scripting host project] ( host/ ) that uses the definition.
Original file line number Diff line number Diff line change 1
1
2
2
# Kotlin Scripting Examples: ` kotlin-main-kts ` usages
3
3
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.
6
6
7
7
* See also [ simplified implementation in this repository] ( ../simple-main-kts/SimpleMainKts.md ) *
8
8
@@ -44,7 +44,7 @@ provided that the shebang line is added to the script and works in the given OS
44
44
45
45
### Caching
46
46
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 `
48
48
* (` $TEMP/main.kts.compiled.cache ` by default)* , and if the script is not changed, the compiled one is executed from the cache.
49
49
50
50
### 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
17
17
scripting API usage, in particular:
18
18
- refinement of the compilation configuration with the parameters passed to the annotations
19
19
- 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
22
22
- discovery file configuration, that could be used with IntelliJ IDEA and command-line compiler
23
23
24
24
and others.
You can’t perform that action at this time.
0 commit comments