[GRADLE-3126] Cannot create container element using '«name» {}' when scope owner contains `«name»(Closure)` method Created: 07/Jul/14 Updated: 08/Jul/14 Resolved: 08/Jul/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 2.1-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Luke Daley |
Resolution: | Fixed | Votes: | 0 |
Known Issue Of: |
Description |
Hi, I'm testing gradle 2.0 with our multiproject build, and it gets stuck when applying the integrationTest pattern with the error "Could not find method integrationTestCompile". The funny thing is, that with subprojects{} instead of allprojects{} it seems to work fine. Is this a bug or am I missing something? Stacktrace: [1]https://gist.github.com/anonymous/f44... Regards, |
Comments |
Comment by Gradle Forums [ 07/Jul/14 ] |
Thanks for the report. I can reproduce this problem, and have simplified it to: settings.gradle: include 'subproject' build.gradle: allprojects { sourceSets { } task integrationTest { With Gradle 1.12, running `gradle help` works fine. With Gradle 2.0, the error message is:
Changing `allprojects` to `subprojects` works as well. I think the issue is due to the task name and sourceSet name being the same. If you change the name of the 'integrationTest' task (or the sourceSet), the problem is resolved. |