gradle: buildSrc from included builds not recognized

已回答

Hello,

I wonder why IntelliJ's gradle importer does not recognize the buildSrc from an "included" build (I'm working with a composite build).
I am referring to the gradle samples (this one: https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/compositeBuilds/declared-substitution), extending the compositeBuilds/declared-substitution example by adding a buildSrc folder to both gradle project folders, namely into
* my-app, which is the composite build, including anonymous-library in its settings.gradle, and
* anonymous-library, the 'included' build.

In Intellij I open my-app/build.gradle as gradle project, and I see (as in the screenshot)
* my-app/buildSrc from the composite build is recognized as a gradle project => Good
* anonymous-library/buildSrc from the included build is not recognized as a gradle project => Bad
Thus anonymous-library/buildSrc/src/main/groovy/ is not marked as source folder.
I dont't think this behaviour is correct.

Jan

1
Avatar
Permanently deleted user

Not sure. When I create a "project from existing sources" from anonymous-library/build.gradle, anonymous-library/buildSrc is recognized as gradle project.

So I reckon it's IntelliJ specific.

0

Yes, it's an issue with IntelliJ IDEA. Feel free to file a bug at https://youtrack.jetbrains.com/issues/IDEA with a sample project to reproduce.

0

Serge Baranov Apparently tat ticket is about maven groovy, not gradle.

BTW I encounter the same problem in kotlin dsl

1

请先登录再写评论。