Skip to content

Commit 1efdae8

Browse files
Add a few badges to readme
1 parent 9dac7f6 commit 1efdae8

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Kotlin Compile Testing
2+
3+
[![](https://jitpack.io/v/tschuchortdev/kotlin-compile-testing.svg)](https://jitpack.io/#tschuchortdev/kotlin-compile-testing)
4+
![GitHub](https://img.shields.io/github/license/tschuchortdev/kotlin-compile-testing.svg?color=green&style=popout)
5+
![Maintenance](https://img.shields.io/maintenance/yes/2019.svg?style=popout)
6+
[![Generic badge](https://img.shields.io/badge/contributions-welcome-green.svg)](https://shields.io/)
7+
28
A library for in-process compilation of Kotlin and Java code, in the spirit of [Google Compile Testing](https://github.com/google/compile-testing). For example, you can use this library to test your annotation processors or run Kotlin-script files.
39

410
## Use Cases
@@ -9,7 +15,9 @@ A library for in-process compilation of Kotlin and Java code, in the spirit of [
915

1016
## Example
1117

12-
```kotlin
18+
Create sources
19+
20+
```Kotlin
1321
class HostClass {}
1422

1523
@Test
@@ -29,7 +37,9 @@ fun `test my annotation processor`() {
2937
KClass kClass = new KClass();
3038
}
3139
""")
32-
40+
```
41+
Configure compilation
42+
```Kotlin
3343
val result = KotlinCompilation().apply {
3444
sources = listOf(kotlinSource, javaSource)
3545

@@ -39,7 +49,9 @@ fun `test my annotation processor`() {
3949
inheritClasspath = true
4050
messageOutputStream = System.out // see diagnostics in real time
4151
}.compile()
42-
52+
```
53+
Assert results
54+
```Kotlin
4355
assertThat(result.exitCode).isEqualTo(ExitCode.OK)
4456

4557
// Test diagnostic output of compiler

0 commit comments

Comments
 (0)