You can compile your goog
code and then include the jQuery code as external code. This method will also let you compile your code in ADVANCED MODE
and still be able to use jQuery
in it's original form.
To do this, you will have to use a .js file that contains all of your extern declarations. Then you use the --externs
flag to tell the closure compiler where to look for externs. See the sample usage below:
java -jar compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS \
--js makeallnotes.js --externs extern1.js --externs extern2.js
To find out more about how to declare externs, see this tutorial. Basically, they are used to tell the closure compiler about an external API or library you are using.
There is actually a jQuery
extern file included with the Google Closure source code. Find the version of jQuery
you are using on this page.
On a side note, I'd look into using Plovr to build your Closure Project. It lets you use a configuration a file to set all of your build parameters and will save a lot of time if you are building your code often.