Skip to content

Commit

Permalink
Add APT_DEBUG flag to allow debugging the Javac process and annotatio…
Browse files Browse the repository at this point in the history
…n processors
  • Loading branch information
beikov committed Jun 11, 2024
1 parent d1c80e1 commit 0db4148
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gradle/java-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ tasks.withType(JavaCompile).configureEach { task ->
// working directory and prevents from using a relative path to locate a project file.
// Using a CommandLineArgumentProvider allows build cache hits when the build cache is relocated.
task.options.compilerArgumentProviders.add(new CompilerStubsArgumentProvider(stubsDir: new File(project.rootDir, "checkerstubs")))

if (System.getProperty('APT_DEBUG', 'false') == 'true') {
task.options.forkOptions.jvmArgs += ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9099']
}
}

checkerFramework {
Expand Down

0 comments on commit 0db4148

Please sign in to comment.