Skip to content

Commit 0db4148

Browse files
committed
Add APT_DEBUG flag to allow debugging the Javac process and annotation processors
1 parent d1c80e1 commit 0db4148

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gradle/java-module.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ tasks.withType(JavaCompile).configureEach { task ->
470470
// working directory and prevents from using a relative path to locate a project file.
471471
// Using a CommandLineArgumentProvider allows build cache hits when the build cache is relocated.
472472
task.options.compilerArgumentProviders.add(new CompilerStubsArgumentProvider(stubsDir: new File(project.rootDir, "checkerstubs")))
473+
474+
if (System.getProperty('APT_DEBUG', 'false') == 'true') {
475+
task.options.forkOptions.jvmArgs += ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9099']
476+
}
473477
}
474478

475479
checkerFramework {

0 commit comments

Comments
 (0)