Skip to content

Commit c4d4900

Browse files
committed
Merge branch 'release/0.2.3'
2 parents 3e2164e + 8a06548 commit c4d4900

File tree

18 files changed

+70
-37
lines changed

18 files changed

+70
-37
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
The one-stop lib for code generation for kotlin (jvm) and code generation testing. Based on [kotlin-poet](https://square.github.io/kotlinpoet/).
44

55
[![incubating](https://img.shields.io/badge/lifecycle-INCUBATING-orange.svg)](https://github.com/holisticon#open-source-lifecycle)
6-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.toolisticon.kotlin.generation/kotlin-code-generation/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.toolisticon.kotlin.generation/kotlin-code-generation)
6+
[![Maven Central Version](https://img.shields.io/maven-central/v/io.toolisticon.kotlin.generation/kotlin-code-generation)](https://central.sonatype.com/artifact/io.toolisticon.kotlin.generation/kotlin-code-generation)
77
[![Build Status](https://github.com/toolisticon/kotlin-code-generation/workflows/Development%20branches/badge.svg)](https://github.com/toolisticon/kotlin-code-generation/actions)
88
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e493c246c3684b95a2ef097ae912d45a)](https://app.codacy.com/gh/toolisticon/kotlin-code-generation/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
99
[![codecov](https://codecov.io/gh/toolisticon/kotlin-code-generation/graph/badge.svg?token=kyJ82m5DAT)](https://codecov.io/gh/toolisticon/kotlin-code-generation)
10-
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.10-blue.svg?logo=kotlin)](http://kotlinlang.org)
10+
[![Kotlin](https://img.shields.io/badge/kotlin-2.2.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
1111
[![sponsored](https://img.shields.io/badge/sponsoredBy-Holisticon-RED.svg)](https://holisticon.de/)
1212
[![javadoc](https://javadoc.io/badge2/io.toolisticon.kotlin.generation/kotlin-code-generation/javadoc.svg)](https://javadoc.io/doc/io.toolisticon.kotlin.generation/kotlin-code-generation)
1313

_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.2.2</version>
8+
<version>0.2.3</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.2.2</version>
8+
<version>0.2.3</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.2.2</version>
8+
<version>0.2.3</version>
99
</parent>
1010

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

_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.2.2</version>
8+
<version>0.2.3</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.2.2</version>
8+
<version>0.2.3</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.2.2</version>
8+
<version>0.2.3</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.2.2</version>
8+
<version>0.2.3</version>
99
<relativePath>../_build/parent/pom.xml</relativePath>
1010
</parent>
1111

kotlin-code-generation/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.2.2</version>
8+
<version>0.2.3</version>
99
<relativePath>../_build/parent/pom.xml</relativePath>
1010
</parent>
1111

kotlin-code-generation/src/main/kotlin/_types.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package io.toolisticon.kotlin.generation
22

33
import com.squareup.kotlinpoet.ClassName
44
import java.util.function.Supplier
5+
import kotlin.reflect.KClass
56

67
/**
78
* Marks a type as capable of building a new product.
@@ -22,6 +23,22 @@ interface WithClassName {
2223
val className: ClassName
2324
}
2425

26+
/**
27+
* An implementing type can provide a generic value for a tag key.
28+
* Behaves as [com.squareup.kotlinpoet.Taggable] but hides the implementation of the tg provider.
29+
*/
30+
interface WithTags {
31+
/**
32+
* @see [com.squareup.kotlinpoet.Taggable.tag]
33+
*/
34+
fun <T : Any> tag(type: KClass<T>): T?
35+
}
36+
37+
/**
38+
* Reified access to [WithTags.tag].
39+
*/
40+
inline fun <reified T : Any> WithTags.tag(): T? = tag(T::class)
41+
2542
/**
2643
* ClassName when used as a file name for fileSpec.
2744
*/

0 commit comments

Comments
 (0)