mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
add junit platform launcher to gradle test build
commit_hash:0055419e432c1e4dd3b5c2d501f81b1f748aa540
This commit is contained in:
@@ -7,7 +7,10 @@ kotlin {
|
||||
jvmToolchain(17)
|
||||
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xjvm-default=all")
|
||||
freeCompilerArgs.addAll(
|
||||
"-Xjvm-default=all",
|
||||
"-Xannotation-default-target=param-property"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +37,7 @@ dependencies {
|
||||
implementation(libs.jackson.databind)
|
||||
implementation(libs.jackson.kotlin)
|
||||
|
||||
testImplementation(kotlin("test"))
|
||||
testRuntimeOnly(libs.bundles.junit.runtime)
|
||||
testImplementation(libs.bundles.junit.jupiter)
|
||||
testImplementation(libs.jsonAssert)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import divkit.dsl.scope.DivScope
|
||||
* Uses factory to create instance
|
||||
* if supplement is missing in [DivScope].
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T : Supplement> DivScope.supplement(
|
||||
key: SupplementKey<T>,
|
||||
factory: () -> T
|
||||
|
||||
@@ -20,7 +20,6 @@ dependencies {
|
||||
|
||||
implementation(libs.kotlin.stdlib)
|
||||
|
||||
testImplementation(libs.junit5.api)
|
||||
testImplementation(libs.junit5.params)
|
||||
testRuntimeOnly(libs.junit5.engine)
|
||||
testRuntimeOnly(libs.bundles.junit.runtime)
|
||||
testImplementation(libs.bundles.junit.jupiter)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ kotlin = "2.2.10"
|
||||
detekt = "1.23.8"
|
||||
jackson = "2.16.0"
|
||||
jsonAssert = "1.5.1"
|
||||
junit5 = "5.11.4"
|
||||
junit = "5.11.4"
|
||||
junit-platform = "1.11.4"
|
||||
|
||||
[libraries]
|
||||
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
|
||||
@@ -20,11 +21,16 @@ jackson-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin"
|
||||
|
||||
jsonAssert = { module = "org.skyscreamer:jsonassert", version.ref = "jsonAssert" }
|
||||
|
||||
junit5-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit5" }
|
||||
junit5-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit5" }
|
||||
junit5-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit5" }
|
||||
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
|
||||
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
|
||||
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }
|
||||
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junit-platform" }
|
||||
|
||||
nexusPublish = { module = "io.github.gradle-nexus:publish-plugin", version = "2.0.0" }
|
||||
|
||||
[plugins]
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
|
||||
[bundles]
|
||||
junit-runtime = [ "junit-platform-launcher", "junit-jupiter-engine" ]
|
||||
junit-jupiter = [ "junit-jupiter-api", "junit-jupiter-params" ]
|
||||
|
||||
@@ -33,6 +33,7 @@ dependencies {
|
||||
implementation(libs.jackson.databind)
|
||||
implementation(libs.jackson.kotlin)
|
||||
|
||||
testImplementation(kotlin("test"))
|
||||
testRuntimeOnly(libs.bundles.junit.runtime)
|
||||
testImplementation(libs.bundles.junit.jupiter)
|
||||
testImplementation(libs.jsonAssert)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ tasks.test {
|
||||
dependencies {
|
||||
compileOnly(libs.detekt.api)
|
||||
|
||||
testImplementation(kotlin("test"))
|
||||
testRuntimeOnly(libs.bundles.junit.runtime)
|
||||
testImplementation(libs.bundles.junit.jupiter)
|
||||
testImplementation(libs.assertj.core)
|
||||
testImplementation(libs.detekt.test)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user