overstory / marklogic-intellij-plugin

Plugin to support XQuery + MarkLogic debugging in Intellij Idea
Apache License 2.0
12 stars 2 forks source link

Modify Gradle build to properly compile Groovy classes and build plugin zip file #28

Closed ronhitchens closed 6 years ago

ronhitchens commented 7 years ago

Part of the MarkLogic connection logic has been written in the Groovy language. The default Gradle rules do not setup the compile rules and/or classpath setting to compile both languages together. The code compiles in IntelliJ and runs fine, but not in the batch Gradle build.

IntelliJ has a "Prepare plugin for deployment" menu selection which produces a plugin zip file. This zip file installs ok and provides most of the plugin services, but does not work for executing or debugging code in a controlled process. This is apparently because the IntelliJ menu build packages the compiled code into a Jar, whereas the sandbox build produces an exploded "classes" directory. This needs to be solved for public deployment.

ronhitchens commented 7 years ago

This is working now. The issue with plugin zip files created from the IntelliJ Build menu turned out to be that the sub-project (intellij-xquery-rt) was not being bundled into output zip file. The Gradle rule that builds the zip file does include it.

Changed the Gradle source-set configuration to compile both Java and Groovy with the Groovy compiler, which let's them play happily together.

Working correctly now.

ronhitchens commented 6 years ago

The compilation rules were tweaked a bit for 1.0.0 now that Groovy is bundled into the SDK.