Rename to crawler-app and change to version constraints

This commit is contained in:
Oliver Rümpelein 2021-02-21 13:59:17 +01:00
parent 12ec6116a0
commit e18088cd9b
2 changed files with 39 additions and 20 deletions

View file

@ -1,11 +1,7 @@
buildscript {
extra.apply {
set("coroutinesVersion", "1.4.1")
set("jsoupVersion", "1.13.1")
set("kotestVersion", "4.3.1")
set("kotlinxHtmlVersion", "0.7.2")
set("cliktVersion", "3.0.1")
set("kotlinVersion", "1.4.20")
set("kotlinVersion", "1.4.30")
}
}
@ -18,14 +14,8 @@ group = "de.pheerai"
version = "0.0.3-SNAPSHOT"
repositories {
jcenter()
mavenCentral()
mavenLocal {
mavenContent {
includeGroup("de.pheerai.eap")
includeGroup("de.pheerai")
}
}
google()
}
javaPlatform {
@ -38,18 +28,28 @@ dependencies {
api("org.jetbrains.kotlinx", "kotlinx-coroutines-core")
api("com.github.ajalt.clikt", "clikt", getFromExtra("cliktVersion"))
api("org.jsoup", "jsoup", getFromExtra("jsoupVersion"))
api("com.github.ajalt.clikt", "clikt") {
version { cliktConstraints() }
}
api("org.jsoup", "jsoup") {
version { jsoupConstraints() }
}
api("org.jetbrains.kotlinx", "kotlinx-html-jvm", getFromExtra("kotlinxHtmlVersion"))
api("org.jetbrains.kotlinx", "kotlinx-html-jvm") {
version { kotlinxHtmlConstraints() }
}
api("io.kotest", "kotest-runner-junit5-jvm", getFromExtra("kotestVersion"))
api("io.kotest", "kotest-assertions-core-jvm", getFromExtra("kotestVersion"))
api("io.kotest", "kotest-runner-junit5-jvm") {
version { kotestConstraints() }
}
api("io.kotest", "kotest-assertions-core-jvm") {
version { kotestConstraints() }
}
}
publishing {
publications {
create<MavenPublication>("NativeBom") {
create<MavenPublication>("CrawlerBom") {
from(components["javaPlatform"])
}
}
@ -57,3 +57,23 @@ publishing {
inline fun <reified T> getFromProperties(name: String): T = project.properties[name] as T
inline fun <reified T> getFromExtra(name: String): T = extra[name] as T
fun MutableVersionConstraint.kotestConstraints() {
prefer("4.3.1")
strictly("[4.3.0,4.4.0[")
}
fun MutableVersionConstraint.kotlinxHtmlConstraints() {
prefer("0.7.2")
strictly("[0.7.0,0.8.0[")
}
fun MutableVersionConstraint.jsoupConstraints() {
prefer("1.13.1")
strictly("[1.13.0,1.14.0[")
}
fun MutableVersionConstraint.cliktConstraints() {
prefer("3.0.1")
strictly("[3.0.0,3.1.0[")
}

View file

@ -1,2 +1 @@
rootProject.name = "kotlin-native-app-bom"
rootProject.name = "kotlin-crawler-app-bom"