From 90ed60b5ace5a5268722f50ac45306fedb8a6ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Petu=C5=A1ka?= Date: Wed, 13 Oct 2021 14:56:40 +0100 Subject: [PATCH] fix Any? assertions --- CHANGELOG.md | 9 +++++++++ README.md | 2 +- buildSrc/settings.gradle.kts | 2 +- library/klip-api/src/commonMain/kotlin/assertKlip.kt | 5 +++-- settings.gradle.kts | 4 ++-- versions.properties | 12 ++++++------ 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2b4605a..9422bd52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 0.2.2 +## Versions +* Kotlin: `1.5.31` +* Gradle: `7.2.0` +* JDK: `11` +## Changes +* Fix assertion functions to properly compare `Any?::toString()` representations +* Bump kotlin version to `1.5.31` + # 0.2.1 ## Versions * Kotlin: `1.5.30` diff --git a/README.md b/README.md index b9163405..eac15da4 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ JS that still defaults to legacy compiler). The current version was built using the following tooling versions and is guaranteed to work with this setup. Given the experimental nature of kotlin compiler plugin API, the plugin powering this library is likely to stop working on projects using newer/older kotlin versions. -* Kotlin: `1.5.30` +* Kotlin: `1.5.31` * Gradle: `7.2.0` * JDK: `11` diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index c9a03a09..d61f7fc0 100644 --- a/buildSrc/settings.gradle.kts +++ b/buildSrc/settings.gradle.kts @@ -4,7 +4,7 @@ pluginManagement { mavenCentral() } plugins { - id("de.fayard.refreshVersions") version "0.20.0" + id("de.fayard.refreshVersions") version "0.23.0" } } diff --git a/library/klip-api/src/commonMain/kotlin/assertKlip.kt b/library/klip-api/src/commonMain/kotlin/assertKlip.kt index 4e300494..0e40aec7 100644 --- a/library/klip-api/src/commonMain/kotlin/assertKlip.kt +++ b/library/klip-api/src/commonMain/kotlin/assertKlip.kt @@ -14,8 +14,9 @@ import kotlin.test.assertEquals @Klippable public fun assertMatchesKlip(actual: Any?, _context: KlipContext? = null) { _context.validate() - val klip = KlipManager.klip(_context) { actual.toString() } - assertEquals(klip, actual, "Value does not match its klip") + val actualStr = actual.toString() + val klip = KlipManager.klip(_context) { actualStr } + assertEquals(klip, actualStr, "Value does not match its klip") } /** diff --git a/settings.gradle.kts b/settings.gradle.kts index 64a571d5..56e0e171 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -6,8 +6,8 @@ pluginManagement { } plugins { - id("de.fayard.refreshVersions") version "0.21.0" - id("com.gradle.enterprise") version "3.6.4" + id("de.fayard.refreshVersions") version "0.23.0" + id("com.gradle.enterprise") version "3.7" } rootProject.name = "klip" diff --git a/versions.properties b/versions.properties index 806a7855..0ce552b5 100644 --- a/versions.properties +++ b/versions.properties @@ -1,25 +1,25 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.20.0 +#### Generated by `./gradlew refreshVersions` version 0.21.0 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. #### #### suppress inspection "SpellCheckingInspection" for whole file #### suppress inspection "UnusedProperty" for whole file -plugin.android=4.2.0 +plugin.android=4.2.2 #======================================= Plugins ======================================== -plugin.com.gradle.plugin-publish=0.15.0 +plugin.com.gradle.plugin-publish=0.16.0 plugin.com.github.jakemarsden.git-hooks=0.0.2 plugin.org.jlleitschuh.gradle.ktlint=10.1.0 version.org.jlleitschuh.gradle..ktlint-gradle=10.2.0 -version.org.jetbrains.dokka..dokka-gradle-plugin=1.5.0 +version.org.jetbrains.dokka..dokka-gradle-plugin=1.5.31 version.com.github.gmazzo..gradle-buildconfig-plugin=3.0.3 version.io.github.gradle-nexus..publish-plugin=1.1.0 version.kotest=5.0.0.5 version.ktlint=0.42.1 #====================================== Libraries ======================================= -version.com.github.tschuchortdev..kotlin-compile-testing=1.4.4 +version.com.github.tschuchortdev..kotlin-compile-testing=1.4.5 version.com.google.auto.service..auto-service=1.0 version.com.google.auto.service..auto-service-annotations=1.0 -version.kotlin=1.5.30 +version.kotlin=1.5.31 version.kotlinx.coroutines=1.5.1