56 lines
1.2 KiB
Kotlin
56 lines
1.2 KiB
Kotlin
group = "com.infendro"
|
|
version = "1.0.2"
|
|
|
|
repositories {
|
|
maven("https://git.infendro.com/api/packages/Infendro/maven")
|
|
mavenCentral()
|
|
}
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin)
|
|
id("maven-publish")
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.ktor.server)
|
|
implementation(libs.exposed)
|
|
implementation(libs.migration)
|
|
}
|
|
|
|
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
|
|
}
|