multi project gradle build with logback.xml

Answered

I have a multi-project gradle build.  The build files execute okay when I specify Gradle in the Build, Execution, Deployment, Build Tools, Gradle dialog for running and building the project.

However, if I switch the settings to Intellij for the build and run, then my logback.xml files from my sub-projects are included in the out/production/resources of the Intellij build output EVEN though I exclude them in the jar task via the exclude() directive.  This causes multiple logback.xml files be seen on the classpath and causes the logging configuration to not configure properly.  It seems like Intellij is not recognizing this directive from my build.gradle.kts file

The sub-projects can be built and run separately from the overall project. Thus, they need their own logging configurations.  However, I exclude them from the jars that are built in my build.gradle files.  Intellij creates its own out directory (which is okay, and a subject of other filed issues).  It is okay with me if Intellij creates its own build artifacts; however, it is not recognizing the exclude() directive in my build.gradle file.  How do I have Intellij not include the logback.xml file from its build artifact?

 

0
3 comments

Feature request for supporting Gradle jar task exclude is welcome at https://youtrack.jetbrains.com/issues/IDEA. Build/run delegation is now the default option and is recommended for the cases like this where IntelliJ IDEA doesn't support some build specific configuration.

0

So, you are saying that IntelliJ does not currently support the gradel jar task exclude option, correct?

0

Please sign in to leave a comment.