Gradle System Properties: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 9: Line 9:
==<tt>org.gradle.jvmargs</tt>==
==<tt>org.gradle.jvmargs</tt>==
===Attaching a Debugger to a Gradle Daemon===
===Attaching a Debugger to a Gradle Daemon===
A Gradle daemon can be started in debug mode, so an IDE can attach and debug a build, by specifying JVM debug flags which ensure the JVM starts in suspend mode, as follows:
A [[Gradle_Daemon#Overview|Gradle daemon]] can be started in debug mode, so an IDE can attach and debug a build, by specifying JVM debug flags which ensure the JVM starts in suspend mode, as follows:
<syntaxhighlight lang='groovy'>
<syntaxhighlight lang='groovy'>
org.gradle.jvmargs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=10001"
org.gradle.jvmargs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=10001"
</syntaxhighlight>
</syntaxhighlight>
More details about Gradle debugging are available in: {{Internal|Gradle_Operations#Debug_a_Gradle_Build|Gradle Operations &#124; Debug a Gradle Build}}
More details about Gradle debugging are available in: {{Internal|Gradle_Operations#Debug_a_Gradle_Build|Gradle Operations &#124; Debug a Gradle Build}}

Revision as of 22:00, 10 November 2020

Internal

Overview

System properties can be provided with the -D command-line options, loaded from ~/.gradle/gradle.properties or from the project's gradle.properties. Explain precedence.

Properties

org.gradle.daemon

org.gradle.jvmargs

Attaching a Debugger to a Gradle Daemon

A Gradle daemon can be started in debug mode, so an IDE can attach and debug a build, by specifying JVM debug flags which ensure the JVM starts in suspend mode, as follows:

org.gradle.jvmargs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=10001"

More details about Gradle debugging are available in:

Gradle Operations | Debug a Gradle Build