SDK - Kotlin¶
Getting Started¶
Installation¶
implementation("io.github.cidverse:cid-sdk-java:0.0.4")
implementation 'io.github.cidverse:cid-sdk-java:0.0.4'
<dependency>
<groupId>io.github.cidverse</groupId>
<artifactId>cid-sdk-java</artifactId>
<version>0.0.4</version>
</dependency>
SDK Documentation¶
Example¶
Notes
- actions should be packaged as cli applications and exit with a error code if execution failed for any reason
Main.kt
import kotlin.system.exitProcess
fun main(args: Array<String>) {
val sdk = CIDSDK()
var config = sdk.config()
var module = sdk.module()
var installResult = sdk.executeCommand(command = "yarn build", workDir = module.moduleDir)
if (installResult.code != 0) {
println("yarn build failed: ${installResult.error}")
exitProcess(1)
}
}