From c4f251a1488ca960aec370a1487254ae877695d9 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Mon, 2 Nov 2020 20:55:51 +0300 Subject: [PATCH] CLI interface in README.md --- README.md | 20 +++++++++++++++++++- build.gradle.kts | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index da02dc8..3e54b26 100644 --- a/README.md +++ b/README.md @@ -1 +1,19 @@ -## Trapping simulation \ No newline at end of file +## Trapping simulation + +## Building executable + +1. Create a fat jar distribution: +``` +./gradlew shadowJar +``` +The output file is located in `build/libs/trapping-1.1.0-all.jar` + +2. Run cross-sections computations +``` +java -cp trapping-1.1.0-all.jar ru.inr.mass.trapping.CrosssectionsKt +``` + +3. Run simulation: +``` +./gradlew run +``` diff --git a/build.gradle.kts b/build.gradle.kts index 7cf3972..b367665 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,14 @@ plugins { kotlin("jvm") version "1.4.10" application + id("com.github.johnrengelman.shadow") version "6.1.0" } group = "ru.inr.mass" version = "1.1.0" description = "Numass trapping simulation" + application { mainClassName = "ru.inr.mass.trapping.MainKt" }