Skip to content
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

Use Kotlin's bom to provide dependency management for Kotlin #9486

Closed
wilkinsona opened this issue Jun 12, 2017 · 11 comments
Closed

Use Kotlin's bom to provide dependency management for Kotlin #9486

wilkinsona opened this issue Jun 12, 2017 · 11 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

Thanks to @sdeleuze, it looks like Kotlin is going to provide a bom. As part of our Kotlin story in 2.0, we should import the bom in spring-boot-dependencies.

@wilkinsona wilkinsona added the status: blocked An issue that's blocked on an external project change label Sep 27, 2017
@sdeleuze
Copy link
Contributor

sdeleuze commented Oct 6, 2017

I would suggest renaming this issue to "Provide dependency management for Kotlin", add for the moment kotlin-reflect, kotlin-stdlib, kotlin-stdlib-jre7 and kotlin-stdlib-jre8 artifacts to dependency management (enough for most use cases) since it is needed for #10511 (see sdeleuze@8eb684f). If a Kotlin BOM is released before 2.0 GA (see KT-18398, I have recently highlighted again the priority of that issue to Kotlin team) we will switch to the BOM, else staying with that for now will help most Kotlin developers to avoid mixing different versions of Kotlin artifacts (occurs frequently with kotlin-reflect).

snicoll pushed a commit to snicoll/spring-boot that referenced this issue Oct 27, 2017
This commit adds Kotlin main artifacts to Spring
Boot dependency management and will be replaced by
Kotlin BOM when it will be available (see KT-18398).

See spring-projectsgh-9486
snicoll pushed a commit to snicoll/spring-boot that referenced this issue Oct 27, 2017
snicoll pushed a commit that referenced this issue Oct 27, 2017
This commit adds Kotlin main artifacts to Spring
Boot dependency management and will be replaced by
Kotlin BOM when it will be available (see KT-18398).

See gh-9486
@sdeleuze
Copy link
Contributor

@wilkinsona Damned it seems we almost got it for Boot 2.0 but that will be for Boot 2.1 ;-) Could you please have a look to https://github.com/cy6erGn0m/kotlin-bom/blob/master/kotlin-lang/pom.xml, @cy6erGn0m would like some feedbacks and I prefer to ask to the real expert on that topic!

@snicoll
Copy link
Member

snicoll commented Feb 27, 2018

Thanks for the ping @sdeleuze, I've created cy6erGn0m/kotlin-bom#1

@wilkinsona
Copy link
Member Author

Kotlin has a bom in 1.3 so we should be able to do this in 2.2.

@wilkinsona wilkinsona added this to the 2.2.x milestone Nov 7, 2018
@oliemansm
Copy link

When will je be upgrading the Kotlin version to 1.3?

We're using Spring Boot 2.1.0 starter right now, which sets the Kotlin version to 1.2.71, while the graphql-java-tools lib we use requires (and explicitly sets) 1.3.10. However, Spring Boot appears to be overriding that version, so right now the only way to fix that is by setting the required Kotlin version manually in our Spring Boot project to override the version specified by Spring Boot.

Bottom line: would be ideal if Spring Boot would be upgraded to use Kotlin 1.3.* as well.

@wilkinsona
Copy link
Member Author

wilkinsona commented Nov 21, 2018

As shown by this issue being assigned to the 2.2.x milestone and my comment above, we intend to upgrade to Kotlin 1.3 in Spring Boot 2.2.

@snicoll
Copy link
Member

snicoll commented Nov 21, 2018

However, Spring Boot appears to be overriding that version

The Spring Boot parent and dependency management sets a version for Kotlin, yes. You can easily override that as described in the documentation

@sdeleuze
Copy link
Contributor

@oliemansm Spring Boot plugin is expected to leverage the Kotlin version defined with the kotlin.version property, and Gradle plugin even directly uses the version of the Kotlin plugin.

@oliemansm
Copy link

Thanks all

@ilya-g
Copy link

ilya-g commented Dec 14, 2018

@wilkinsona Note that Kotlin will have bom only starting from 1.3.20, which hasn't been released yet. Although you can try the eap version, which has been published recently:
https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-bom/1.3.20-eap-25
https://dl.bintray.com/kotlin/kotlin-eap/org/jetbrains/kotlin/kotlin-bom/1.3.20-eap-25/

@sdeleuze
Copy link
Contributor

After discussion with @mp911de I have created KT-30042 to ask Coroutines artifacts to be added in the kotlin-bom since most Coroutines are on library side and use a different version scheme (currently Coroutines 1.1.1 is designed to work with Kotlin 1.3.21).

@snicoll snicoll self-assigned this Mar 11, 2019
@snicoll snicoll removed the status: blocked An issue that's blocked on an external project change label Mar 11, 2019
@snicoll snicoll modified the milestones: 2.2.x, 2.2.0.M2 Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

6 participants