Repository navigation
Link IntelliJ modules to source sets instead of built jars - #258
Merged
Merged
Conversation
labkey-adam
added a commit
to LabKey/wnprc-modules
that referenced
this pull request
Nov 22, 2026
…#1096) ## Rationale This stops IntelliJ from resolving ApiKey and GoogleDrive API classes to their built jars instead of source, which breaks find usages and navigation. The LabKey Gradle plugin already adds each module's API to its own classpath, so these explicit `files(apiJar)` dependencies are redundant, and IntelliJ imports them as External Libraries. Both modules compile, including GoogleDrive's JSPs. ## Related Pull Requests - LabKey/gradlePlugin#258 ## Changes - Remove the explicit `files(apiJar)` dependency from ApiKey and GoogleDrive
labkey-tchad
approved these changes
Nov 23, 2026
labkey-tchad
left a comment
Member
There was a problem hiding this comment.
Looks good to me but Claude has thoughts:
No blocking issues. Module jars still include the XMLBeans classes through
main.output, the task dependencies are unchanged, and there are no new dependency cycles. Three nits:
Jsp.groovy(addJspTasks):jsp2Javastill hasdependsOn('apiJar')anddependsOn('jar'). The JSP classpath now gets these task dependencies from the source set outputs, so every JSP compile still builds both jars for no reason. Could these two lines be removed, or is there a reason they're still needed?JavaModule.groovy:117:sourceSets.main.output.dir(...)forbuild/xbis registered inside thejar {}configure block. That block runs right away today, but if jar setup ever becomes lazy (tasks.named('jar').configure), then IntelliJ syncs and JSP compiles that never trigger the jar task would lose the XMLBeans classes. Consider moving the call intoaddSourceSets, next to the existing XmlBeanssrcDirssetup.JavaModule.groovy:117:build/xbis now both a main Java source root and a main output dir. It's worth a Gradle sync on a module with schemas (e.g.study) to confirm IntelliJ doesn't flag or exclude the overlapping root. If thesrcDirsentry was only there to expose the classes, it could go now.
Contributor
Author
|
Thanks! Addressed in 31aea0c:
Rerunning the verify, BVT, and installer builds on the server test branch now. |
labkey-adam
added a commit
to LabKey/server
that referenced
this pull request
Nov 24, 2026
## Rationale Use the latest published version, which fixes several navigation and find-usages issues in IntelliJ ## Related Pull Requests - LabKey/gradlePlugin#258
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
This makes IntelliJ resolve LabKey module classes to their source instead of to built jars, which broke find usages and navigation. Several source sets depended on their module's own
jar/apiJarfiles, and theapiandstudyjars packaged XMLBeans classes outside any source set; IntelliJ can't map either back to a source module, so it imported the jars as External Libraries.Tested with a local 11.3.0-SNAPSHOT: after a Gradle sync, no module in the server enlistment references a built module jar except WNPRC's ApiKey and GoogleDrive, whose own
build.gradleaddsfiles(apiJar). Module jars contain the same files as before, thestudymodule builds, and JSPs compile forcoreandquery.Related Pull Requests
Changes
mainsource set output, which also keepsprevious-compilation-data.binout of module jars