1. Gradle Daemon is also the Gradle daemon
Gradle needs to run in a Java virtual machine, each execution of the Gradle command means that a new Java Virtual machine is started, loads Gradle classes and libraries, and finally executes the build. In this way, building up will take a lot of time to start and shut down the Java virtual machine.
With the Gradle daemon, you only need to start a Java virtual machine and then reuse it without restarting the Java Virtual machine again. This achieves the goal of shortening the build time.
2. Java virtual machine, each of the existence of a main function will create a new JVM, that is, a machine can create a number of JVMs
Attach the Great God Note
3. Build a script file that ends in. SH, as follows
#!/bin/bashecho "Kill Gradle Daemon" pid= ' JPS | grep Gradledaemon | awk ' {print '} ' kill-9 $pid
#!/bin/bash script Default Start
Echo control is displayed in the console
pid= "Assigning values to variables
JPS lists all the JVM processes, grep Gradledaemon filters out the Gradledaemon process, and awk ' {print '} ' prints out the PID
Kill-9 $pid Kill Process
Note that since there is a collection in the PID, there is no need to write a for loop if there are multiple Gradledaemon processes
Paste the following. bat script
@echo off echo ------------------------------------------echo Liferay Kill all Gradle Daemon Process Kit echo ------------------------------------------ for in ('calljps^| find/i "Gradledaemon"'doecho %%i && taskkill/f/pid%%i)
In addition, someone may go to the PS command to find the process, because Gradle is the JVM process, so it is more convenient to use JPS.
Write a shell script and bat script that kills Gradle daemon