devlok/build.gradle.kts

83 lines
2.1 KiB
Plaintext

import org.gradle.api.credentials.PasswordCredentials
plugins {
id("java-library")
id("maven-publish")
alias(libs.plugins.shadow)
}
allprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "com.gradleup.shadow")
group = "de.weapie"
version = "2026.11.06-01"
repositories {
mavenCentral()
}
dependencies {
compileOnly(rootProject.libs.lombok)
annotationProcessor(rootProject.libs.lombok)
compileOnlyApi(rootProject.libs.annotations)
testAnnotationProcessor(rootProject.libs.lombok)
testCompileOnly(rootProject.libs.lombok)
testImplementation(platform(rootProject.libs.junit.bom))
testImplementation(rootProject.libs.junit.jupiter)
testRuntimeOnly(rootProject.libs.junit.launcher)
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
tasks.withType<JavaCompile> {
options.release.set(17)
options.encoding = "UTF-8"
options.isIncremental = true
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
publishing {
repositories {
maven {
name = "repo"
url = uri("https://repo.jf.home/private")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = "${project.name}"
version = "${project.version}"
from(components["java"])
}
}
}
tasks.shadowJar {
archiveClassifier.set("all")
filesMatching("META-INF/services/**") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
mergeServiceFiles()
exclude("META-INF/*.SF", "META-INF/*.RSA", "META-INF/*.DSA")
}
}