Hideout/owl/build.gradle.kts

72 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

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")
}
allprojects {
group = "dev.usbharu"
2024-08-10 08:01:26 +00:00
version = "0.0.2-SNAPSHOT"
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") }
}
}
subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
2024-08-10 03:18:52 +00:00
plugin("maven-publish")
}
kotlin {
jvmToolchain(21)
}
dependencies {
implementation("org.slf4j:slf4j-api:2.0.15")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.3")
}
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) {
2024-08-10 03:18:52 +00:00
name = "Authorization"
value = "token " + (project.findProperty("gpr.gitea") as String? ?: System.getenv("GITEA"))
}
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"])
}
}
}
}