Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 562 Bytes

File metadata and controls

11 lines (9 loc) · 562 Bytes

Kotlin Scripting Examples: Script with Dynamic dependencies from Maven

This example demonstrates the script definition and appropriate scripting host that implements support for dynamic dependencies from Maven repositories usage, so one can write a script:

@file:DependsOn("junit:junit:4.11")
org.junit.Assert.assertTrue(true)

meaning the specified dependency to the particular junit version will be downloaded (if not in the cache yet) during the script compilation and used as a dependency for the rest of the script.