Skip to content

Commit d20f4fa

Browse files
committed
Add initial set of the description files
1 parent 517f219 commit d20f4fa

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

ReadMe.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
# Kotlin scripting examples
3+
4+
This repository contains example projects and individual scripts, as well es links to the external examples
5+
demonstrating Kotlin Scripting functionality and API usage.
6+
7+
If you know good examples of the Kotlin scripting API usage, not mentioned here, please submit an issue or a pull
8+
request with the link and short description.
9+
10+
## Examples in this repository
11+
12+
The complete project could be compiled with gradle, as well as imported e.g. in IntelliJ IDEA.
13+
14+
The individual example projects are mostly independent and could be copied and reused independently, but build files
15+
should be adopted accordingly, mostly to supply required Kotlin version properties and setup inter-project dependencies
16+
when needed
17+
18+
### Script definitions with scripting hosts
19+
20+
- [Simple script definition](jvm/basic/jvm-simple-script/SimpleScript.md)
21+
- [Script with Dynamic dependencies from Maven](jvm/basic/jvm-maven-deps/MavenDeps.md)
22+
- [Scripting Host with Kotlin Compiler Embeddable](jvm/basic/jvm-embeddable-host/EmbeddableCompiler.md)
23+
24+
## External examples
25+
26+
// TODO
27+
28+
## License
29+
The Apache 2 license (given in full in [LICENSE.txt](license/LICENSE.txt) applies to all code in this repository which
30+
is copyright by JetBrains.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
# Kotlin Scripting Examples: Scripting Host with Kotlin Compiler Embeddable
3+
4+
This example demonstrates the that uses the same definition as in the
5+
[Simple script definition example](../jvm-simple-script/SimpleScript.md) but uses the embeddable version of the
6+
Kotlin compiler. The necessity of using embeddable compiler may arise when the dependencies that are packed into
7+
the `kotlin-compiler` jar, could conflict with the dependencies used by the host.

jvm/basic/jvm-maven-deps/MavenDeps.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# Kotlin Scripting Examples: Script with Dynamic dependencies from Maven
3+
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:
6+
```kotlin
7+
@file:DependsOn("junit:junit:4.11")
8+
org.junit.Assert.assertTrue(true)
9+
```
10+
meaning the specified dependency to the particular `junit` version will be downloaded (if not in the cache yet)
11+
during the script compilation and used as a dependency for the rest of the script.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Kotlin Scripting Examples: Simple Script Definition
3+
4+
This example demonstrates creation of the [simple script definition project](script/) and simple
5+
[scripting host project](host/) that uses the definition.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy