Cardea (IJ 13) gradle + custom source sets
Hi community,
is there a way to tell Cardea (V132.637) that there are additional source sets?
My build.gradle contains
configurations {
integrationTestCompile { extendsFrom testCompile }
integrationTestRuntime { extendsFrom testRuntime }
}
and
Thanks!
and
dependencies {
integrationTestCompile sourceSets.main.output
integrationTestCompile configurations.testCompile
integrationTestCompile sourceSets.test.output
integrationTestRuntime configurations.testRuntime
}
. Until now, I was using the gradle-idea-plugin which added the required configuration to the iml files using the following snippet
apply plugin: idea
idea {
module {
testSourceDirs += file('src/integrationTest/java')
testSourceDirs += file('src/integrationTest/resources')
scopes.TEST.plus += configurations.integrationTestCompile
scopes.TEST.plus += configurations.integrationTestRuntime
}
}
How do I do that with jetgradle/IntelliJ 13?
integrationTestCompile sourceSets.main.output
integrationTestCompile configurations.testCompile
integrationTestCompile sourceSets.test.output
integrationTestRuntime configurations.testRuntime
}
. Until now, I was using the gradle-idea-plugin which added the required configuration to the iml files using the following snippet
apply plugin: idea
idea {
module {
testSourceDirs += file('src/integrationTest/java')
testSourceDirs += file('src/integrationTest/resources')
scopes.TEST.plus += configurations.integrationTestCompile
scopes.TEST.plus += configurations.integrationTestRuntime
}
}
How do I do that with jetgradle/IntelliJ 13?
Thanks!
Please sign in to leave a comment.
I created http://youtrack.jetbrains.com/issue/IDEA-115169 for this problem since even using the sample from the gradle distribution does not work.
Hi Sascha,
IJ Gradle plugin uses Gradle Tooling API to get project information. Unfortunately the API doesn't expose information about custom source sets.
And, since the plugin uses Gradle build scripts as a "single source of truth" - manual changes will be overwritten on later "refresh".
There is already related ticket at Gradle tracking system, you may vote for it - http://issues.gradle.org/browse/GRADLE-2680
Vlad
Hi Vlad,
thanks for the response. It is hard to believe that this is not possible ... it more or less renders the shiny IntelliJ + Gradle Integration useless for a lot of projects. So we have to revert to the gradle-intellij-plugin.
I added my vote to GRADLE-2680 and hope it is fixed soon.
Thanks
For completeness: Now it works, as Vlad explained in the issue (http://youtrack.jetbrains.com/issue/IDEA-115169).
Vlad, does this render the gradle issue (http://issues.gradle.org/browse/GRADLE-2680) obsolete? We should comment accordingly over there.
The gradle issue does not fixed yet, IJ uses init script with dynamic plugin applied to get extended information about the project.
So, yes, it's not a blocker for http://youtrack.jetbrains.com/issue/IDEA-115169 anymore but it would be better to have it fixed in Gradle Tooling API too.