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

Gradle: SourceSets added after plugin loading don't get tasks #138

Closed
uschindler opened this issue Mar 29, 2018 · 4 comments · Fixed by #139
Closed

Gradle: SourceSets added after plugin loading don't get tasks #138

uschindler opened this issue Mar 29, 2018 · 4 comments · Fixed by #139
Assignees
Labels
Milestone

Comments

@uschindler
Copy link
Member

uschindler commented Mar 29, 2018

I found this by testing Elasticsearch. ES adds a sourceset named "java9", but this does not get tasks setup, so a task named forbiddenApisJava9 is missing.

The reason is that at the time the plugin is applied, the additional sourcesets are not yet defined. Instead of using the standard collect groovy closure, it should use all, which applies a closure to already existing and later added sourcesets: all method of DomainObjectCollection

@uschindler
Copy link
Member Author

Here is the PR: #139

@rjernst: do you think this is OK?

uschindler added a commit that referenced this issue Mar 29, 2018
Fix Gradle bug: SourceSets added after plugin loading don't get tasks.
This closes #138.
@karussell
Copy link

karussell commented May 14, 2018

We are currently trying out jdk10 with forbiddenapis and have a problem there:

Parsing signatures failed: Invalid bundled signature reference (JDK version is invalid): jdk-unsafe-1.10

See https://travis-ci.org/graphhopper/graphhopper/jobs/378749464

Is this a different issue or something because we are using unsafe?

@uschindler
Copy link
Member Author

This has nothing to do with this. Update forbidden-apis and specify as "10" not "1.10". The latter is no valid java version.

@karussell
Copy link

Cool. Working now. Thanks a lot! And thanks for your work on this tool!

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

Successfully merging a pull request may close this issue.

2 participants