Skip to content

Add support for the Gradle Playframework plugin.#173

Merged
olafurpg merged 1 commit into
scip-code:mainfrom
olafurpg:gradle-7
Apr 20, 2021
Merged

Add support for the Gradle Playframework plugin.#173
olafurpg merged 1 commit into
scip-code:mainfrom
olafurpg:gradle-7

Conversation

@olafurpg

Copy link
Copy Markdown
Contributor

Previously, the index command didn't work with Gradle projects that
use the Playframework plugin. The codebase would compile, but no LSIF
index would be created. Now, everything should work as expected.

The problem was that the Playframework plugin uses the Scala plugin to
compile auto-generated template and routes files. The Scala plugin runs
Zinc (Scala incremental compiler) in a daemon process behind the scenes
so it ignores the javac fork settings that lsif-java index adds to
the build.

The fix is to enable the SemanticDB Java agent on the Zinc daemon
process and to add one more injection point to ensure that the
SemanticDB compiler plugin is always on the classpath for all projects.

Fixes #170

Previously, the `index` command didn't work with Gradle projects that
use the Playframework plugin. The codebase would compile, but no LSIF
index would be created. Now, everything should work as expected.

The problem was that the Playframework plugin uses the Scala plugin to
compile auto-generated template and routes files. The Scala plugin runs
Zinc (Scala incremental compiler) in a daemon process behind the scenes
so it ignores the `javac` fork settings that `lsif-java index` adds to
the build.

The fix is to enable the SemanticDB Java agent on the Zinc daemon
process and to add one more injection point to ensure that the
SemanticDB compiler plugin is always on the classpath for all projects.

@Strum355 Strum355 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Index command does nothing in Gradle project with Playframework plugin enabled

2 participants