Skip to content

Commit

Permalink
Moved power assert support to buildlogic.kotlin-library-conventions.g…
Browse files Browse the repository at this point in the history
…radle.kts
  • Loading branch information
jlink committed Dec 14, 2024
1 parent a4e653d commit 111b621
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ kotlin = '2.0.21'
apiguardian = { module = "org.apiguardian:apiguardian-api", version.ref = "apiguardian" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertJ" }
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlin-test-junit5 = { module = "org.jetbrains.kotlin:kotlin-test-junit5", version.ref = "kotlin" }
# Used in gradle plugins build.gradle.kts:
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-powerAssertPlugin = { module = "org.jetbrains.kotlin:kotlin-power-assert", version.ref = "kotlin" }
2 changes: 1 addition & 1 deletion gradle/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ repositories {

dependencies {
implementation(libs.kotlin.gradlePlugin)
implementation(libs.kotlin.stdlib)
implementation(libs.kotlin.powerAssertPlugin)
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`java-library`
id("buildlogic.publish-library")
id("kotlin")
kotlin("plugin.power-assert")
}

repositories {
Expand All @@ -14,6 +16,11 @@ repositories {
}
}

@OptIn(ExperimentalKotlinGradlePluginApi::class)
powerAssert {
functions = listOf("kotlin.assert", "kotlin.test.assertTrue", "kotlin.test.assertEquals", "kotlin.test.assertNull")
}

dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
Expand Down
1 change: 0 additions & 1 deletion kotlin-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("buildlogic.kotlin-library-conventions")
kotlin("plugin.power-assert") version libs.versions.kotlin
}

description = "Jqwik2 Kotlin core support"
Expand Down

0 comments on commit 111b621

Please sign in to comment.