File tree Expand file tree Collapse file tree 5 files changed +12
-14
lines changed
src/main/kotlin/org/jetbrains/kotlin/buildtools/api
kotlin-build-tools-compat/src/main/kotlin/org/jetbrains/kotlin/buildtools/internal/compat
kotlin-build-tools-impl/src/main/kotlin/org/jetbrains/kotlin/buildtools/internal Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public abstract interface class org/jetbrains/kotlin/buildtools/api/ExecutionPol
6060public abstract interface class org/jetbrains/kotlin/buildtools/api/ExecutionPolicy$WithDaemon : org/jetbrains/kotlin/buildtools/api/ExecutionPolicy {
6161 public static final field Companion Lorg/jetbrains/kotlin/buildtools/api/ExecutionPolicy$WithDaemon$Companion;
6262 public static final field JVM_ARGUMENTS Lorg/jetbrains/kotlin/buildtools/api/ExecutionPolicy$WithDaemon$Option;
63- public static final field SHUTDOWN_DELAY Lorg/jetbrains/kotlin/buildtools/api/ExecutionPolicy$WithDaemon$Option;
63+ public static final field SHUTDOWN_DELAY_MILLIS Lorg/jetbrains/kotlin/buildtools/api/ExecutionPolicy$WithDaemon$Option;
6464 public abstract fun get (Lorg/jetbrains/kotlin/buildtools/api/ExecutionPolicy$WithDaemon$Option;)Ljava/lang/Object;
6565 public abstract fun set (Lorg/jetbrains/kotlin/buildtools/api/ExecutionPolicy$WithDaemon$Option;Ljava/lang/Object;)V
6666}
Original file line number Diff line number Diff line change 66package org.jetbrains.kotlin.buildtools.api
77
88import org.jetbrains.kotlin.buildtools.api.internal.BaseOption
9- import kotlin.time.Duration
109
1110/* *
1211 * An execution policy for a build operation.
@@ -58,10 +57,10 @@ public sealed interface ExecutionPolicy {
5857 public val JVM_ARGUMENTS : Option <List <String >? > = Option (" JVM_ARGUMENTS" )
5958
6059 /* *
61- * The time that the daemon process continues to live after all clients have disconnected.
60+ * The time in milliseconds that the daemon process continues to live after all clients have disconnected.
6261 */
6362 @JvmField
64- public val SHUTDOWN_DELAY : Option <Duration ?> = Option (" SHUTDOWN_DELAY " )
63+ public val SHUTDOWN_DELAY_MILLIS : Option <Long ?> = Option (" SHUTDOWN_DELAY_MILLIS " )
6564 }
6665 }
6766}
Original file line number Diff line number Diff line change @@ -297,9 +297,9 @@ private interface ExecutionPolicyV1Adapter {
297297 override val strategyConfiguration: CompilerExecutionStrategyConfiguration
298298 get() {
299299 val jvmArguments = get(JVM_ARGUMENTS ) ? : emptyList()
300- return get(SHUTDOWN_DELAY )?.let {
300+ return get(SHUTDOWN_DELAY_MILLIS )?.let {
301301 compilationService.makeCompilerExecutionStrategyConfiguration().useDaemonStrategy(
302- jvmArguments, it.toJavaDuration( )
302+ jvmArguments, java.time. Duration .ofMillis(it )
303303 )
304304 } ? : compilationService.makeCompilerExecutionStrategyConfiguration().useDaemonStrategy(
305305 jvmArguments
@@ -332,9 +332,9 @@ private interface ExecutionPolicyV1Adapter {
332332 val JVM_ARGUMENTS : Option <List <String >? > = Option (" JVM_ARGUMENTS" , default = null )
333333
334334 /* *
335- * The time that the daemon process continues to live after all clients have disconnected.
335+ * The time in milliseconds that the daemon process continues to live after all clients have disconnected.
336336 */
337- val SHUTDOWN_DELAY : Option <Duration ?> = Option (" SHUTDOWN_DELAY " , null )
337+ val SHUTDOWN_DELAY_MILLIS : Option <Long ?> = Option (" SHUTDOWN_DELAY_MILLIS " , null )
338338 }
339339 }
340340}
Original file line number Diff line number Diff line change 66package org.jetbrains.kotlin.buildtools.internal
77
88import org.jetbrains.kotlin.buildtools.api.ExecutionPolicy
9- import kotlin.time.Duration
109
1110internal object InProcessExecutionPolicyImpl : ExecutionPolicy.InProcess
1211
@@ -41,8 +40,8 @@ internal class DaemonExecutionPolicyImpl : ExecutionPolicy.WithDaemon {
4140 val JVM_ARGUMENTS : Option <List <String >? > = Option (" JVM_ARGUMENTS" , default = null )
4241
4342 /* *
44- * The time that the daemon process continues to live after all clients have disconnected.
43+ * The time in milliseconds that the daemon process continues to live after all clients have disconnected.
4544 */
46- val SHUTDOWN_DELAY : Option <Duration ?> = Option (" SHUTDOWN_DELAY " , null )
45+ val SHUTDOWN_DELAY_MILLIS : Option <Long ?> = Option (" SHUTDOWN_DELAY_MILLIS " , null )
4746 }
4847}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import org.jetbrains.kotlin.buildtools.api.jvm.operations.JvmCompilationOperatio
2525import org.jetbrains.kotlin.buildtools.api.trackers.CompilerLookupTracker
2626import org.jetbrains.kotlin.buildtools.internal.*
2727import org.jetbrains.kotlin.buildtools.internal.DaemonExecutionPolicyImpl.Companion.JVM_ARGUMENTS
28- import org.jetbrains.kotlin.buildtools.internal.DaemonExecutionPolicyImpl.Companion.SHUTDOWN_DELAY
28+ import org.jetbrains.kotlin.buildtools.internal.DaemonExecutionPolicyImpl.Companion.SHUTDOWN_DELAY_MILLIS
2929import org.jetbrains.kotlin.buildtools.internal.arguments.CommonCompilerArgumentsImpl.Companion.LANGUAGE_VERSION
3030import org.jetbrains.kotlin.buildtools.internal.arguments.CommonCompilerArgumentsImpl.Companion.X_USE_FIR_IC
3131import org.jetbrains.kotlin.buildtools.internal.arguments.CommonToolArgumentsImpl.Companion.VERBOSE
@@ -189,8 +189,8 @@ internal class JvmCompilationOperationImpl(
189189
190190 val daemonOptions = configureDaemonOptions(
191191 DaemonOptions ().apply {
192- executionPolicy[SHUTDOWN_DELAY ]?.let { shutdownDelay ->
193- shutdownDelayMilliseconds = shutdownDelay.inWholeMilliseconds
192+ executionPolicy[SHUTDOWN_DELAY_MILLIS ]?.let { shutdownDelay ->
193+ shutdownDelayMilliseconds = shutdownDelay
194194 }
195195 })
196196
You can’t perform that action at this time.
0 commit comments