kotlin-crawler-app-bom/build.gradle.kts
Oliver Rümpelein 3ee514ff7a
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline failed
Tiny changes to path.
2023-09-04 11:28:47 +02:00

86 lines
2 KiB
Text

val coroutinesVersion: String by project
val kotlinVersion: String by project
plugins {
`java-platform`
`maven-publish`
}
group = "de.pheerai"
version = "0.0.13-SNAPSHOT"
repositories {
mavenCentral()
google()
}
javaPlatform {
allowDependencies()
}
dependencies {
api(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion"))
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:$coroutinesVersion"))
api("org.jetbrains.kotlinx", "kotlinx-coroutines-core")
api("org.jetbrains.kotlinx", "kotlinx-coroutines-core-jvm")
api("com.github.ajalt.clikt", "clikt") {
version { cliktConstraints() }
}
api("org.jsoup", "jsoup") {
version { jsoupConstraints() }
}
api("org.jetbrains.kotlinx", "kotlinx-html-jvm") {
version { kotlinxHtmlConstraints() }
}
api("io.kotest", "kotest-runner-junit5-jvm") {
version { kotestConstraints() }
}
api("io.kotest", "kotest-assertions-core-jvm") {
version { kotestConstraints() }
}
}
publishing {
publications {
create<MavenPublication>("CrawlerBom") {
from(components["javaPlatform"])
}
}
repositories {
maven {
name = "Gitea"
url = uri("https://git.f3l.de/api/packages/pheerai/maven/")
credentials(HttpHeaderCredentials::class.java) {
name = "Authorization"
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
}
fun MutableVersionConstraint.kotestConstraints() {
prefer("5.7.1")
strictly("[5.0.0,6.0.0[")
}
fun MutableVersionConstraint.kotlinxHtmlConstraints() {
prefer("0.9.1")
strictly("[0.9.0,1.0.0[")
}
fun MutableVersionConstraint.jsoupConstraints() {
prefer("1.16.1")
strictly("[1.16.0,1.17.0[")
}
fun MutableVersionConstraint.cliktConstraints() {
prefer("4.2.0")
strictly("[4.0.0,5.0.0[")
}