commonMain.community.flock.wirespec.plugin.CompilerArguments.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arguments Show documentation
Show all versions of arguments Show documentation
Type safe wires made easy
package community.flock.wirespec.plugin
import community.flock.wirespec.compiler.core.Value
import community.flock.wirespec.compiler.utils.Logger
import kotlin.jvm.JvmInline
data class CompilerArguments(
val operation: Operation,
val input: Input,
val output: Output?,
val languages: Set,
val packageName: PackageName,
val logLevel: Logger.Level,
val shared: Boolean,
val strict: Boolean,
)
sealed interface Operation {
data object Compile : Operation
data class Convert(val format: Format) : Operation
}
@JvmInline
value class PackageName(override val value: String) : Value
fun PackageName?.toDirectory() = let { (it)?.value }
?.split(".")
?.joinToString("/")
?: ""