Files
onixbyte-bom/version-catalogue/build.gradle.kts
T

112 lines
3.7 KiB
Kotlin
Raw Normal View History

2025-03-21 11:16:17 +08:00
/*
* Copyright (c) 2024-2025 OnixByte
2025-03-21 11:16:17 +08:00
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
2025-03-21 11:16:17 +08:00
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
2025-03-21 11:16:17 +08:00
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
2025-03-21 11:16:17 +08:00
*/
2025-03-21 11:16:17 +08:00
import java.net.URI
plugins {
id("java-platform")
id("maven-publish")
id("signing")
}
val artefactVersion: String by project
2025-03-21 11:22:07 +08:00
val projectUrl: String by project
val projectGithubUrl: String by project
val licenseName: String by project
val licenseUrl: String by project
2025-03-21 11:16:17 +08:00
repositories {
mavenCentral()
}
dependencies {
constraints {
api("com.onixbyte:common-toolbox:$artefactVersion")
api("com.onixbyte:identity-generator:$artefactVersion")
api("com.onixbyte:crypto-toolbox:$artefactVersion")
api("com.onixbyte:math-toolbox:$artefactVersion")
2026-01-28 14:07:32 +08:00
api("com.onixbyte:tuple:$artefactVersion")
2025-03-21 11:16:17 +08:00
}
}
publishing {
publications {
2025-06-17 17:40:21 +08:00
create<MavenPublication>("versionCatalogue") {
2025-03-21 11:16:17 +08:00
groupId = group.toString()
2025-06-17 17:40:21 +08:00
artifactId = "version-catalogue"
2025-03-21 11:16:17 +08:00
version = artefactVersion
pom {
2025-06-17 11:07:22 +08:00
name = "OnixByte Version Catalogue"
2025-06-17 11:02:19 +08:00
description = "OnixByte DevKit BOM is designed to manage dependency versions centrally."
2025-03-21 11:22:07 +08:00
url = projectUrl
2025-03-21 11:16:17 +08:00
licenses {
license {
2025-03-21 11:22:07 +08:00
name = licenseName
url = licenseUrl
2025-03-21 11:16:17 +08:00
}
}
scm {
2025-06-17 12:20:15 +08:00
connection = "scm:git:git://github.com:onixbyte/onixbyte-toolbox.git"
developerConnection = "scm:git:git://github.com:onixbyte/onixbyte-toolbox.git"
2025-03-21 11:22:07 +08:00
url = projectGithubUrl
2025-03-21 11:16:17 +08:00
}
developers {
developer {
id = "zihluwang"
name = "Zihlu Wang"
2025-05-22 13:43:34 +08:00
email = "really@zihlu.wang"
2025-03-21 11:16:17 +08:00
timezone = "Asia/Hong_Kong"
}
2025-05-22 13:43:34 +08:00
developer {
id = "siujamo"
name = "Siu Jam'o"
email = "jamo.siu@outlook.com"
timezone = "Asia/Shanghai"
}
2025-03-21 11:16:17 +08:00
}
}
from(components["javaPlatform"])
signing {
2025-06-17 17:40:21 +08:00
sign(publishing.publications["versionCatalogue"])
2025-03-21 11:16:17 +08:00
}
}
repositories {
maven {
name = "sonatypeNexus"
url = URI(providers.gradleProperty("repo.maven-central.host").get())
credentials {
username = providers.gradleProperty("repo.maven-central.username").get()
password = providers.gradleProperty("repo.maven-central.password").get()
}
}
}
}
2025-06-17 11:02:19 +08:00
}