All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bsp.codegen.ProtocolVersionLoader.scala Maven / Gradle / Ivy

The newest version!
package bsp.codegen

import java.nio.file.{Files, Paths}

object ProtocolVersionLoader {
  def version(): String = {
    try {
      val path = Paths.get("spec/src/main/resources/META-INF/smithy/bsp/version")
      Files.readString(path).trim
    } catch {
      case e: Throwable =>
        throw new RuntimeException(
          "Failed to load the protocol version, make sure that the working directory is set correctly",
          e
        )
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy