use common plugin

This commit is contained in:
2025-12-13 00:49:46 +01:00
parent 1fbff53dbd
commit d0c130cb61
3 changed files with 14 additions and 26 deletions

View File

@@ -1,3 +1,6 @@
import com.infendro.plugin.infendro
import com.infendro.plugin.token
group = "com.infendro"
version = "1.1.0"
@@ -7,6 +10,7 @@ repositories {
}
plugins {
alias(libs.plugins.infendro)
alias(libs.plugins.kotlin)
id("maven-publish")
}
@@ -21,35 +25,12 @@ publishing {
publications {
create<MavenPublication>("JVM") {
from(components["java"])
groupId = group as String
groupId = project.group as String
artifactId = project.name
version = version
version = project.version as String
}
}
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"
infendro(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
}

View File

@@ -1,10 +1,12 @@
[versions]
infendro = "1.0.0"
kotlin = "2.2.10"
ktor = "3.2.3"
exposed = "0.61.0"
migration = "1.1.1"
[plugins]
infendro = { id = "com.infendro.plugin", version.ref = "infendro" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
[libraries]

View File

@@ -1 +1,6 @@
rootProject.name = "migration-ktor"
pluginManagement.repositories {
maven("https://git.infendro.com/api/packages/Infendro/maven")
mavenCentral()
}