This repository was archived by the owner on Jun 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +31
-12
lines changed
kotlin-power-assert-gradle/src/main/kotlin/com/bnorm/power Expand file tree Collapse file tree 5 files changed +31
-12
lines changed Original file line number Diff line number Diff line change 1
1
Change Log
2
2
==========
3
3
4
+ ## Version 0.5.0
5
+
6
+ _ 2020-08-29_
7
+
8
+ * Support for Kotlin/Native.
9
+
4
10
## Version 0.4.0
5
11
6
12
_ 2020-08-21_
Original file line number Diff line number Diff line change 4
4
5
5
Kotlin Compiler Plugin which high-jacks Kotlin assert function calls and
6
6
transforms them similar to [ Groovy's Power Assert feature] [ groovy-power-assert ] .
7
- This plugin uses the new IR backend for the Kotlin compiler.
7
+ This plugin uses the IR backend for the Kotlin compiler and supports all
8
+ platforms: JVM, JS, and Native!
8
9
9
10
## Example
10
11
@@ -75,7 +76,7 @@ Builds of the Gradle plugin are available through the
75
76
``` kotlin
76
77
plugins {
77
78
kotlin(" jvm" ) version " 1.4.0"
78
- id(" com.bnorm.power.kotlin-power-assert" ) version " 0.4 .0"
79
+ id(" com.bnorm.power.kotlin-power-assert" ) version " 0.5 .0"
79
80
}
80
81
```
81
82
@@ -93,16 +94,28 @@ configure<com.bnorm.power.PowerAssertGradleExtension> {
93
94
## Kotlin IR
94
95
95
96
Using this compiler plugin only works if the code is compiled using Kotlin
96
- 1.4.0 and IR is enabled. IR can be enabled only when compiling the test
97
- SourceSet if desired. As Kotlin IR is still experimental, mileage may vary.
97
+ 1.4.0 and IR is enabled. This includes all IR based compiler backends: JVM, JS,
98
+ and Native! As Kotlin IR is still experimental, mileage may vary.
98
99
100
+ ##### Kotlin/JVM
99
101
``` kotlin
100
- compileTestKotlin {
101
- kotlinOptions {
102
- useIR = true
103
- }
102
+ tasks.withType< KotlinCompile >().configureEach {
103
+ kotlinOptions {
104
+ useIR = true
105
+ }
104
106
}
105
107
```
106
108
109
+ ##### Kotlin/JS
110
+ ``` kotlin
111
+ target {
112
+ js(IR ) {
113
+ }
114
+ }
115
+ ```
116
+
117
+ ##### Kotlin/Native
118
+ IR already enabled by default!
119
+
107
120
[ groovy-power-assert ] : https://groovy-lang.org/testing.html#_power_assertions
108
121
[ kotlin-power-assert-gradle ] : https://plugins.gradle.org/plugin/com.bnorm.power.kotlin-power-assert
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ plugins {
6
6
7
7
allprojects {
8
8
group = " com.bnorm.power"
9
- version = " 0.5.0-SNAPSHOT "
9
+ version = " 0.5.0"
10
10
}
11
11
12
12
subprojects {
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ class PowerAssertGradlePlugin : KotlinCompilerPluginSupportPlugin {
35
35
override fun getPluginArtifact (): SubpluginArtifact = SubpluginArtifact (
36
36
groupId = " com.bnorm.power" ,
37
37
artifactId = " kotlin-power-assert-plugin" ,
38
- version = " 0.5.0-SNAPSHOT "
38
+ version = " 0.5.0"
39
39
)
40
40
41
41
override fun getPluginArtifactForNative (): SubpluginArtifact = SubpluginArtifact (
42
42
groupId = " com.bnorm.power" ,
43
43
artifactId = " kotlin-power-assert-plugin-native" ,
44
- version = " 0.5.0-SNAPSHOT "
44
+ version = " 0.5.0"
45
45
)
46
46
47
47
override fun applyToCompilation (
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
kotlin(" multiplatform" ) version " 1.4.0"
3
- id(" com.bnorm.power.kotlin-power-assert" ) version " 0.4 .0"
3
+ id(" com.bnorm.power.kotlin-power-assert" ) version " 0.5 .0"
4
4
}
5
5
6
6
repositories {
You can’t perform that action at this time.
0 commit comments