initial commit

This commit is contained in:
2025-07-19 18:50:48 +02:00
commit 194ee0658a
9 changed files with 572 additions and 0 deletions

56
build.gradle.kts Normal file
View File

@@ -0,0 +1,56 @@
group = "com.infendro"
version = "1.0.0"
repositories {
maven("https://git.infendro.com/api/packages/Infendro/maven")
mavenCentral()
}
plugins {
alias(libs.plugins.multiplatform)
id("maven-publish")
}
kotlin {
jvm()
js {
nodejs()
}
linuxX64()
sourceSets {
commonMain.dependencies {
implementation(libs.mac)
implementation(libs.hash)
}
}
}
publishing {
repositories {
maven {
url = uri("https://git.infendro.com/api/packages/Infendro/maven")
authentication.create("header", HttpHeaderAuthentication::class)
credentials(HttpHeaderCredentials::class) {
val token = secret("git.token") ?: throw GradleException()
name = "Authorization"
value = "token $token"
}
}
}
}
fun secret(
key: String,
): String? {
val property = key
val environment = key
.uppercase()
.replace(".", "__")
val prop = properties[property] as String?
val env = System.getenv(environment)
return prop ?: env
}