Skip to content

Commit 09d4ea3

Browse files
committed
Merge branch 'release/0.0.6'
2 parents c0db8ec + 1d353b8 commit 09d4ea3

File tree

66 files changed

+331
-106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+331
-106
lines changed

_build/parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.toolisticon.kotlin.generation._</groupId>
77
<artifactId>kotlin-code-generation-root</artifactId>
8-
<version>0.0.5</version>
8+
<version>0.0.6</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111

_build/report-generator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.toolisticon.kotlin.generation._</groupId>
77
<artifactId>kotlin-code-generation-parent</artifactId>
8-
<version>0.0.5</version>
8+
<version>0.0.6</version>
99
<relativePath>../parent/pom.xml</relativePath>
1010
</parent>
1111

_itest/builder-itest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.toolisticon.kotlin.generation._</groupId>
77
<artifactId>kotlin-code-generation-itest-root</artifactId>
8-
<version>0.0.5</version>
8+
<version>0.0.6</version>
99
</parent>
1010

1111
<groupId>io.toolisticon.kotlin.generation.itest</groupId>

_itest/builder-itest/src/test/kotlin/KotlinDataClassSpecITest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@file:OptIn(ExperimentalKotlinPoetApi::class, ExperimentalCompilerApi::class, ExperimentalKotlinPoetApi::class)
21

32
package io.toolisticon.kotlin.generation.itest
43

@@ -16,6 +15,7 @@ import org.junit.jupiter.api.Test
1615
import kotlin.reflect.full.primaryConstructor
1716
import io.toolisticon.kotlin.generation.test.KotlinCodeGenerationTest.assertThat as compileAssertThat
1817

18+
@OptIn(ExperimentalKotlinPoetApi::class, ExperimentalCompilerApi::class)
1919
internal class KotlinDataClassSpecITest {
2020

2121
@Test

_itest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.toolisticon.kotlin.generation._</groupId>
77
<artifactId>kotlin-code-generation-parent</artifactId>
8-
<version>0.0.5</version>
8+
<version>0.0.6</version>
99
<relativePath>../_build/parent/pom.xml</relativePath>
1010
</parent>
1111

_itest/spi-itest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.toolisticon.kotlin.generation._</groupId>
77
<artifactId>kotlin-code-generation-itest-root</artifactId>
8-
<version>0.0.5</version>
8+
<version>0.0.6</version>
99
</parent>
1010

1111
<groupId>io.toolisticon.kotlin.generation.itest</groupId>

kotlin-code-generation-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.toolisticon.kotlin.generation._</groupId>
77
<artifactId>kotlin-code-generation-root</artifactId>
8-
<version>0.0.5</version>
8+
<version>0.0.6</version>
99
</parent>
1010

1111
<groupId>io.toolisticon.kotlin.generation</groupId>

kotlin-code-generation-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.toolisticon.kotlin.generation._</groupId>
77
<artifactId>kotlin-code-generation-parent</artifactId>
8-
<version>0.0.5</version>
8+
<version>0.0.6</version>
99
<relativePath>../_build/parent/pom.xml</relativePath>
1010
</parent>
1111

kotlin-code-generation-test/src/main/kotlin/model/KotlinCompilationCommand.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ data class KotlinCompilationCommand(
1919

2020
operator fun plus(fileSpec: KotlinFileSpec) = copy(fileSpecs = fileSpecs + fileSpec)
2121

22-
2322
val sourceFiles: List<SourceFile> by lazy { fileSpecs.map { it.sourceFile() } }
2423
}

kotlin-code-generation-test/src/main/kotlin/model/KotlinCompilationResult.kt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ data class KotlinCompilationResult(
3131
}
3232
}
3333

34+
/**
35+
* List all generated files
36+
*/
37+
val generatedSources: List<String> by lazy {
38+
result.messages.lines()
39+
.filter { line -> line.endsWith(".kt") }
40+
.distinct().sorted()
41+
.map { "file://$it" }
42+
}
43+
3444
fun loadClass(className: ClassName): KClass<out Any> = result.classLoader.loadClass(className.canonicalName).kotlin
3545

3646
fun shouldBeOk() {
@@ -39,5 +49,12 @@ data class KotlinCompilationResult(
3949
.isEqualTo(KotlinCompilation.ExitCode.OK)
4050
}
4151

42-
override fun toString() = "${this::class.simpleName}(cmd=$cmd, exitCode=$exitCode, errors=$errors)"
52+
override fun toString() = toString(false)
53+
fun toString(includeCommand: Boolean) = "${this::class.simpleName}(" +
54+
if (includeCommand) {
55+
"cmd=$cmd, "
56+
} else {
57+
""
58+
} +
59+
"exitCode=$exitCode, errors=$errors, generatedSources=$generatedSources)"
4360
}

0 commit comments

Comments
 (0)