Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

fugerit-org/kotlin-script-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kotlin Language Script Helper

NOTE: This repository is being archived as the more generic https://github.com/fugerit-org/fj-script-helper/ has been created

This project provides just a convenient interface for evaluating kotlin script. (Actually it can be used for any kind of script).

Keep a Changelog v1.1.0 badge Maven Central license code of conduct Quality Gate Status Coverage

Java runtime version Java build version Apache Maven Fugerit Github Project Conventions

Quickstart

1. Add dependency

<dependency>
    <groupId>org.fugerit.java</groupId>
    <artifactId>kotlin-script-helper</artifactId>
    <version>${kotlin-script-helper-version}</version>
</dependency>

2. Usage

Sample code :

EvalKts evalKts = new EvalKtsWithJsonDataModel();
try (Reader reader = [reader on kotlin script]) {
    Map<String, Object> dataModel = new HashMap<>();
    dataModel.put( "docTitle", "My custom title" );
    Object result = evalKts.evalKts( reader, dataModel );
    log.info( "my result : {}", result );
}

About

Kotlin Language Script Helper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published