Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add main sourceSet output to the inputs #27

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

jmini
Copy link
Contributor

@jmini jmini commented Aug 21, 2023

Fixes #24

As discussed in the issue, the resolveSources() method is adding the main sourceSet output to the list of files sent to jandex.

if (resolvedProcessDefaultFileSet.get()) {
files.addAll((Collection<String>) sourceSets.findByName('main').output.classesDirs*.absolutePath.flatten())
}

So for me this belongs to the task input in order to avoid the task to stay UP-TO-DATE when there is a change.


There was no guidance on functional tests in this repository.
So I used what is generated by gradle init as input but I did not used Spock.
If the setup is not the one that is expected, feel free to point me to other repositories where you have already functional tests.
Or if you prefer not having them, this can also be removed from this PR.

The test itself contains the reproducer provided by @jskillin-idt and makes sure that the outcome of the jandex task is correct (SUCCESS or UP_TO_DATE) depending if there was a source modification or not.

@Guliver
Copy link

Guliver commented Apr 30, 2024

I use the workaround as mentioned in #24 and I'm quite happy with it. It would be nice to have it as a default behaviour.

Is there any reason, why this PR don't get merged?

@aalmiray aalmiray merged commit a00417b into kordamp:master Apr 30, 2024
1 check passed
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.

Task "jandex" up-to-date check passes as long as the jandex.idx exists (and will not rebuild for new source)
3 participants