@@ -46,61 +46,61 @@ For more information, see [`kotlin.daemon.jvmargs` property](gradle-compilation-
46
46
47
47
There are two common lifetime strategies for the Kotlin daemon:
48
48
49
- * ** Detached daemon** : Used when the client (like a build system) is long-running. The daemon shuts down shortly after the
49
+ * ** Attached daemon** : Used when the client (like a build system) is long-running. The daemon shuts down shortly after the
50
50
client process shuts down or the daemon hasn't been used for a while.
51
- * ** Attached daemon** : Used when the client is short-lived (like command-line compilation). The daemon stays alive longer
51
+ * ** Detached daemon** : Used when the client is short-lived (like command-line compilation). The daemon stays alive longer
52
52
to await potential follow-up requests.
53
53
54
54
To configure the lifetime strategy, you can use the following options:
55
55
56
56
| Option | Description | Default value |
57
57
| -----------------------------| ----------------------------------------------------------------------------------------------------| ---------------|
58
58
| ` autoshutdownIdleSeconds ` | How long the daemon should stay alive after the last compilation when a client is still connected. | 2 hours |
59
- | ` autoshutdownUnusedSeconds ` | How long the daemon waits to shut down after all clients disconnect. | 1 minute |
60
- | ` shutdownDelayMilliseconds ` | How long a newly started daemon waits for a first client before shutting down if unused. | 1 second |
59
+ | ` autoshutdownUnusedSeconds ` | How long a newly started daemon waits for a first client before shutting down if unused. | 1 minute |
60
+ | ` shutdownDelayMilliseconds ` | How long the daemon waits to shut down after all clients disconnect. | 1 second |
61
61
62
- To configure a detached daemon lifetime, set ` shutdownDelayMilliseconds ` to a ** high** value.
62
+ To configure an attached daemon lifetime, set ` autoshutdownIdleSeconds ` to a ** high** value and ` shutdownDelayMilliseconds ` to a ** low ** value.
63
63
64
64
<tabs group =" build-system " >
65
65
<tab title =" Gradle " group-key =" gradle " >
66
66
67
67
Add the following to your ` gradle.properties ` file:
68
68
69
69
``` none
70
- org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=shutdownDelayMilliseconds =7200
70
+ org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=autoshutdownIdleSeconds =7200,shutdownDelayMilliseconds=1000
71
71
```
72
72
73
73
</tab >
74
74
<tab title =" Maven " group-key =" maven " >
75
75
76
- Add the following property to your ` pom.xml ` file :
76
+ Use the following command :
77
77
78
- ``` xml
79
- < kotlin .compiler. daemon.shutdownDelayMs> 7200</ kotlin .compiler.daemon.shutdownDelayMs>
78
+ ``` bash
79
+ mvn package -Dkotlin. daemon.options=autoshutdownIdleSeconds= 7200,shutdownDelayMilliseconds=1000
80
80
```
81
81
82
82
</tab >
83
83
</tabs >
84
84
85
- To configure an attached daemon lifetime, set ` autoshutdownIdleSeconds ` to a ** high ** value and ` shutdownDelayMilliseconds ` to a ** low ** value.
85
+ To configure a detached daemon lifetime, set ` shutdownDelayMilliseconds ` to a ** high ** value.
86
86
87
87
<tabs group =" build-system " >
88
88
<tab title =" Gradle " group-key =" gradle " >
89
89
90
90
Add the following to your ` gradle.properties ` file:
91
91
92
92
``` none
93
- org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=autoshutdownIdleSeconds=7200, shutdownDelayMilliseconds=1000
93
+ org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=shutdownDelayMilliseconds=7200
94
94
```
95
95
96
96
</tab >
97
97
<tab title =" Maven " group-key =" maven " >
98
98
99
- Use the following command :
99
+ Add the following property to your ` pom.xml ` file :
100
100
101
- ``` bash
102
- mvn package -Dkotlin. daemon.options=autoshutdownIdleSeconds= 7200,shutdownDelayMilliseconds=1000
101
+ ``` xml
102
+ < kotlin .compiler. daemon.shutdownDelayMs> 7200</ kotlin .compiler.daemon.shutdownDelayMs>
103
103
```
104
104
105
105
</tab >
106
- </tabs >
106
+ </tabs >
0 commit comments