Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdeleuze/demo-kotlin-default-values
Repro project for spring-projects/spring-boot#15397
https://github.com/sdeleuze/demo-kotlin-default-values
Last synced: 12 days ago
JSON representation
Repro project for spring-projects/spring-boot#15397
- Host: GitHub
- URL: https://github.com/sdeleuze/demo-kotlin-default-values
- Owner: sdeleuze
- Created: 2020-03-24T14:23:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-24T15:18:34.000Z (almost 5 years ago)
- Last Synced: 2025-01-05T21:16:36.439Z (19 days ago)
- Language: Kotlin
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a repro project for constructor-based properties default values related to https://github.com/spring-projects/spring-boot/issues/15397.
To reproduce the issue:
- Run `./gradlew kaptKotlin`
- Check generated files in `build/tmp/kapt3/classes/main/META-INF/spring-configuration-metadata.json` and `build/tmp/kapt3/stubs/main/com/example/DemoProperties.java`
- There is no `"foo` default value in metadata or Java class with Kotlin 1.3.71 and 1.4 M1
To double check it works as expected with annotations (which should be not needed with since https://youtrack.jetbrains.net/issue/KT-30164 is expected to be fixed):
- Uncomment `@DefaultValue("foo")`
- Run `./gradlew kaptKotlin`
- Check `build/tmp/kapt3/classes/main/META-INF/spring-configuration-metadata.json` it contains `"defaultValue": "foo"`
You can also check it works as expected with regular `var` properties.