This message was deleted.
# community-support
s
This message was deleted.
t
How are you importing the project in IntelliJ? If using IntelliJ builtin support for Gradle, it should Just Work™ (if using
./gradlew idea
to generate an IntelliJ project, I would say it should just work as well, but who knows…)
p
@Thomas Broyer I use built-in gradle
t
I use compileOnly too and don't have any problem (e.g. https://github.com/tbroyer/gradle-incap-helper in
processor
subproject)
Check the dependencies (compileClasspath vs runtimeClasspath) in the Gradle tool window
Also check in "Project Structure" (from "File" menu)
p
everything is in compileClasspath
can a dependency be declared both compileOnly and testRuntimeOnly? or does it not make sense?
t
(ah sorry, no this is testCompileOnly, but still, should work)
🙌 1
p
@Thomas Broyer do you know how to avoid writing: compileOny "myDependency" testImplementation "myDependency" ? With this approach you write "myDependency" twice. Is there a way to somehow specify compileOnly+testImplementation in 1 line?
t
No (but you can use a version catalog –or even just a variable– to avoid repeating the coordinates and prevent them from shifting by mistake; and if you have many such dependencies, besides looking like a smell, you can define a function to help you declare them in one line –I'd probably rather use a bundle in a version catalog and thus declare all of them in 2 lines in the build script)