Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 JetBrains s.r.o. and respective authors and developers.
* Copyright 2017-2025 JetBrains s.r.o. and respective authors and developers.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
*/

Expand All @@ -13,6 +13,7 @@ repositories {

dependencies {
implementation(libs.kotlin.gradle.plugin)
implementation(libs.power.assert.plugin)
implementation(libs.dokka.gradle.plugin)
implementation(libs.animalsniffer.gradle.plugin)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2024 JetBrains s.r.o. and respective authors and developers.
* Copyright 2017-2025 JetBrains s.r.o. and respective authors and developers.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
*/

Expand All @@ -13,6 +13,7 @@ import kotlin.jvm.optionals.getOrNull

plugins {
kotlin("multiplatform")
kotlin("plugin.power-assert")
id("kotlinx-io-clean")
}

Expand Down Expand Up @@ -125,6 +126,24 @@ kotlin {
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
powerAssert {
// assertFails* are not included as p-a does not help with them yet
val kotlinTestFunctions = listOf(
"assertTrue", "assertFalse",
"assertNull", "assertNotNull",
"assertSame", "assertNotSame",
"assertEquals", "assertNotEquals",
"assertIs", "assertIsNot",
"assertIsOfType", "assertIsNotOfType",
"assertContains",
"assertContentEquals",
"expect"
).map { "kotlin.test.$it"}

functions.addAll(kotlinTestFunctions)
}

fun KotlinSourceSet.configureSourceSet() {
val srcDir = if (name.endsWith("Main")) "src" else "test"
val platform = name.dropLast(4)
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ okio = "3.10.2"
kotlinx-benchmark-runtime = { group = "org.jetbrains.kotlinx", name = "kotlinx-benchmark-runtime", version.ref = "benchmark" }
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
dokka-gradle-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokka" }
power-assert-plugin = { group = "org.jetbrains.kotlin.plugin.power-assert", name = "org.jetbrains.kotlin.plugin.power-assert.gradle.plugin", version.ref = "kotlin" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
animalsniffer-gradle-plugin = { group = "ru.vyarus", name = "gradle-animalsniffer-plugin", version.ref = "animalsniffer" }
okio = { group = "com.squareup.okio", name = "okio", version.ref = "okio" }

[plugins]

dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
power-assert = { id = "org.jetbrains.kotlin.plugin.power-assert", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
kotlinx-benchmark-plugin = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "benchmark"}