This message was deleted.
# community-support
s
This message was deleted.
m
Gradle itself wouldn't notify the app if files have changed. This is implemented on the framework level (e.g Micronaut has something like this). So I guess Gradle notes the changes, but the framework doesn't.
r
Hey @Vignesh Rajasekaran ! 😃👋 (Disclaimer: I may have misunderstood you, let me know if that’s the case!) Is your ‘run’ task (or tasks it depends on) creating a JAR (or binary), creating an image, pushing it to a registry, and updating a replicaset in the cluster? For a Gradle task in continuous mode to be able to live-update a container deployed in a kubernetes cluster, based on local changes in the app’s sources, would require those steps I mentioned to be modelled as Gradle tasks, and for those tasks’ inputs to be declared and wired into each other appropriately, all the way from ‘farm to table’ (or ‘source file to cluster’, in this case).
The
run
task I know of comes from Gradle’s built-in ‘application’ plugin, and it is a
JavaExec
task, ie it runs
java -jar <some jar>
to start a Java application locally. This out-of-the-box task works well with continuous build because it’s quite simple (it compiles java sources, packages them into a JAR, and then invokes the ‘java’ binary).
v
Hey @Rob Moore 😄 The
run
task that I’m using is the one that comes with the application. The step of syncing code from my local into the container happens outside of gradle.
That’s why I’m curious why it works on my mac but doesn’t inside the container. I perhaps have to check on other JVM configurations inside the the container
r
Cool, I see. In that case you probably don’t need the ‘run’ task, you could instead run the ‘shadowJar’ task in continuous mode, which will live-update your JAR file (without trying to run it as a local application). When you see in the container that Gradle is notified of the file change, does it rebuild the JAR as expected? Does the JAR change as expected?
🧪 1
v
I can’t see any jar file created for my app. I think it running the class files. But those class file are also not regenerated when the source file changes. I’m going to try this on a simpler project first
👍 1