Yes, you can use the Libraries API for this. The docs explain all of this fairly well. This is best for things that change infrequently.
Put the module in "site/all/modules" so all of your sites can see it, then enable it on the sites you need.
Then, wherever you need these JS libraries, you use drupal_add_library
drupal_add_library("mymodule_util", "mymodule_util", $every_page);
Typically, this is in a
hook_block_view or a preprocess function.
MPD's solution is very elegant. But since I'm new to Drupal and I don't know anything about module development (yet), I used a different method. The method I used to solve this problem was :
- I placed the js file in the main theme.
- I made the remaining themes as sub-themes to the main theme.
I know this is not a very elegant solution but this is an easy solution for newbies in Drupal.