initial commit

This commit is contained in:
zaneschepke
2026-02-03 06:40:04 -05:00
commit 478aef6952
185 changed files with 11241 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
plugins {
`kotlin-dsl` // enable the Kotlin-DSL
}
repositories {
gradlePluginPortal()
mavenCentral()
google()
}
dependencies {
implementation("org.apache.commons:commons-lang3:3.20.0")
}
+1
View File
@@ -0,0 +1 @@
rootProject.name = "buildSrc"
@@ -0,0 +1,19 @@
import java.io.File
import java.io.FileInputStream
import java.util.*
object LocalProperties {
private val properties by lazy {
val props = Properties()
val file = File("local.properties")
if (file.exists()) {
FileInputStream(file).use { props.load(it) }
}
props
}
fun get(key: String): String? = properties.getProperty(key)
fun getOrDefault(key: String, default: String): String = properties.getProperty(key, default)
}
+5
View File
@@ -0,0 +1,5 @@
object SystemVar {
fun fromEnvironment(envVar : String) : String? {
return System.getenv(envVar)
}
}
+38
View File
@@ -0,0 +1,38 @@
import org.gradle.api.Project
import org.gradle.api.tasks.Exec
import org.gradle.kotlin.dsl.register
fun Project.registerConveyorTask(
taskName: String,
packageType: String,
subDir: String,
) {
tasks.register<Exec>(taskName) {
group = "distribution"
val outputDir = layout.buildDirectory.dir("conveyor/$subDir")
outputs.dir(outputDir)
environment(
"CONVEYOR_PASSPHRASE",
SystemVar.fromEnvironment("CONVEYOR_PASSPHRASE") ?: LocalProperties.get("conveyor.passphrase") ?: ""
)
val args = mutableListOf(
"conveyor",
"--passphrase=env:CONVEYOR_PASSPHRASE",
"make",
"--output-dir", outputDir.get().asFile.absolutePath,
packageType
)
commandLine(args)
dependsOn(
":composeApp:createDistributable",
":cli:installDist",
":daemon:installDist",
":composeApp:writeConveyorConfig"
)
}
}