Skip to content

Document how to configure Kotlin version resolution #1280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
srinivasvsk opened this issue Nov 10, 2021 · 2 comments
Closed

Document how to configure Kotlin version resolution #1280

srinivasvsk opened this issue Nov 10, 2021 · 2 comments
Assignees
Milestone

Comments

@srinivasvsk
Copy link

srinivasvsk commented Nov 10, 2021

Hello,
i tried to follow the latest documentation and the sample project. When i try to generate a kotlin project, it is erroring out with missing mapping for spring boot 2.5.6 with kotlin. Could you point to where the mapping can be configured and also if there is a way to just extend the whole configuration that would be great. Not able to find that information in docs

io.spring.initializr.metadata.InvalidInitializrMetadataException: No Kotlin version mapping available for 2.5.6.RELEASE
	at io.spring.initializr.metadata.InitializrConfiguration$Env$Kotlin.resolveKotlinVersion(InitializrConfiguration.java:424) ~[initializr-metadata-0.11.1.jar:na]
	at io.spring.initializr.generator.spring.code.kotlin.InitializrMetadataKotlinVersionResolver.resolveKotlinVersion(InitializrMetadataKotlinVersionResolver.java:39) ~[initializr-generator-spring-0.11.1.jar:na]
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 10, 2021
@wilkinsona
Copy link
Contributor

start.spring.io uses a custom KotlinVersionResolver bean for this purpose: https://github.com/spring-io/start.spring.io/blob/a82ad12ca1ed372b4d95d9a092d41bf63ece9f1e/start-site/src/main/java/io/spring/start/site/extension/code/kotlin/ManagedDependenciesKotlinVersionResolver.java.

You can either define your own bean or update your application.yaml file to declare some mappings beneath initializr.env.kotlin.mappings.

@wilkinsona wilkinsona added type: documentation and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 10, 2021
@wilkinsona wilkinsona changed the title custom install fails for kotlin mapping Document how to configure Kotlin version resolution Nov 10, 2021
@srinivasvsk
Copy link
Author

thank you for the details!

@snicoll snicoll self-assigned this Jan 22, 2022
@snicoll snicoll added this to the 0.12.0 milestone Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants