63 lines
1.6 KiB
Kotlin
63 lines
1.6 KiB
Kotlin
import java.lang.System.getenv
|
|
|
|
plugins {
|
|
`version-catalog`
|
|
`maven-publish`
|
|
}
|
|
|
|
description = "Lulz Version Catalog"
|
|
group = "ltd.lulz.catalog"
|
|
|
|
catalog.versionCatalog {
|
|
from(files("versions-catalog.toml"))
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
|
|
fun retrieveConfiguration(
|
|
property: String,
|
|
environment: String,
|
|
): String? = project.findProperty(property)?.toString() ?: getenv(environment)
|
|
|
|
maven {
|
|
url = uri("https://gitea.lulz.ltd/api/packages/aura-ascend/maven")
|
|
name = "GiteaPackages"
|
|
credentials {
|
|
username = retrieveConfiguration("repository.gitea.user", "REPOSITORY_USER")
|
|
password = retrieveConfiguration("repository.gitea.token", "REPOSITORY_TOKEN")
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
create<MavenPublication>(project.name) {
|
|
groupId = "$group"
|
|
artifactId = project.name
|
|
version = version
|
|
from(components["versionCatalog"])
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks {
|
|
named("publishToMavenLocal") {
|
|
dependsOn("buildInfo")
|
|
}
|
|
register("clean") {
|
|
group = "build"
|
|
doLast {
|
|
delete("${rootDir.path}/build")
|
|
println("Default Cleaning!")
|
|
}
|
|
}
|
|
register("buildInfo") {
|
|
group = "lulz"
|
|
description = "Prints the project name and version"
|
|
val projectName = project.name
|
|
val projectVersion = project.version
|
|
doLast {
|
|
println("Project Name: $projectName Version: $projectVersion")
|
|
}
|
|
}
|
|
}
|