initial commit
All checks were successful
/ publish (push) Successful in 1m48s

This commit is contained in:
2025-08-31 10:45:25 +02:00
commit b1faa48c97
13 changed files with 701 additions and 0 deletions

53
build.gradle.kts Normal file
View File

@@ -0,0 +1,53 @@
group = "com.infendro"
version = "1.0.0"
repositories {
mavenCentral()
}
plugins {
alias(libs.plugins.kotlin)
id("maven-publish")
}
dependencies {
implementation(libs.exposed)
implementation(libs.exposed.dao)
}
publishing {
publications {
create<MavenPublication>("JVM") {
from(components["java"])
groupId = group as String
artifactId = project.name
version = version
}
}
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
}