From a4c425bb2a3481460018dd9d71bf39d48dc72add Mon Sep 17 00:00:00 2001 From: Brian Norman Date: Sat, 29 Aug 2020 19:13:52 -0500 Subject: [PATCH] Prepare for release 0.5.0 --- CHANGELOG.md | 6 ++++ README.md | 29 ++++++++++++++----- build.gradle.kts | 2 +- .../bnorm/power/PowerAssertGradlePlugin.kt | 4 +-- sample/build.gradle.kts | 2 +- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cbb7155aac..a25a7ed2aa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Change Log ========== +## Version 0.5.0 + +_2020-08-29_ + + * Support for Kotlin/Native. + ## Version 0.4.0 _2020-08-21_ diff --git a/README.md b/README.md index 7c2a2339029..0b24c620fa0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ Kotlin Compiler Plugin which high-jacks Kotlin assert function calls and transforms them similar to [Groovy's Power Assert feature][groovy-power-assert]. -This plugin uses the new IR backend for the Kotlin compiler. +This plugin uses the IR backend for the Kotlin compiler and supports all +platforms: JVM, JS, and Native! ## Example @@ -75,7 +76,7 @@ Builds of the Gradle plugin are available through the ```kotlin plugins { kotlin("jvm") version "1.4.0" - id("com.bnorm.power.kotlin-power-assert") version "0.4.0" + id("com.bnorm.power.kotlin-power-assert") version "0.5.0" } ``` @@ -93,16 +94,28 @@ configure { ## Kotlin IR Using this compiler plugin only works if the code is compiled using Kotlin -1.4.0 and IR is enabled. IR can be enabled only when compiling the test -SourceSet if desired. As Kotlin IR is still experimental, mileage may vary. +1.4.0 and IR is enabled. This includes all IR based compiler backends: JVM, JS, +and Native! As Kotlin IR is still experimental, mileage may vary. +##### Kotlin/JVM ```kotlin -compileTestKotlin { - kotlinOptions { - useIR = true - } +tasks.withType().configureEach { + kotlinOptions { + useIR = true + } } ``` +##### Kotlin/JS +```kotlin +target { + js(IR) { + } +} +``` + +##### Kotlin/Native +IR already enabled by default! + [groovy-power-assert]: https://groovy-lang.org/testing.html#_power_assertions [kotlin-power-assert-gradle]: https://plugins.gradle.org/plugin/com.bnorm.power.kotlin-power-assert diff --git a/build.gradle.kts b/build.gradle.kts index 301781246c0..8c36993fc4c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { allprojects { group = "com.bnorm.power" - version = "0.5.0-SNAPSHOT" + version = "0.5.0" } subprojects { diff --git a/kotlin-power-assert-gradle/src/main/kotlin/com/bnorm/power/PowerAssertGradlePlugin.kt b/kotlin-power-assert-gradle/src/main/kotlin/com/bnorm/power/PowerAssertGradlePlugin.kt index f6ab7d31a1d..3f1f6a39734 100644 --- a/kotlin-power-assert-gradle/src/main/kotlin/com/bnorm/power/PowerAssertGradlePlugin.kt +++ b/kotlin-power-assert-gradle/src/main/kotlin/com/bnorm/power/PowerAssertGradlePlugin.kt @@ -35,13 +35,13 @@ class PowerAssertGradlePlugin : KotlinCompilerPluginSupportPlugin { override fun getPluginArtifact(): SubpluginArtifact = SubpluginArtifact( groupId = "com.bnorm.power", artifactId = "kotlin-power-assert-plugin", - version = "0.5.0-SNAPSHOT" + version = "0.5.0" ) override fun getPluginArtifactForNative(): SubpluginArtifact = SubpluginArtifact( groupId = "com.bnorm.power", artifactId = "kotlin-power-assert-plugin-native", - version = "0.5.0-SNAPSHOT" + version = "0.5.0" ) override fun applyToCompilation( diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index 8763fa65aa7..2a0d11848e5 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("multiplatform") version "1.4.0" - id("com.bnorm.power.kotlin-power-assert") version "0.4.0" + id("com.bnorm.power.kotlin-power-assert") version "0.5.0" } repositories {