Repository navigation
Keep modules named build or target in the project scan - #2124
Open
Medamineelkhattabi wants to merge 2 commits into
Open
Medamineelkhattabi wants to merge 2 commits into
Medamineelkhattabi wants to merge 2 commits into
Conversation
Medamineelkhattabi
marked this pull request as ready for review
November 8, 2026 22:39
timrijckaert
approved these changes
Nov 14, 2026
… modules Add KDoc note that a build or target directory detected as a module directory is scanned with all its content. Add scanner test for output directory containing src or a build file, and scope tests for modules named build and target.
This branch has not been deployed
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.
Fixes the case reported in #2123: a Gradle or Maven module whose directory is named
buildortarget(e.g.feature/target) is skipped by the project scan, so it is missing fromscopeFromProject(),scopeFromProduction()and the module and source set scopes, with no warning.ProjectDirectoryFiltertreats everybuild/targetsegment before the firstsrcas build output. With this change such a directory is still pruned unless it is a module directory itself, checked with theisModuleDirectorythe filter already uses. A module's ownbuild/andtarget/output stays ignored, and packages namedbuild/targetundersrcbehave as before.Tests:
ProjectDirectoryFilterTest: module directories namedbuildandtargetare not ignored, and their own output directories still are.ProjectKotlinFileScannerTest: an end-to-end case on a temp directory with a Gradle module namedbuildand a Maven module namedtarget.Locally (JDK 25):
spotlessCheckanddetektCheckpass, andlib:testpasses (2,809 tests, 5 skipped on Windows by@EnabledOnOs). The new tests fail without the change.One behaviour change to be aware of: a
build/targetdirectory that directly contains a build file or asrcdirectory is now scanned, so a generator writing a complete project straight intobuild/would be picked up.CI: all test, lint and detekt jobs pass. The two snapshot jobs (
Publish Snapshot To Maven CentralandGet Published Snapshot For Test Projects) fail because the Maven Central secrets aren't available to PRs from forks.