Gradle Version: 2.14.1
Operating System and JVM version: Ubuntu 14.04, java 1.8.0_91
Is this a regression? No
I’m writing a plugin and added the ‘java-gradle-plugin’ plugin to use with GradleRunner for testing purposes. it appears that using that plugin in concert with the ‘idea’ plugin causes some weird behavior. I’m using the command ./gradlew idea
to generate my IDE project. When I do so, the file: build/pluginUnderTestMetadata/plugin-under-test-metadata.properties
gets added to the intellij module as a test dependency. That file puts build/classes/main
and build/resources/main
on the ‘implementation-classpath’.
The net result of this is that despite running tests from within intellij, it seems to be using the classes compiled by the gradle command line build. It’s not clear to me if both intellij’s compiled classes and gradle’s compiled classes are both available or if it always uses only gradle’s, but either way the behavior is very unintuitive as I must switch back and forth between running my tests in my ide and recompiling on the command line if I’m making modifications to the main source set.
I tried manually removing the plugin-under-test-metadata.properties dependency and this causes my tests to not even start, so excluding that file isn’t a viable workaround for this.