Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 20386

Configure test dependends on custom configuration in same project

$
0
0
  1. what problem are you trying to solve here?
  • I’m sorry I’m not clear on the problem, essentially, I forgot to mention that we also configure intellij to pick up the the “sources” of customConfiguration as “testSources”
idea {
    module {
        testSourceDirs += sourceSets.customConfiguration.java.srcDirs
        testSourceDirs += sourceSets.customConfiguration.resources.srcDirs
    }
}

so basically, the problem is where intellij couldn’t pick up java sources in customConfiguration, as intellij only understand the dependencies on modules “java sources” and not “java test sources”, so the moment we remove the line “testSourceDirs += sourceSets.customConfiguration.java.srcDirs”, intellij can understand the classes in the customConfiguration.java.srcDirs.

  1. “Is it just that you want a separate container for dependencies? Will customConfiguration contain compiled sources? Are you trying to share test fixtures?”
  • basically, we have some common test utilities, glue code for cucumber tests, etc… and that’s why you need to extract those common “test code” into separate modules customConfiguration.

Thanks for your help.
Cheers


Viewing all articles
Browse latest Browse all 20386