Importing a Gradle project ignores configuration in Gradle script

Answered

Following the example on the Gradle documentation, I'm attempting to add a JAR to the runtime scope of IntelliJ's classpath for my project. 

configurations {
    intelliJ
}

dependencies {
    intelliJ project.files("/path/to/my.jar")
}

idea.module {
    scopes.RUNTIME.plus += [ configurations.intelliJ ]
}

When I execute "./gradlew idea", the generated *.iml file contains a reference to "/path/to/my.jar". If I delete all IntelliJ metadata files and import the project using the Gradle import wizard, IntelliJ generates the metadata files but the additional dependency is not picked up. How can I get IntelliJ, when I import my project, to add this JAR to its runtime classpath via Gradle?

0

Please sign in to leave a comment.