2024-04-30 09:42:41 +00:00
|
|
|
plugins {
|
2024-07-29 07:26:41 +00:00
|
|
|
alias(libs.plugins.kotlin.jvm)
|
2024-08-10 03:18:52 +00:00
|
|
|
id("maven-publish")
|
2024-04-30 09:42:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
group = "dev.usbharu"
|
|
|
|
version = "0.0.1"
|
|
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-10 03:18:52 +00:00
|
|
|
tasks {
|
|
|
|
create("publishMavenPublicationToMavenLocal") {
|
|
|
|
subprojects.forEach { dependsOn("${it.path}:publishMavenPublicationToMavenLocal") }
|
|
|
|
}
|
|
|
|
create("publishMavenPublicationToGiteaRepository") {
|
|
|
|
subprojects.forEach { dependsOn("${it.path}:publishMavenPublicationToGiteaRepository") }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-30 09:42:41 +00:00
|
|
|
subprojects {
|
|
|
|
apply {
|
|
|
|
plugin("org.jetbrains.kotlin.jvm")
|
2024-08-10 03:18:52 +00:00
|
|
|
plugin("maven-publish")
|
2024-04-30 09:42:41 +00:00
|
|
|
}
|
|
|
|
kotlin {
|
2024-07-29 06:37:28 +00:00
|
|
|
jvmToolchain(21)
|
2024-04-30 09:42:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-08-08 15:38:36 +00:00
|
|
|
implementation("org.slf4j:slf4j-api:2.0.15")
|
2024-06-28 08:51:52 +00:00
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.10.3")
|
2024-04-30 09:42:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
2024-08-10 03:18:52 +00:00
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "Gitea"
|
|
|
|
url = uri("https://git.usbharu.dev/api/packages/usbharu/maven")
|
|
|
|
|
|
|
|
credentials(HttpHeaderCredentials::class.java) {
|
|
|
|
name = "Authorization"
|
|
|
|
value = "token " + (project.findProperty("gpr.gitea") as String? ?: System.getenv("GITEA"))
|
|
|
|
}
|
2024-04-30 09:42:41 +00:00
|
|
|
|
2024-08-10 03:18:52 +00:00
|
|
|
authentication {
|
|
|
|
create<HttpHeaderAuthentication>("header")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publications {
|
|
|
|
register<MavenPublication>("maven") {
|
|
|
|
groupId = "dev.usbharu"
|
|
|
|
artifactId = project.name
|
|
|
|
version = project.version.toString()
|
|
|
|
from(components["kotlin"])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-04-30 09:42:41 +00:00
|
|
|
}
|