What is the best practice for managing javascript libraries (such as JQuery)?

There aren’t any real established dependency management/modelling techniques available in the Javascript space.

Gradle is quite flexible here though, so you could quite easily configure Gradle to simply download the jquery.js file from a website based on the version number.

Here’s a quick example of the kind of thing you can do:

repositories {
 mavenRepo (name: "JQuery", url: "http://code.jquery.com") {
  pattern = "[module]-[revision](.[classifier]).[ext]"
  configurations {
  dependencies {
    js group: 'jquery', name: 'jquery', version: '1.6.4', classifier: 'min', ext: "js"
  task fetchJs(type: Copy) {
    from configurations.js
    into "$buildDir/js"