spring-cloud-contract icon indicating copy to clipboard operation
spring-cloud-contract copied to clipboard

Kotlin support should not require cross-compilations

Open snicoll opened this issue 4 years ago • 3 comments

The Kotlin support in Spring Cloud Contract requires to enable cross-compilations as assets are generated in Java. Enabling that is not very idiomatic and the setup is quite involved, especially with Maven.

See https://github.com/spring-io/start.spring.io/issues/278

snicoll avatar Oct 14 '19 15:10 snicoll

Unless we make it possible to generate tests in Kotlin then we won't be able to achieve this without cross compilation, right @TYsewyn ?

marcingrzejszczak avatar Oct 21 '19 07:10 marcingrzejszczak

Unfortunately that's correct because SCC is only able to generate the tests in either Groovy or Java. Luckily there is already a PR (https://github.com/spring-cloud/spring-cloud-contract/pull/1169) in progress, but I don't think it will make it to Hoxton.RELEASE.

TYsewyn avatar Oct 21 '19 08:10 TYsewyn

@marcingrzejszczak, I think with the Gradle plugin changes as part of https://github.com/spring-cloud/spring-cloud-contract/commit/7804933b21d69a3c61a3198fe297f1f2e65ff38c this should now be a bit easier to achieve as it only would require changes to core code and the plugin will automatically support it.

Can't speak to the Maven plugin part though.

shanman190 avatar Dec 04 '20 14:12 shanman190