hey guys! I'm trying out spring boot and Kotlin - ...
# server
a
hey guys! I'm trying out spring boot and Kotlin - my preference for Kotlin projects is generally maven, but I was wondering if you have any preferences on maven vs. gradle for server-side experiences with Kotlin?
s
they both more or less work on your own machine, though gradle can be a lot faster in some instances
but for me the biggest concern was my deployment strategy
one of the projects I’m working on is hosted on an Openshift instance, and I didn’t have a container image stream to easily use, so I had to install a java S2I builder to provide one
apparently not all of them support gradle (including the redhat provided), but the one I chose does
👍 1
p
I would definitely go with gradle.kts
s
the biggest issue I have rn is because the builds are supposed to be independent of each other, it’s gotta pull down a fresh gradle binary each time and can’t keep a gradle daemon running because it spawns a new container for each run
makes builds take a solid like 3 minutes longer than they need to be
a
yes, definitely. I think in terms of large-scale projects, gradle is the way to go. I've be generally sticking to serverless projects on Kotlin, which Maven has made it synch (of course, the new updates for TornadoFX I think had some bugs when the new Kotlin update came out a couple months back, but generally, the channel agrees Maven over Gradle for the JavaFX framework)
I'm running introductory Kotlin projects on Codetown, and this week is Spring with Kotlin: I may go with gradle even if the project is small for broadening horizons, although I'll definitely add my input if I run into anything.
👍 1
g
pull down a fresh gradle binary each time
@Shawn Why not just create a container with preinstalled gradle or just save dir with gradle distribution to cache? Also I think it’s not a gradle wrapper problem. but probably dependencies downloading
s
@gildor my point was less that this was some inherent property of Gradle, and more so a consideration to take into account if you were deploying in a similar fashion
g
Same for maven, and also there is no such thing as “maven wrapper” at least out of the box
s
other specifically “server-side” differences between maven and gradle haven’t been as drastic in my experience
g
Sure
but for CI gradle is really convenient, no need for additional software to build a project, only JVM
Maven over Gradle for the JavaFX
@amanda.hinchman-dominguez But why?
a
Tornadofx-ers have found the gradle setup to be more troublesome, but it could quite possibly be the library itself
g
Also supports build and run with a single command:
gradle run
a
I agree. Actually, I did an intro project last week for tornadofx and the only issue I ran into was that rn TornadoFX-gradle-plugin does not automatically link gradle.build into the project
I wasted 2 hours trying to figure out what was wrong but it was dumb, I had to link the build.gradle in the project to build.gradle lol
g
TornadoFX-gradle-plugin?
Do you mean Idea plugin?
a
nope, tornadofx-gradle-plugin is the automatic setup for gradle in tornadofx. There's a similar one for maven as well
g
Could you share a link on this plugin?
p
I have a tornadofx app with gradle and I had no build issues...
a
whoops, just saw this! Possibly... yeah. I can share the link on the project, and I'll post the article from 2 weeks ago (there's 2 parts, one posted last thursday) with the
tornadofx-maven-plugin
setup, but you can see a screenshot of all available plugins for tornadofx
https://github.com/edvin/tornadofx <-- source code for TornadoFX
s
maven, anyday, recently create a protype using it and heruko support is good for 2.0.2
👍 1
g
@amanda.hinchman-dominguez I don’t see tornadofx-gradle-plugin, only tornadofx-maven-plugin there. I actually not sure why would you need gradle plugin to configure tornadofx in gradle
Not sure why this topic about gradle vs maven appear. I mean it’s pretty easy to configure Maven or Gradle for TornadoFx without any plugins, it’s just one more library and not sure why Maven or Gradle would be better in this specific case
a
both appear, I assure you
g
I mean that probably if you want to choose build system make sense to concider using much more wider set of arguments rather than only tornadofx library