mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-09-16 05:52:22 +00:00
start add variations generator
This commit is contained in:
27
ksp/variations/generator/test/build.gradle
Normal file
27
ksp/variations/generator/test/build.gradle
Normal file
@@ -0,0 +1,27 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
id "com.android.library"
|
||||
id "com.google.devtools.ksp"
|
||||
}
|
||||
|
||||
apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project"
|
||||
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api project(":micro_utils.ksp.variations")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
add("kspCommonMainMetadata", project(":micro_utils.ksp.variations.generator"))
|
||||
}
|
||||
|
||||
ksp {
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
|
||||
data class Sample(
|
||||
val value: String
|
||||
)
|
||||
|
||||
@GenerateVariations
|
||||
fun sample(
|
||||
@GenerationVariant(
|
||||
"example",
|
||||
Sample::class,
|
||||
"value"
|
||||
)
|
||||
example: String = "12"
|
||||
) = println(example)
|
Reference in New Issue
Block a user