Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tetraquark/ksp-testing
https://github.com/tetraquark/ksp-testing
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tetraquark/ksp-testing
- Owner: Tetraquark
- Created: 2021-02-22T17:58:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-23T07:10:02.000Z (almost 4 years ago)
- Last Synced: 2024-10-12T17:29:35.439Z (2 months ago)
- Language: Kotlin
- Size: 61.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KSP-Testing
Playground project for testing [Kotlin Symbol Processing (KSP)](https://github.com/google/ksp) library by Google.
It generates a class that implements interfaces annotated by `GenerateImpl`.
Declared interface:
```kotlin
package ru.tetraquark.ksp.test.sample.jvmimport ru.tetraquark.ksp.test.processor.GenerateImpl
import ru.tetraquark.ksp.test.processor.GenerateRes@GenerateImpl(generatedClassName = "FeatureStrings")
interface FeatureStringResources {
@GenerateRes
val successText: String
@GenerateRes(externalName = "error_text")
val errorText: String
}
```KSP generation result:
```kotlin
package ru.tetraquark.ksp.test.sample.generatedimport kotlin.String
import ru.tetraquark.ksp.test.sample.jvm.FeatureStringResourcespublic class FeatureStrings : FeatureStringResources {
public override val successText: String =
ru.tetraquark.ksp.test.sample.jvm.ResourcesObj.successTextpublic override val errorText: String = ru.tetraquark.ksp.test.sample.jvm.ResourcesObj.error_text
}
```