Skip to content

SciProgCentre/gdml.kt

Repository files navigation

Gdml bindings for Kotlin

JetBrains Research DOI Maven Central

Kotlin JS IR supported

Multiplatform bindings for Gdml geometry specification. Utilized kotlinx.serialization to read and writing Gdml configurations.

In the future, it will be possible to add additional module to launch GEANT4 simulations from Kotlin code.

Artifact:

This module artifact: space.kscience:gdml:0.4.0.

Gradle:

repositories {
    mavenCentral()
    maven { url "https://repo.kotlin.link" }
}

dependencies {
    implementation 'space.kscience:gdml:0.4.0'
}

Gradle Kotlin DSL:

repositories {
    mavenCentral()
    maven("https://repo.kotlin.link")
}

dependencies {
    implementation("space.kscience:gdml:0.4.0")
}

Usage

Read:

import space.kscience.gdml.decodeFromString

val gdmlString: String
val gdml = Gdml.decodeFromString(gdmlString)

write:

import space.kscience.gdml.encodeToString

val gdml = Gdml{}
val gdmlString = gdml.encodeToString()