2024-03-09 12:37:38 +01:00
|
|
|
import io.gitlab.jfronny.scripts.*
|
|
|
|
|
2022-11-01 18:55:17 +01:00
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
`maven-publish`
|
2024-03-09 12:37:38 +01:00
|
|
|
jf.umldoc
|
2022-11-01 18:55:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
version = rootProject.version
|
|
|
|
|
2024-03-09 12:37:38 +01:00
|
|
|
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
|
|
|
2022-11-01 18:55:17 +01:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-11-03 15:23:59 +01:00
|
|
|
maven("https://maven.frohnmeyer-wds.de/artifacts/")
|
2022-11-01 18:55:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-03-09 12:37:38 +01:00
|
|
|
compileOnly(libs.findLibrary("annotations").orElseThrow())
|
2022-11-01 18:55:17 +01:00
|
|
|
|
2024-03-09 12:37:38 +01:00
|
|
|
testImplementation(libs.findLibrary("junit-jupiter-api").orElseThrow())
|
|
|
|
testRuntimeOnly(libs.findLibrary("junit-jupiter-engine").orElseThrow())
|
2022-11-01 18:55:17 +01:00
|
|
|
}
|
|
|
|
|
2023-07-06 15:39:07 +02:00
|
|
|
tasks.test {
|
2022-11-01 18:55:17 +01:00
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
|
|
|
|
if (project.hasProperty("maven")) {
|
|
|
|
maven {
|
|
|
|
url = uri(project.property("maven").toString())
|
|
|
|
name = "dynamic"
|
|
|
|
|
|
|
|
credentials(PasswordCredentials::class) {
|
|
|
|
username = System.getenv()["MAVEN_NAME"]
|
|
|
|
password = System.getenv()["MAVEN_TOKEN"]
|
|
|
|
}
|
|
|
|
authentication {
|
|
|
|
create<BasicAuthentication>("basic")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-09 12:37:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.javadoc {
|
|
|
|
opts.links("https://javadoc.io/doc/org.jetbrains/annotations/${libs.findVersion("annotations").orElseThrow().preferredVersion}")
|
2022-11-01 18:55:17 +01:00
|
|
|
}
|