Completely ignoring android/mpp (as I understand t...
# gradle
s
Completely ignoring android/mpp (as I understand there a bigger benefit here due to the complexitities of targetting such platform), doing server-side kotlin, what are people using gradle build scripts for in the real world when doing server/jvm work? I added dependencies (just like npm/package.json or pip/requirements.txt) but aside from that and a copy of a few lines from SO to produce a fat jar with main call I havent and honestly dont see a need to go beyond that (it was probably a sink of 20mins to convert to gradle.build.kts from groovy), anything else I need to do happens at a high level, Dockerfile for image build, cloudbuild.yaml for CI/CD flow, k8s for deployment target etc.. Enlighten my ignorant soul please
g
It highly depends on project, big projects has very complex build configs, just for example you can check Kotlin build scripts
Dockerfile for image build
cloudbuild.yaml for CI/CD flow
k8s
All those layers may be managed by Gradle and many projects do that
also a lot of complexity required for jvm projects already bundled to gradle, so you just don’t need additional configuration because it managed already by Gradle
and after all, it’s actually good for you and your project to have minimal build script
👍 1
t
In addition to dep management, building and packaging - ours is also setup to handle our codegen cycle - so generating swagger specs from code (with a custom annotation processor) and generating code from specs.
d
Im using gradle and kotlin in the same basic architecture and sometimes co-mingled with java build. Not much different using kotlin (JVM) then java wrt builds except for the additional kotlin specific additions to build.gradle, which have gotten simplier over the last 2 years as kotlin is better integrated and stable. For a while I was having total build breaks for days sometimes when upgrading kotlin versions. Server-side apps include traditional (mostly java) legacy Tomcat/JEE/java/servlet, docker, AWS Lambda, AWS ECS (docker), standalone CLI, Vaadin server-side web GUI. So far no java script and none expected/needed, and the java/jvm tools don't notice any difference with kotlin vs java builds.
I converted a few, and wrote a few new build.gradle.kts scripts but have stopped for now -- too painful to get them working right and not enough advantage for now.
g
I use build.gradle.kts now for new projects, last versions are much better and IDE actually helps you now a lot with all new type safe accessors and autocomplete