Hi everybody I just completed a small server proje...
# server
h
Hi everybody I just completed a small server project using Ktor, now I want to run it on a leased server, so how can I package it as well as protect the source code, like creating a APKs on Android?
b
Package it as fat jar (google shadow plugin to do it for you) and deploy it as systemd (google) service on linux server
👍 1
☝️ 1
Additionally you could build a native image via graalvm to further protect your code
k
You can't do graalvm native for ktor easily AFAIK... Unless they added it recently? You need quarkus, micronaut etc...
☝️ 1
a
Make a docker image and run that on the server
👍 1
q
maven OR gradle?
h
@ql562482472 im using Gradle
@asad.awadia that’s good choice
q
gradle build,and you will have xxx.jar,copy to server ,java -jar xxx.jar
h
@ql562482472 Does it protect the source code?
q
NO, you can use proguard to protect code ; or you use kotlin ,many kotlin byte code is diffcult to Decompile
😂 1
h
OK!, thank you guys! 😄